Commit ae1e7823 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'exynos-drm-fixes-for-v6.10-rc4' of...

Merge tag 'exynos-drm-fixes-for-v6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos

 into drm-fixes

Regression fix
- Fix an regression issue by adding 640x480 fallback mode
  for Exynos HDMI driver.

Bug fix
- Fix a memory leak by ensuring the duplicated EDID is properly freed in the get_modes function.

Code cleanup
- Remove redundant driver owner initialization since platform_driver_register() sets it automatically.

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

From: Inki Dae <inki.dae@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240610073839.37430-1-inki.dae@samsung.com
parents 83a7eefe 38e38256
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -285,7 +285,6 @@ struct platform_driver dp_driver = {
	.remove_new	= exynos_dp_remove,
	.driver		= {
		.name	= "exynos-dp",
		.owner	= THIS_MODULE,
		.pm	= pm_ptr(&exynos_dp_pm_ops),
		.of_match_table = exynos_dp_match,
	},
+6 −1
Original line number Diff line number Diff line
@@ -309,6 +309,7 @@ static int vidi_get_modes(struct drm_connector *connector)
	struct vidi_context *ctx = ctx_from_connector(connector);
	struct edid *edid;
	int edid_len;
	int count;

	/*
	 * the edid data comes from user side and it would be set
@@ -328,7 +329,11 @@ static int vidi_get_modes(struct drm_connector *connector)

	drm_connector_update_edid_property(connector, edid);

	return drm_add_edid_modes(connector, edid);
	count = drm_add_edid_modes(connector, edid);

	kfree(edid);

	return count;
}

static const struct drm_connector_helper_funcs vidi_connector_helper_funcs = {
+5 −2
Original line number Diff line number Diff line
@@ -887,11 +887,11 @@ static int hdmi_get_modes(struct drm_connector *connector)
	int ret;

	if (!hdata->ddc_adpt)
		return 0;
		goto no_edid;

	edid = drm_get_edid(connector, hdata->ddc_adpt);
	if (!edid)
		return 0;
		goto no_edid;

	hdata->dvi_mode = !connector->display_info.is_hdmi;
	DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n",
@@ -906,6 +906,9 @@ static int hdmi_get_modes(struct drm_connector *connector)
	kfree(edid);

	return ret;

no_edid:
	return drm_add_modes_noedid(connector, 640, 480);
}

static int hdmi_find_phy_conf(struct hdmi_context *hdata, u32 pixel_clock)