[PATCH 6/6] drm/exynos: do not copy adjusted mode into mode during crtc mode_set
Joonyoung Shim
jy0922.shim at samsung.com
Thu Jan 29 20:53:20 PST 2015
Hi,
On 01/23/2015 09:43 PM, Gustavo Padovan wrote:
> From: Daniel Kurtz <djkurtz at chromium.org>
>
> The 'mode' is the modeline information which specifies the ideal mode
> requested by the mode set initiator (usually userspace).
> The 'adjusted_mode' is the actual hardware mode after all the crtcs
> and encoders have had a chance to "fix it up".
>
> The adjusted_mode starts as a duplicate of the mode in
> drm_crtc_helper_set_mode(), and gets modified as required. There is no
> reason to touch the original requested mode.
>
Agree, but is there any side effect after this commit? Should we save
adjusted_mode to other variable and use it?
Thanks.
> In fact, doing so will cause us to think a new mode is being requested
> whenever userspace tries to establish a new framebuffer with
> drmModeSetCrtc(), since userspace will still be using the ideal mode, but
> the crtc will be incorrectly comparing it against the adjusted_mode.
>
> Signed-off-by: Daniel Kurtz <djkurtz at chromium.org>
> Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
> ---
> drivers/gpu/drm/exynos/exynos_drm_crtc.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> index 5cd6c1a..7fd6426 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> @@ -91,12 +91,6 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
> unsigned int crtc_h;
> int ret;
>
> - /*
> - * 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));
> -
> ret = exynos_check_plane(crtc->primary, fb);
> if (ret < 0)
> return ret;
>
More information about the dri-devel
mailing list