dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau: tegra: Call nouveau_drm_device_init()
@ 2018-11-23 12:11 Thierry Reding
  2018-11-26 20:47 ` Lyude Paul
  2018-12-10 15:14 ` Marcel Ziswiler
  0 siblings, 2 replies; 3+ messages in thread
From: Thierry Reding @ 2018-11-23 12:11 UTC (permalink / raw)
  To: Ben Skeggs
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

From: Thierry Reding <treding@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@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

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/nouveau: tegra: Call nouveau_drm_device_init()
  2018-11-23 12:11 [PATCH] drm/nouveau: tegra: Call nouveau_drm_device_init() Thierry Reding
@ 2018-11-26 20:47 ` Lyude Paul
  2018-12-10 15:14 ` Marcel Ziswiler
  1 sibling, 0 replies; 3+ messages in thread
From: Lyude Paul @ 2018-11-26 20:47 UTC (permalink / raw)
  To: Thierry Reding, Ben Skeggs; +Cc: nouveau, dri-devel

Looks good to me

Reviewed-by: Lyude Paul <lyude@redhat.com>

On Fri, 2018-11-23 at 13:11 +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@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@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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: drm/nouveau: tegra: Call nouveau_drm_device_init()
  2018-11-23 12:11 [PATCH] drm/nouveau: tegra: Call nouveau_drm_device_init() Thierry Reding
  2018-11-26 20:47 ` Lyude Paul
@ 2018-12-10 15:14 ` Marcel Ziswiler
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Ziswiler @ 2018-12-10 15:14 UTC (permalink / raw)
  To: bskeggs, thierry.reding; +Cc: linux-tegra, nouveau, dri-devel

On Fri, 2018-11-23 at 13:11 +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@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@nvidia.com>
> Reviewed-by: Lyude Paul <lyude@redhat.com>

Tested-by: Marcel Ziswiler <marcel.ziswiler@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);
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-10 15:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-23 12:11 [PATCH] drm/nouveau: tegra: Call nouveau_drm_device_init() Thierry Reding
2018-11-26 20:47 ` Lyude Paul
2018-12-10 15:14 ` Marcel Ziswiler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).