[PATCH 02/10] drm/exynos: added mode_fixup feature and code clean.

Dave Airlie airlied at gmail.com
Thu Mar 15 03:39:46 PDT 2012


>  };
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> index de81883..2d9a0e6 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> @@ -249,7 +249,11 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
>  {
>        DRM_DEBUG_KMS("%s\n", __FILE__);
>
> -       mode = adjusted_mode;
> +       /*
> +        * copy the mode data adjusted by mode_fixup() into crtc->mode
> +        * so that hardware can be seet to proper mode.
> +        */
> +       memcpy(&crtc->mode, adjusted_mode, sizeof(*adjusted_mode));

This just seems wrong on lots of levels, if you get an error how are
you going to fallback?

You should be passing the modes into the crtc_update function and
doing things like other drivers here.

Dave.


More information about the dri-devel mailing list