[PATCH 4/4] drm/exynos: remove checks for zpos == -1 on primary planes

Joonyoung Shim jy0922.shim at samsung.com
Thu Feb 5 20:40:43 PST 2015


Hi,

On 02/06/2015 02:59 AM, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
> 
> The primary plane default zpos is now 0, so remove checks for zpos ==
> -1. We don't need to set win to 0 anymore it is already zero.
> 

Could you also remove DEFAULT_ZPOS define? And zpos and win should be
unsigned from now.

Thanks.

> Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_fimd.c | 6 ------
>  drivers/gpu/drm/exynos/exynos_drm_vidi.c | 6 ------
>  drivers/gpu/drm/exynos/exynos_mixer.c    | 6 ++----
>  3 files changed, 2 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> index 00df40d..7637780 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> @@ -612,9 +612,6 @@ static void fimd_win_commit(struct exynos_drm_crtc *crtc, int win)
>  	if (ctx->suspended)
>  		return;
>  
> -	if (win == DEFAULT_ZPOS)
> -		win = ctx->default_win;
> -
>  	if (win < 0 || win >= WINDOWS_NR)
>  		return;
>  
> @@ -735,9 +732,6 @@ static void fimd_win_disable(struct exynos_drm_crtc *crtc, int win)
>  	struct fimd_context *ctx = crtc->ctx;
>  	struct exynos_drm_plane *plane;
>  
> -	if (win == DEFAULT_ZPOS)
> -		win = ctx->default_win;
> -
>  	if (win < 0 || win >= WINDOWS_NR)
>  		return;
>  
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> index 3c0dcb4..e730ef6 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
> @@ -125,9 +125,6 @@ static void vidi_win_commit(struct exynos_drm_crtc *crtc, int win)
>  	if (ctx->suspended)
>  		return;
>  
> -	if (win == DEFAULT_ZPOS)
> -		win = ctx->default_win;
> -
>  	if (win < 0 || win >= WINDOWS_NR)
>  		return;
>  
> @@ -146,9 +143,6 @@ static void vidi_win_disable(struct exynos_drm_crtc *crtc, int win)
>  	struct vidi_context *ctx = crtc->ctx;
>  	struct exynos_drm_plane *plane;
>  
> -	if (win == DEFAULT_ZPOS)
> -		win = ctx->default_win;
> -
>  	if (win < 0 || win >= WINDOWS_NR)
>  		return;
>  
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index 141d461..b283713 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -892,10 +892,9 @@ static void mixer_disable_vblank(struct exynos_drm_crtc *crtc)
>  	mixer_reg_writemask(res, MXR_INT_EN, 0, MXR_INT_EN_VSYNC);
>  }
>  
> -static void mixer_win_commit(struct exynos_drm_crtc *crtc, int zpos)
> +static void mixer_win_commit(struct exynos_drm_crtc *crtc, int win)
>  {
>  	struct mixer_context *mixer_ctx = crtc->ctx;
> -	int win = zpos == DEFAULT_ZPOS ? MIXER_DEFAULT_WIN : zpos;
>  
>  	DRM_DEBUG_KMS("win: %d\n", win);
>  
> @@ -914,11 +913,10 @@ static void mixer_win_commit(struct exynos_drm_crtc *crtc, int zpos)
>  	mixer_ctx->planes[win].enabled = true;
>  }
>  
> -static void mixer_win_disable(struct exynos_drm_crtc *crtc, int zpos)
> +static void mixer_win_disable(struct exynos_drm_crtc *crtc, int win)
>  {
>  	struct mixer_context *mixer_ctx = crtc->ctx;
>  	struct mixer_resources *res = &mixer_ctx->mixer_res;
> -	int win = zpos == DEFAULT_ZPOS ? MIXER_DEFAULT_WIN : zpos;
>  	unsigned long flags;
>  
>  	DRM_DEBUG_KMS("win: %d\n", win);
> 



More information about the dri-devel mailing list