[PATCH 25/29] drm/exynos: atomic phase 1: use drm_plane_helper_disable()

Gustavo Padovan gustavo at padovan.org
Wed Jan 7 11:10:24 PST 2015


2014-12-30 Inki Dae <inki.dae at samsung.com>:

> On 2014년 12월 18일 22:58, Gustavo Padovan wrote:
> > From: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
> > 
> > The atomic helper to disable planes also uses exynos_update_plane() to
> > disable plane so we had to adapt it to both commit and disable planes.
> > 
> > A check for NULL CRTC was added to exynos_plane_mode_set() since planes
> > to be disabled have plane_state->crtc set to NULL.
> > 
> > Also win_disable() callback uses plane->crtc as arg for the same reason.
> > 
> > exynos_drm_fb_get_buf_cnt() needs a fb check too to avoid a null pointer.
> > 
> > Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
> > ---
> >  drivers/gpu/drm/exynos/exynos_drm_fb.c    |  2 +-
> >  drivers/gpu/drm/exynos/exynos_drm_plane.c | 24 ++++++++++++++++++------
> >  2 files changed, 19 insertions(+), 7 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;
> 
> This change isn't related with this patch.

This patch will be reworked to use atomic_disable() as suggested by Daniel
Vetter in the previous comment.

	Gustavo


More information about the dri-devel mailing list