dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau/bar/gk20a: Avoid bar teardown during init
@ 2018-01-04 11:29 Jon Hunter
  2018-01-10 12:20 ` [Nouveau] " Thierry Reding
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Hunter @ 2018-01-04 11:29 UTC (permalink / raw)
  To: Ben Skeggs, David Airlie
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Guillaume Tucker

Commit bbb163e18960 ("drm/nouveau/bar: implement bar1 teardown")
introduced add a teardown helper function for BAR1. During
initialisation of the Nouveau, initially all the teardown helpers are
called once, before calling their init counterparts. For gk20a, after
the BAR1 teardown function is called, the device is hanging during the
initialisation of the FB sub-device. At this point it is unclear why
this is happening and this is still under investigation. However, this
change is preventing Tegra124 devices from booting when Nouveau is
enabled. To allow Tegra124 to boot, remove the teardown helper for
gk20a.

This is based upon a previous patch by Guillaume Tucker but limits
the workaround to only gk20a GPUs.

Fixes: bbb163e18960 ("drm/nouveau/bar: implement bar1 teardown")
Reported-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
I am not happy that we do not yet fully understand the cause of
the hang, but I am talking with a few people at NVIDIA about this
and have a few things to look into. However, given that we are
close to v4.15 being released and I am not sure we will have a
proper fix in place before, I think it is best to workaround
this for now.

 drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c  | 3 ++-
 drivers/gpu/drm/nouveau/nvkm/subdev/bar/gk20a.c | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c
index 9646adec57cb..243f0a5c8a62 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c
@@ -73,7 +73,8 @@ static int
 nvkm_bar_fini(struct nvkm_subdev *subdev, bool suspend)
 {
 	struct nvkm_bar *bar = nvkm_bar(subdev);
-	bar->func->bar1.fini(bar);
+	if (bar->func->bar1.fini)
+		bar->func->bar1.fini(bar);
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gk20a.c
index b10077d38839..35878fb538f2 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gk20a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/gk20a.c
@@ -26,7 +26,6 @@ gk20a_bar_func = {
 	.dtor = gf100_bar_dtor,
 	.oneinit = gf100_bar_oneinit,
 	.bar1.init = gf100_bar_bar1_init,
-	.bar1.fini = gf100_bar_bar1_fini,
 	.bar1.wait = gf100_bar_bar1_wait,
 	.bar1.vmm = gf100_bar_bar1_vmm,
 	.flush = g84_bar_flush,
-- 
2.7.4

_______________________________________________
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: [Nouveau] [PATCH] drm/nouveau/bar/gk20a: Avoid bar teardown during init
  2018-01-04 11:29 [PATCH] drm/nouveau/bar/gk20a: Avoid bar teardown during init Jon Hunter
@ 2018-01-10 12:20 ` Thierry Reding
  2018-01-17  9:27   ` Guillaume Tucker
  0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2018-01-10 12:20 UTC (permalink / raw)
  To: Jon Hunter
  Cc: David Airlie, nouveau, linux-kernel, dri-devel, Ben Skeggs,
	Guillaume Tucker


[-- Attachment #1.1: Type: text/plain, Size: 1589 bytes --]

On Thu, Jan 04, 2018 at 11:29:09AM +0000, Jon Hunter wrote:
> Commit bbb163e18960 ("drm/nouveau/bar: implement bar1 teardown")
> introduced add a teardown helper function for BAR1. During
> initialisation of the Nouveau, initially all the teardown helpers are
> called once, before calling their init counterparts. For gk20a, after
> the BAR1 teardown function is called, the device is hanging during the
> initialisation of the FB sub-device. At this point it is unclear why
> this is happening and this is still under investigation. However, this
> change is preventing Tegra124 devices from booting when Nouveau is
> enabled. To allow Tegra124 to boot, remove the teardown helper for
> gk20a.
> 
> This is based upon a previous patch by Guillaume Tucker but limits
> the workaround to only gk20a GPUs.
> 
> Fixes: bbb163e18960 ("drm/nouveau/bar: implement bar1 teardown")
> Reported-by: Guillaume Tucker <guillaume.tucker@collabora.com>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
> I am not happy that we do not yet fully understand the cause of
> the hang, but I am talking with a few people at NVIDIA about this
> and have a few things to look into. However, given that we are
> close to v4.15 being released and I am not sure we will have a
> proper fix in place before, I think it is best to workaround
> this for now.
> 
>  drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c  | 3 ++-
>  drivers/gpu/drm/nouveau/nvkm/subdev/bar/gk20a.c | 1 -
>  2 files changed, 2 insertions(+), 2 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
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: [Nouveau] [PATCH] drm/nouveau/bar/gk20a: Avoid bar teardown during init
  2018-01-10 12:20 ` [Nouveau] " Thierry Reding
@ 2018-01-17  9:27   ` Guillaume Tucker
  0 siblings, 0 replies; 3+ messages in thread
From: Guillaume Tucker @ 2018-01-17  9:27 UTC (permalink / raw)
  To: Thierry Reding, Jon Hunter
  Cc: Ben Skeggs, David Airlie, nouveau, linux-kernel, dri-devel

On 10/01/18 12:20, Thierry Reding wrote:
> On Thu, Jan 04, 2018 at 11:29:09AM +0000, Jon Hunter wrote:
>> Commit bbb163e18960 ("drm/nouveau/bar: implement bar1 teardown")
>> introduced add a teardown helper function for BAR1. During
>> initialisation of the Nouveau, initially all the teardown helpers are
>> called once, before calling their init counterparts. For gk20a, after
>> the BAR1 teardown function is called, the device is hanging during the
>> initialisation of the FB sub-device. At this point it is unclear why
>> this is happening and this is still under investigation. However, this
>> change is preventing Tegra124 devices from booting when Nouveau is
>> enabled. To allow Tegra124 to boot, remove the teardown helper for
>> gk20a.
>>
>> This is based upon a previous patch by Guillaume Tucker but limits
>> the workaround to only gk20a GPUs.
>>
>> Fixes: bbb163e18960 ("drm/nouveau/bar: implement bar1 teardown")
>> Reported-by: Guillaume Tucker <guillaume.tucker@collabora.com>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
>> I am not happy that we do not yet fully understand the cause of
>> the hang, but I am talking with a few people at NVIDIA about this
>> and have a few things to look into. However, given that we are
>> close to v4.15 being released and I am not sure we will have a
>> proper fix in place before, I think it is best to workaround
>> this for now.
>>
>>   drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c  | 3 ++-
>>   drivers/gpu/drm/nouveau/nvkm/subdev/bar/gk20a.c | 1 -
>>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Acked-by: Thierry Reding <treding@nvidia.com>

Tested-by: Guillaume Tucker <guillaume.tucker@collabora.com>

   https://lava.collabora.co.uk/scheduler/job/1047172

Thanks for this workaround.  Looking forward to having this
platform back on track in mainline.  I'm happy to run this boot
test again with a proper fix in future patches, let me know if I
can be of any help.

Guillaume

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

end of thread, other threads:[~2018-01-17  9:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-04 11:29 [PATCH] drm/nouveau/bar/gk20a: Avoid bar teardown during init Jon Hunter
2018-01-10 12:20 ` [Nouveau] " Thierry Reding
2018-01-17  9:27   ` Guillaume Tucker

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).