Skip to content

Commit ae1e782

Browse files
committed
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: Dave 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
2 parents 83a7eef + 38e3825 commit ae1e782

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

drivers/gpu/drm/exynos/exynos_dp.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ struct platform_driver dp_driver = {
285285
.remove_new = exynos_dp_remove,
286286
.driver = {
287287
.name = "exynos-dp",
288-
.owner = THIS_MODULE,
289288
.pm = pm_ptr(&exynos_dp_pm_ops),
290289
.of_match_table = exynos_dp_match,
291290
},

drivers/gpu/drm/exynos/exynos_drm_vidi.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ static int vidi_get_modes(struct drm_connector *connector)
309309
struct vidi_context *ctx = ctx_from_connector(connector);
310310
struct edid *edid;
311311
int edid_len;
312+
int count;
312313

313314
/*
314315
* 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)
328329

329330
drm_connector_update_edid_property(connector, edid);
330331

331-
return drm_add_edid_modes(connector, edid);
332+
count = drm_add_edid_modes(connector, edid);
333+
334+
kfree(edid);
335+
336+
return count;
332337
}
333338

334339
static const struct drm_connector_helper_funcs vidi_connector_helper_funcs = {

drivers/gpu/drm/exynos/exynos_hdmi.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,11 +887,11 @@ static int hdmi_get_modes(struct drm_connector *connector)
887887
int ret;
888888

889889
if (!hdata->ddc_adpt)
890-
return 0;
890+
goto no_edid;
891891

892892
edid = drm_get_edid(connector, hdata->ddc_adpt);
893893
if (!edid)
894-
return 0;
894+
goto no_edid;
895895

896896
hdata->dvi_mode = !connector->display_info.is_hdmi;
897897
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)
906906
kfree(edid);
907907

908908
return ret;
909+
910+
no_edid:
911+
return drm_add_modes_noedid(connector, 640, 480);
909912
}
910913

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

0 commit comments

Comments
 (0)