summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_hdmi.c
diff options
context:
space:
mode:
authorRahul Sharma2012-11-20 12:28:26 +0100
committerInki Dae2012-12-05 06:39:21 +0100
commita3f9bcab509a4bf003942e7e2048904cfe7cb5c5 (patch)
tree0e3fd74bf64924b5390bc1124a97cdc539077ea1 /drivers/gpu/drm/exynos/exynos_hdmi.c
parentdrm/exynos: fix memory leak to EDID block (diff)
downloadkernel-qcow2-linux-a3f9bcab509a4bf003942e7e2048904cfe7cb5c5.tar.gz
kernel-qcow2-linux-a3f9bcab509a4bf003942e7e2048904cfe7cb5c5.tar.xz
kernel-qcow2-linux-a3f9bcab509a4bf003942e7e2048904cfe7cb5c5.zip
drm: exynos: fix for loosing display mode header during mode adjustment
This patch is to preserve the display mode header during the mode adjustment. Display mode header is overwritten with the adjusted mode header which is throwing the stack dump. Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_hdmi.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 6716ecd3b3e9..a4052271a1f6 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1979,9 +1979,18 @@ static void hdmi_mode_fixup(void *ctx, struct drm_connector *connector,
index = hdmi_v14_conf_index(m);
if (index >= 0) {
+ struct drm_mode_object base;
+ struct list_head head;
+
DRM_INFO("desired mode doesn't exist so\n");
DRM_INFO("use the most suitable mode among modes.\n");
+
+ /* preserve display mode header while copying. */
+ head = adjusted_mode->head;
+ base = adjusted_mode->base;
memcpy(adjusted_mode, m, sizeof(*m));
+ adjusted_mode->head = head;
+ adjusted_mode->base = base;
break;
}
}