Skip to content

Commit

Permalink
Merge tag 'drm-misc-next-fixes-2024-03-21' of https://gitlab.freedesk…
Browse files Browse the repository at this point in the history
…top.org/drm/misc/kernel into drm-next

Short summary of fixes pull:

core:
- fix rounding in drm_fixp2int_round()

bridge:
- fix documentation for DRM_BRIDGE_OP_EDID

nouveau:
- don't check devinit disable on GSP

sun4i:
- fix 64-bit division on 32-bit architectures

tests:
- fix dependency on DRM_KMS_HELPER

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240321161948.GA30430@linux.fritz.box
  • Loading branch information
airlied committed Mar 21, 2024
2 parents 02ac437 + 5d4e8ae commit 921074a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ config DRM_USE_DYNAMIC_DEBUG
config DRM_KUNIT_TEST_HELPERS
tristate
depends on DRM && KUNIT
select DRM_KMS_HELPER
help
KUnit Helpers for KMS drivers.

Expand All @@ -80,7 +81,6 @@ config DRM_KUNIT_TEST
select DRM_EXEC
select DRM_EXPORT_FOR_TESTS if m
select DRM_GEM_SHMEM_HELPER
select DRM_KMS_HELPER
select DRM_KUNIT_TEST_HELPERS
select DRM_LIB_RANDOM
select PRIME_NUMBERS
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/nouveau/nvkm/subdev/devinit/r535.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ r535_devinit_new(const struct nvkm_devinit_func *hw,

rm->dtor = r535_devinit_dtor;
rm->post = hw->post;
rm->disable = hw->disable;

ret = nv50_devinit_new_(rm, device, type, inst, pdevinit);
if (ret)
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ sun4i_hdmi_connector_clock_valid(const struct drm_connector *connector,
unsigned long long clock)
{
const struct sun4i_hdmi *hdmi = drm_connector_to_sun4i_hdmi(connector);
unsigned long diff = clock / 200; /* +-0.5% allowed by HDMI spec */
unsigned long diff = div_u64(clock, 200); /* +-0.5% allowed by HDMI spec */
long rounded_rate;

if (mode->flags & DRM_MODE_FLAG_DBLCLK)
Expand Down
4 changes: 2 additions & 2 deletions include/drm/drm_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ struct drm_bridge_funcs {
* The @get_modes callback is mostly intended to support non-probeable
* displays such as many fixed panels. Bridges that support reading
* EDID shall leave @get_modes unimplemented and implement the
* &drm_bridge_funcs->get_edid callback instead.
* &drm_bridge_funcs->edid_read callback instead.
*
* This callback is optional. Bridges that implement it shall set the
* DRM_BRIDGE_OP_MODES flag in their &drm_bridge->ops.
Expand Down Expand Up @@ -687,7 +687,7 @@ enum drm_bridge_ops {
/**
* @DRM_BRIDGE_OP_EDID: The bridge can retrieve the EDID of the display
* connected to its output. Bridges that set this flag shall implement
* the &drm_bridge_funcs->get_edid callback.
* the &drm_bridge_funcs->edid_read callback.
*/
DRM_BRIDGE_OP_EDID = BIT(1),
/**
Expand Down
3 changes: 1 addition & 2 deletions include/drm/drm_fixed.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ static inline u32 dfixed_div(fixed20_12 A, fixed20_12 B)
}

#define DRM_FIXED_POINT 32
#define DRM_FIXED_POINT_HALF 16
#define DRM_FIXED_ONE (1ULL << DRM_FIXED_POINT)
#define DRM_FIXED_DECIMAL_MASK (DRM_FIXED_ONE - 1)
#define DRM_FIXED_DIGITS_MASK (~DRM_FIXED_DECIMAL_MASK)
Expand All @@ -90,7 +89,7 @@ static inline int drm_fixp2int(s64 a)

static inline int drm_fixp2int_round(s64 a)
{
return drm_fixp2int(a + (1 << (DRM_FIXED_POINT_HALF - 1)));
return drm_fixp2int(a + DRM_FIXED_ONE / 2);
}

static inline int drm_fixp2int_ceil(s64 a)
Expand Down

0 comments on commit 921074a

Please sign in to comment.