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>
This commit is contained in:
Sean Paul 2014-01-30 16:19:16 -05:00 committed by Inki Dae
parent f041b257a8
commit 75626853a7
1 changed files with 1 additions and 9 deletions

View File

@ -897,21 +897,13 @@ static void hdmi_mode_fixup(struct exynos_drm_display *display,
mode_ok = hdmi_check_mode(display, m); mode_ok = hdmi_check_mode(display, m);
if (mode_ok == 0) { if (mode_ok == 0) {
struct drm_mode_object base;
struct list_head head;
DRM_INFO("desired mode doesn't exist so\n"); DRM_INFO("desired mode doesn't exist so\n");
DRM_INFO("use the most suitable mode among modes.\n"); DRM_INFO("use the most suitable mode among modes.\n");
DRM_DEBUG_KMS("Adjusted Mode: [%d]x[%d] [%d]Hz\n", DRM_DEBUG_KMS("Adjusted Mode: [%d]x[%d] [%d]Hz\n",
m->hdisplay, m->vdisplay, m->vrefresh); m->hdisplay, m->vdisplay, m->vrefresh);
/* preserve display mode header while copying. */ drm_mode_copy(adjusted_mode, m);
head = adjusted_mode->head;
base = adjusted_mode->base;
memcpy(adjusted_mode, m, sizeof(*m));
adjusted_mode->head = head;
adjusted_mode->base = base;
break; break;
} }
} }