[PATCH v6 02/12] drm/exynos: atomic phase 1: use drm_plane_helper_disable()
Gustavo Padovan
gustavo at padovan.org
Fri May 22 08:29:45 PDT 2015
Hi Joonyoung,
2015-05-22 Joonyoung Shim <jy0922.shim at samsung.com>:
> On 05/22/2015 05:02 AM, Gustavo Padovan wrote:
> > From: Gustavo Padovan <gustavo.padovan at 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()
> >
> > 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 | 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
More information about the dri-devel
mailing list