Thierry Reding
2018-Nov-23 12:11 UTC
[Nouveau] [PATCH] drm/nouveau: tegra: Call nouveau_drm_device_init()
From: Thierry Reding <treding at nvidia.com> As part of commit cfea88a4d866 ("drm/nouveau: Start using new drm_dev initialization helpers"), the initialization of the Nouveau DRM device was reworked and along the way the platform driver initialization was left incomplete. Add a call to nouveau_drm_device_init() to make sure all of the structures are properly initialized. Signed-off-by: Thierry Reding <treding at nvidia.com> --- drivers/gpu/drm/nouveau/nouveau_drm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 2b2baf6e0e0d..d2928d43f29a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -1171,10 +1171,16 @@ nouveau_platform_device_create(const struct nvkm_device_tegra_func *func, goto err_free; } + err = nouveau_drm_device_init(drm); + if (err) + goto err_put; + platform_set_drvdata(pdev, drm); return drm; +err_put: + drm_dev_put(drm); err_free: nvkm_device_del(pdevice); -- 2.19.1
Lyude Paul
2018-Nov-26 20:47 UTC
[Nouveau] [PATCH] drm/nouveau: tegra: Call nouveau_drm_device_init()
Looks good to me Reviewed-by: Lyude Paul <lyude at redhat.com> On Fri, 2018-11-23 at 13:11 +0100, Thierry Reding wrote:> From: Thierry Reding <treding at nvidia.com> > > As part of commit cfea88a4d866 ("drm/nouveau: Start using new drm_dev > initialization helpers"), the initialization of the Nouveau DRM device > was reworked and along the way the platform driver initialization was > left incomplete. Add a call to nouveau_drm_device_init() to make sure > all of the structures are properly initialized. > > Signed-off-by: Thierry Reding <treding at nvidia.com> > --- > drivers/gpu/drm/nouveau/nouveau_drm.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c > b/drivers/gpu/drm/nouveau/nouveau_drm.c > index 2b2baf6e0e0d..d2928d43f29a 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_drm.c > +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c > @@ -1171,10 +1171,16 @@ nouveau_platform_device_create(const struct > nvkm_device_tegra_func *func, > goto err_free; > } > > + err = nouveau_drm_device_init(drm); > + if (err) > + goto err_put; > + > platform_set_drvdata(pdev, drm); > > return drm; > > +err_put: > + drm_dev_put(drm); > err_free: > nvkm_device_del(pdevice); >-- Cheers, Lyude Paul
Marcel Ziswiler
2018-Dec-10 15:14 UTC
[Nouveau] drm/nouveau: tegra: Call nouveau_drm_device_init()
On Fri, 2018-11-23 at 13:11 +0100, Thierry Reding wrote:> From: Thierry Reding <treding at nvidia.com> > > As part of commit cfea88a4d866 ("drm/nouveau: Start using new drm_dev > initialization helpers"), the initialization of the Nouveau DRM > device > was reworked and along the way the platform driver initialization was > left incomplete. Add a call to nouveau_drm_device_init() to make sure > all of the structures are properly initialized. > > Signed-off-by: Thierry Reding <treding at nvidia.com> > Reviewed-by: Lyude Paul <lyude at redhat.com>Tested-by: Marcel Ziswiler <marcel.ziswiler at toradex.com>> --- > drivers/gpu/drm/nouveau/nouveau_drm.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c > b/drivers/gpu/drm/nouveau/nouveau_drm.c > index 2b2baf6e0e0d..d2928d43f29a 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_drm.c > +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c > @@ -1171,10 +1171,16 @@ nouveau_platform_device_create(const struct > nvkm_device_tegra_func *func, > goto err_free; > } > > + err = nouveau_drm_device_init(drm); > + if (err) > + goto err_put; > + > platform_set_drvdata(pdev, drm); > > return drm; > > +err_put: > + drm_dev_put(drm); > err_free: > nvkm_device_del(pdevice);
Seemingly Similar Threads
- [PATCH 2/3] drm/nouveau: manage nouveau_drm lifetime with devres
- [PATCH 2/3] drm/nouveau: manage nouveau_drm lifetime with devres
- [PATCH 0/3] drm/nouveau: extend the lifetime of nouveau_drm
- next/master boot bisection: Oops in nouveau driver on jetson-tk1
- next/master boot bisection: Oops in nouveau driver on jetson-tk1