diff mbox

[v1] drm: exynos: fix for loosing display mode header during mode adjustment

Message ID 1353410906-1939-1-git-send-email-rahul.sharma@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Rahul Sharma Nov. 20, 2012, 11:28 a.m. UTC
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>
---
 drivers/gpu/drm/exynos/exynos_hdmi.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

Comments

Inki Dae Nov. 21, 2012, 3:53 a.m. UTC | #1
Applied.

Thanks,
Inki Dae

2012/11/20 Rahul Sharma <rahul.sharma@samsung.com>

> 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>
> ---
>  drivers/gpu/drm/exynos/exynos_hdmi.c |    9 +++++++++
>  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 2c115f8..be7b676 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -1978,9 +1978,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;
>                 }
>         }
> --
> 1.7.0.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 2c115f8..be7b676 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1978,9 +1978,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;
 		}
 	}