Re: [PATCH 3/4] drm/mediatek: don't use drm_put_dev

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

 



On Tue, Dec 13, 2016 at 11:55:32AM +0100, Lucas Stach wrote:
> Am Donnerstag, den 08.12.2016, 12:07 +0100 schrieb Daniel Vetter:
> > fsl is already fully demidlayered in the probe function, but for
>   ^ mediatek not fsl-dcu
> 
> > convenience stuck with drm_put_dev. Call the unregister/unref parts
> > separately, to make sure this driver works correct.
> > 
> I don't really see the benefit here, except you want to get rid of
> drm_dev_put() completely from the core. But whatever:

Yeah, that's the idea. Also I like probe/remove paths to be symmetric,
this achieves this.

> Reviewed-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>

Merged this and the etnaviv patch to drm-misc, thanks for your review.
-Daniel

> 
> > Cc: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
> > Cc: CK Hu <ck.hu@xxxxxxxxxxxx>
> > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>
> > ---
> >  drivers/gpu/drm/mediatek/mtk_drm_drv.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > index 4b7fe7eaec01..b5f88e6d078e 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> > @@ -321,7 +321,8 @@ static void mtk_drm_unbind(struct device *dev)
> >  {
> >  	struct mtk_drm_private *private = dev_get_drvdata(dev);
> >  
> > -	drm_put_dev(private->drm);
> > +	drm_dev_unregister(private->drm);
> > +	drm_dev_unref(private->drm);
> >  	private->drm = NULL;
> >  }
> >  
> 
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux