All of lore.kernel.org
 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: Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 07/14] drm/exynos: atomic phase 1: use drm_plane_helper_disable()
Date: Wed, 04 Feb 2015 16:47:38 +0900	[thread overview]
Message-ID: <54D1CE9A.9040305@samsung.com> (raw)
In-Reply-To: <1422990871-21355-8-git-send-email-gustavo@padovan.org>

Hi,

On 02/04/2015 04:14 AM, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> 
> The atomic helper to disable planes also uses the optional
> .atomic_disable() helper. The unique operation it does is calling
> .win_disable()
> 

Is there any reason to split this patch from patch 06/14?

> exynos_drm_fb_get_buf_cnt() needs a fb check too to avoid a null pointer.
> 

This is not related with this patch purpose.

> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_fb.c    |  2 +-
>  drivers/gpu/drm/exynos/exynos_drm_plane.c | 14 +++++++++++++-
>  2 files changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
> index d346d1e..470456d 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fb.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c
> @@ -136,7 +136,7 @@ unsigned int exynos_drm_fb_get_buf_cnt(struct drm_framebuffer *fb)
>  
>  	exynos_fb = to_exynos_fb(fb);
>  
> -	return exynos_fb->buf_cnt;
> +	return exynos_fb ? exynos_fb->buf_cnt : 0;

I don't think exynos_fb can be NULL.

Thanks.

>  }
>  
>  struct drm_framebuffer *
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c
> index 2c356b9..a3b0687 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_plane.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c
> @@ -219,7 +219,7 @@ static int exynos_plane_set_property(struct drm_plane *plane,
>  
>  static struct drm_plane_funcs exynos_plane_funcs = {
>  	.update_plane	= drm_plane_helper_update,
> -	.disable_plane	= exynos_disable_plane,
> +	.disable_plane	= drm_plane_helper_disable,
>  	.destroy	= exynos_plane_destroy,
>  	.set_property	= exynos_plane_set_property,
>  };
> @@ -242,9 +242,21 @@ static void exynos_plane_atomic_update(struct drm_plane *plane,
>  			    state->src_w >> 16, state->src_h >> 16);
>  }
>  
> +static void exynos_plane_atomic_disable(struct drm_plane *plane,
> +				        struct drm_plane_state *old_state)
> +{
> +	struct exynos_drm_plane *exynos_plane = to_exynos_plane(plane);
> +	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(old_state->crtc);
> +
> +	if (exynos_crtc->ops->win_disable)
> +		exynos_crtc->ops->win_disable(exynos_crtc,
> +					      exynos_plane->zpos);
> +}
> +
>  static const struct drm_plane_helper_funcs plane_helper_funcs = {
>  	.atomic_check = exynos_plane_atomic_check,
>  	.atomic_update = exynos_plane_atomic_update,
> +	.atomic_disable = exynos_plane_atomic_disable,
>  };
>  
>  static void exynos_plane_attach_zpos_property(struct drm_plane *plane)
> 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-02-04  7:47 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03 19:14 [PATCH 00/14] drm/exynos: cleanups + atomic phases 1 and 2 Gustavo Padovan
2015-02-03 19:14 ` [PATCH 01/14] drm/exynos: track vblank events on a per crtc basis Gustavo Padovan
2015-02-03 19:14 ` [PATCH 02/14] drm/exynos: Remove exynos_plane_dpms() call with no effect Gustavo Padovan
2015-02-04  7:42   ` Joonyoung Shim
2015-02-04 14:16     ` Daniel Vetter
2015-02-05  1:05       ` Joonyoung Shim
2015-02-05  9:03         ` Daniel Vetter
2015-02-03 19:14 ` [PATCH 03/14] drm/exynos: remove leftover functions declarations Gustavo Padovan
2015-02-03 19:14 ` [PATCH 04/14] drm/exynos: remove struct *_win_data abstraction on planes Gustavo Padovan
2015-02-04  7:44   ` Joonyoung Shim
2015-02-04 14:28     ` Daniel Vetter
2015-02-05  2:37       ` Joonyoung Shim
2015-02-05  9:15         ` Daniel Vetter
2015-02-05 12:26           ` Rob Clark
2015-02-05 12:48             ` Daniel Stone
2015-02-05 13:06               ` Daniel Vetter
2015-02-06  3:39                 ` Joonyoung Shim
2015-02-03 19:14 ` [PATCH 05/14] drm/exynos: do not copy adjusted mode into mode during crtc mode_set Gustavo Padovan
2015-02-03 19:14 ` [PATCH 06/14] drm/exynos: atomic phase 1: use drm_plane_helper_update() Gustavo Padovan
2015-02-03 19:14 ` [PATCH 07/14] drm/exynos: atomic phase 1: use drm_plane_helper_disable() Gustavo Padovan
2015-02-04  7:47   ` Joonyoung Shim [this message]
2015-02-03 19:14 ` [PATCH 08/14] drm/exynos: atomic phase 1: add atomic_begin()/atomic_flush() Gustavo Padovan
2015-02-04  7:49   ` Joonyoung Shim
2015-02-04 14:30     ` Daniel Vetter
2015-02-05  2:48       ` Joonyoung Shim
2015-02-05  9:18         ` Daniel Vetter
2015-02-03 19:14 ` [PATCH 09/14] drm/exynos: atomic phase 1: add .mode_set_nofb() callback Gustavo Padovan
2015-02-04  7:51   ` Joonyoung Shim
2015-02-03 19:14 ` [PATCH 10/14] drm/exynos: atomic phase 2: wire up state reset(), duplicate() and destroy() Gustavo Padovan
2015-02-03 19:14 ` [PATCH 11/14] drm/exynos: atomic phase 2: keep track of framebuffer pointer Gustavo Padovan
2015-02-04  7:53   ` Joonyoung Shim
2015-02-04 14:33     ` Daniel Vetter
2015-02-03 19:14 ` [PATCH 12/14] drm/exynos: make exynos_plane_mode_set() static Gustavo Padovan
2015-02-03 19:14 ` [PATCH 13/14] drm/exynos: use correct pipe number on vblank event Gustavo Padovan
2015-02-03 19:14 ` [PATCH 14/14] drm/exynos: remove exynos_disable_plane() Gustavo Padovan
2015-02-04  7:37 ` [PATCH 00/14] drm/exynos: cleanups + atomic phases 1 and 2 Joonyoung Shim
2015-02-04 14:35   ` Daniel Vetter

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=54D1CE9A.9040305@samsung.com \
    --to=jy0922.shim@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=gustavo@padovan.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.