Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Gustavo Padovan <gustavo@padovan.org>, linux-samsung-soc@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org, inki.dae@samsung.com,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: Re: [PATCH 4/4] drm/exynos: remove checks for zpos == -1 on primary planes
Date: Fri, 06 Feb 2015 13:40:43 +0900	[thread overview]
Message-ID: <54D445CB.7010809@samsung.com> (raw)
In-Reply-To: <1423159199-16394-4-git-send-email-gustavo@padovan.org>

Hi,

On 02/06/2015 02:59 AM, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@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@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);
> 

  reply	other threads:[~2015-02-06  4:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 17:59 [PATCH 1/4] drm/exynos: remove struct *_win_data abstraction on planes Gustavo Padovan
2015-02-05 17:59 ` [PATCH 2/4] drm/exynos: preset zpos value for overlay planes Gustavo Padovan
2015-02-06  4:34   ` Joonyoung Shim
2015-02-05 17:59 ` [PATCH 3/4] drm/exynos: avoid extra variable to keep window number Gustavo Padovan
2015-02-05 17:59 ` [PATCH 4/4] drm/exynos: remove checks for zpos == -1 on primary planes Gustavo Padovan
2015-02-06  4:40   ` Joonyoung Shim [this message]
2015-02-06  4:18 ` [PATCH 1/4] drm/exynos: remove struct *_win_data abstraction on planes Joonyoung Shim
2015-02-06 12:45   ` Gustavo Padovan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54D445CB.7010809@samsung.com \
    --to=jy0922.shim@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=gustavo@padovan.org \
    --cc=inki.dae@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox