All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau/mmu/nv4a: use nv04 mmu rather than the nv44 one
@ 2017-03-18 20:23 ` Ilia Mirkin
  0 siblings, 0 replies; 4+ messages in thread
From: Ilia Mirkin @ 2017-03-18 20:23 UTC (permalink / raw)
  To: Ben Skeggs, Dave Airlie; +Cc: dri-devel, nouveau, linux-kernel, Ilia Mirkin

The NV4A (aka NV44A) is an oddity in the family. It only comes in AGP
and PCI varieties, rather than a core PCIE chip with a bridge for
AGP/PCI as necessary. As a result, it appears that the MMU is also
non-functional. For AGP cards, the vast majority of the NV4A lineup,
this worked out since we force AGP cards to use the nv04 mmu. However
for PCI variants, this did not work.

Switching to the NV04 MMU makes it work like a charm. Thanks to mwk for
the suggestion. This should be a no-op for NV4A AGP boards, as they were
using it already.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70388
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: stable@vger.kernel.org
---

OK, so I'm not 100% sure about my claims, but I don't have the necessary
hardware to test it out. Right now, AGP nv41+ boards are getting the nv04
mmu, while PCI nv41+ boards are getting the PCIE one. Perhaps this works
for them, however such boards are rare, and I don't have one. Perhaps all
PCI boards should be routed to the nv04 mmu, not just the NV4A ones.

 drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
index 273562d..0fc41db 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
@@ -714,7 +714,7 @@ nv4a_chipset = {
 	.i2c = nv04_i2c_new,
 	.imem = nv40_instmem_new,
 	.mc = nv44_mc_new,
-	.mmu = nv44_mmu_new,
+	.mmu = nv04_mmu_new,
 	.pci = nv40_pci_new,
 	.therm = nv40_therm_new,
 	.timer = nv41_timer_new,
-- 
2.10.2

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

* [PATCH] drm/nouveau/mmu/nv4a: use nv04 mmu rather than the nv44 one
@ 2017-03-18 20:23 ` Ilia Mirkin
  0 siblings, 0 replies; 4+ messages in thread
From: Ilia Mirkin @ 2017-03-18 20:23 UTC (permalink / raw)
  To: Ben Skeggs, Dave Airlie; +Cc: nouveau, linux-kernel, dri-devel

The NV4A (aka NV44A) is an oddity in the family. It only comes in AGP
and PCI varieties, rather than a core PCIE chip with a bridge for
AGP/PCI as necessary. As a result, it appears that the MMU is also
non-functional. For AGP cards, the vast majority of the NV4A lineup,
this worked out since we force AGP cards to use the nv04 mmu. However
for PCI variants, this did not work.

Switching to the NV04 MMU makes it work like a charm. Thanks to mwk for
the suggestion. This should be a no-op for NV4A AGP boards, as they were
using it already.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70388
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: stable@vger.kernel.org
---

OK, so I'm not 100% sure about my claims, but I don't have the necessary
hardware to test it out. Right now, AGP nv41+ boards are getting the nv04
mmu, while PCI nv41+ boards are getting the PCIE one. Perhaps this works
for them, however such boards are rare, and I don't have one. Perhaps all
PCI boards should be routed to the nv04 mmu, not just the NV4A ones.

 drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
index 273562d..0fc41db 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
@@ -714,7 +714,7 @@ nv4a_chipset = {
 	.i2c = nv04_i2c_new,
 	.imem = nv40_instmem_new,
 	.mc = nv44_mc_new,
-	.mmu = nv44_mmu_new,
+	.mmu = nv04_mmu_new,
 	.pci = nv40_pci_new,
 	.therm = nv40_therm_new,
 	.timer = nv41_timer_new,
-- 
2.10.2

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

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

* Re: [PATCH] drm/nouveau/mmu/nv4a: use nv04 mmu rather than the nv44 one
  2017-03-18 20:23 ` Ilia Mirkin
  (?)
@ 2017-03-26 22:14 ` Ben Skeggs
  2017-03-26 22:20   ` Ilia Mirkin
  -1 siblings, 1 reply; 4+ messages in thread
From: Ben Skeggs @ 2017-03-26 22:14 UTC (permalink / raw)
  To: dri-devel

On 03/19/2017 06:23 AM, Ilia Mirkin wrote:
> The NV4A (aka NV44A) is an oddity in the family. It only comes in AGP
> and PCI varieties, rather than a core PCIE chip with a bridge for
> AGP/PCI as necessary. As a result, it appears that the MMU is also
> non-functional. For AGP cards, the vast majority of the NV4A lineup,
> this worked out since we force AGP cards to use the nv04 mmu. However
> for PCI variants, this did not work.
>
> Switching to the NV04 MMU makes it work like a charm. Thanks to mwk for
> the suggestion. This should be a no-op for NV4A AGP boards, as they were
> using it already.
This is probably fine for NV4A in that case (more below).

>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70388
> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
> Cc: stable@vger.kernel.org
> ---
>
> OK, so I'm not 100% sure about my claims, but I don't have the necessary
> hardware to test it out. Right now, AGP nv41+ boards are getting the nv04
> mmu, while PCI nv41+ boards are getting the PCIE one. Perhaps this works
> for them, however such boards are rare, and I don't have one. Perhaps all
> PCI boards should be routed to the nv04 mmu, not just the NV4A ones.
I wonder if it wouldn't be useful to also change the checks in nv41/nv44 
implementations to be "if (device->type != NVKM_DEVICE_PCIE ..." too?

Ben.

>
>  drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
> index 273562d..0fc41db 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
> @@ -714,7 +714,7 @@ nv4a_chipset = {
>  	.i2c = nv04_i2c_new,
>  	.imem = nv40_instmem_new,
>  	.mc = nv44_mc_new,
> -	.mmu = nv44_mmu_new,
> +	.mmu = nv04_mmu_new,
>  	.pci = nv40_pci_new,
>  	.therm = nv40_therm_new,
>  	.timer = nv41_timer_new,
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/nouveau/mmu/nv4a: use nv04 mmu rather than the nv44 one
  2017-03-26 22:14 ` Ben Skeggs
@ 2017-03-26 22:20   ` Ilia Mirkin
  0 siblings, 0 replies; 4+ messages in thread
From: Ilia Mirkin @ 2017-03-26 22:20 UTC (permalink / raw)
  To: Ben Skeggs; +Cc: dri-devel

On Sun, Mar 26, 2017 at 6:14 PM, Ben Skeggs <skeggsb@gmail.com> wrote:
> On 03/19/2017 06:23 AM, Ilia Mirkin wrote:
>>
>> The NV4A (aka NV44A) is an oddity in the family. It only comes in AGP
>> and PCI varieties, rather than a core PCIE chip with a bridge for
>> AGP/PCI as necessary. As a result, it appears that the MMU is also
>> non-functional. For AGP cards, the vast majority of the NV4A lineup,
>> this worked out since we force AGP cards to use the nv04 mmu. However
>> for PCI variants, this did not work.
>>
>> Switching to the NV04 MMU makes it work like a charm. Thanks to mwk for
>> the suggestion. This should be a no-op for NV4A AGP boards, as they were
>> using it already.
>
> This is probably fine for NV4A in that case (more below).
>
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70388
>> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
>> Cc: stable@vger.kernel.org
>> ---
>>
>> OK, so I'm not 100% sure about my claims, but I don't have the necessary
>> hardware to test it out. Right now, AGP nv41+ boards are getting the nv04
>> mmu, while PCI nv41+ boards are getting the PCIE one. Perhaps this works
>> for them, however such boards are rare, and I don't have one. Perhaps all
>> PCI boards should be routed to the nv04 mmu, not just the NV4A ones.
>
> I wonder if it wouldn't be useful to also change the checks in nv41/nv44
> implementations to be "if (device->type != NVKM_DEVICE_PCIE ..." too?

So ... mwk and I were talking about it, and we weren't sure. Were
there non-NV4A, non-IGP PCI boards? And if so, if it's a PCIE <-> PCI
thing that translates the bus transactions, the GPU-side MMU should
still be there, no? (Is there anything PCIE-specific going on?) In
case you can't tell, I'm well past the edge of my understanding of how
all this works...

Perhaps you could check if you have such a board, or if they're purely
mythical? If such boards do exist, see what happens when you plug it
in and boot nouveau with it. My issues with NV4A were immediate - the
fifo basically didn't initialize. If the boards are mythical, then we
can just change nv44/nv41 to check for != PCIE.

Cheers,

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

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

end of thread, other threads:[~2017-03-26 22:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-18 20:23 [PATCH] drm/nouveau/mmu/nv4a: use nv04 mmu rather than the nv44 one Ilia Mirkin
2017-03-18 20:23 ` Ilia Mirkin
2017-03-26 22:14 ` Ben Skeggs
2017-03-26 22:20   ` Ilia Mirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.