Re: [PATCH v6 02/12] drm/exynos: atomic phase 1: use drm_plane_helper_disable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Joonyoung,

2015-05-22 Joonyoung Shim <jy0922.shim@xxxxxxxxxxx>:

> On 05/22/2015 05:02 AM, Gustavo Padovan wrote:
> > From: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
> > 
> > The atomic helper to disable planes also uses the optional
> > .atomic_disable() helper. The unique operation it does is calling
> > .win_disable()
> > 
> > exynos_drm_fb_get_buf_cnt() needs a fb check too to avoid a null pointer.
> > 
> > Signed-off-by: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/exynos/exynos_drm_fb.c    |  2 +-
> >  drivers/gpu/drm/exynos/exynos_drm_plane.c | 29 ++++++++++++++++-------------
> >  2 files changed, 17 insertions(+), 14 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
> > index 142eb4e..bf814c8 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 think this should be checked by exynos_check_plane on plane disabling
> routine whether fb is NULL or not.

Yeah, this makes more sense. I fixed this and checkpatch error.

	Gustavo
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux