aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2014-01-30 16:19:16 -0500
committerInki Dae <daeinki@gmail.com>2014-03-23 11:36:32 -0400
commit75626853a7a00633f24def1039df5aa55d051091 (patch)
treeec71ddaccda0f2357026768d5df83f8b7b0be26e
parentf041b257a8997c8472a1013e9f252c3e2a1d879e (diff)
drm/exynos: Use drm_mode_copy to copy modes
This patch changes the manual copying of mode to adjusted_mode in mode_fixup to use drm_mode_copy instead of handling things manually. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index cc02e91848b5..b31a51da50f6 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -897,21 +897,13 @@ static void hdmi_mode_fixup(struct exynos_drm_display *display,
897 mode_ok = hdmi_check_mode(display, m); 897 mode_ok = hdmi_check_mode(display, m);
898 898
899 if (mode_ok == 0) { 899 if (mode_ok == 0) {
900 struct drm_mode_object base;
901 struct list_head head;
902
903 DRM_INFO("desired mode doesn't exist so\n"); 900 DRM_INFO("desired mode doesn't exist so\n");
904 DRM_INFO("use the most suitable mode among modes.\n"); 901 DRM_INFO("use the most suitable mode among modes.\n");
905 902
906 DRM_DEBUG_KMS("Adjusted Mode: [%d]x[%d] [%d]Hz\n", 903 DRM_DEBUG_KMS("Adjusted Mode: [%d]x[%d] [%d]Hz\n",
907 m->hdisplay, m->vdisplay, m->vrefresh); 904 m->hdisplay, m->vdisplay, m->vrefresh);
908 905
909 /* preserve display mode header while copying. */ 906 drm_mode_copy(adjusted_mode, m);
910 head = adjusted_mode->head;
911 base = adjusted_mode->base;
912 memcpy(adjusted_mode, m, sizeof(*m));
913 adjusted_mode->head = head;
914 adjusted_mode->base = base;
915 break; 907 break;
916 } 908 }
917 } 909 }