Commit 921074ab authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-next-fixes-2024-03-21' of...

Merge tag 'drm-misc-next-fixes-2024-03-21' of https://gitlab.freedesktop.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: default avatarDave Airlie <airlied@redhat.com>

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240321161948.GA30430@linux.fritz.box
parents 02ac4371 5d4e8ae6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.

@@ -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
+0 −1
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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)
+2 −2
Original line number Diff line number Diff line
@@ -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.
@@ -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),
	/**
+1 −2
Original line number Diff line number Diff line
@@ -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)
@@ -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)