Skip to contentSkip to conversation

drm/nouveau/pci: PCI IDs for pascal architecture

PATCH In review Danilo Krummrich 5 participants 8 messages Feb 5, 2018 4 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 drm/nouveau/pci: PCI IDs for pascal architecture

Taken from NVIDIA binary driver (Linux 64-bit, revision 390.25) from README.txt.

---
 drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 41 ++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +41 -0
index f302d2b5782a..d2f9664afcf4 100644
@@ -1551,6 +1551,47 @@ nvkm_device_pci_10de[] = {
 	{ 0x17c2, "GeForce GTX TITAN X" },
 	{ 0x17c8, "GeForce GTX 980 Ti" },
 	{ 0x17f0, "Quadro M6000" },
+	{ 0x1b00, "TITAN X (Pascal)" },
+	{ 0x1b02, "TITAN Xp" },
+	{ 0x1b06, "GeForce GTX 1080 TI" },
+	{ 0x1bb7, "Quadro P6000" },
+	{ 0x1b80, "GeForce GTX 1080" },
+	{ 0x1b81, "GeForce GTX 1070" },
+	{ 0x1b82, "GeForce GTX 1070 TI" },
+	{ 0x1b84, "GeForce GTX 1060 3GB" },
+	{ 0x1b87, "P104-100" },
+	{ 0x1ba0, "GeForce GTX 1080M" },
+	{ 0x1ba1, "GeForce GTX 1070M" },
+	{ 0x1bb0, "Quadro P5000" },
+	{ 0x1bb1, "Quadro P4000" },
+	{ 0x1bb6, "Quadro P5000" },
+	{ 0x1bb7, "Quadro P4000" },
+	{ 0x1bb8, "Quadro P3000" },
+	{ 0x1be0, "GeForce GTX 1080M" },
+	{ 0x1be1, "GeForce GTX 1070M" },
+	{ 0x1bc7, "P104-101" },
+	{ 0x1c02, "GeForce GTX 1060 3GB" },
+	{ 0x1c03, "GeForce GTX 1060 6GB" },
+	{ 0x1c04, "GeForce GTX 1050 5GB" },
+	{ 0x1c06, "GeForce GTX 1050 6GB" },
+	{ 0x1c07, "P106-100" },
+	{ 0x1c09, "P106-090" },
+	{ 0x1c20, "GeForce GTX 1060M" },
+	{ 0x1c21, "GeForce GTX 1050M TI" },
+	{ 0x1c22, "GeForce GTX 1050M" },
+	{ 0x1c30, "Quadro P2000" },
+	{ 0x1c60, "GeForce GTX 1060M 6GB" },
+	{ 0x1c61, "GeForce GTX 1050M TI" },
+	{ 0x1c81, "GeForce GTX 1050" },
+	{ 0x1c82, "GeForce GTX 1050 TI" },
+	{ 0x1c8c, "GeForce GTX 1050M TI" },
+	{ 0x1c8d, "GeForce GTX 1050M" },
+	{ 0x1cb1, "Quadro P2000" },
+	{ 0x1cb2, "Quadro P600" },
+	{ 0x1cb3, "Quadro P400" },
+	{ 0x1d01, "GeForce GT 1030" },
+	{ 0x1d10, "GeForce MX 150" },
+	{ 0x1d12, "GeForce MX 150" },
 	{}
 };
 
Signature · 6 lines
2.14.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): 20180205012256.2198-1-danilokrummrich-q2z19idT6fYRctDU1SCqIg@public.gmane.org

#2 lore raw

PATCH 2/3 drm/nouveau/disp: quirk for SOR crossbar routing

With DCB 4.1 implemented by VBIOS since GM20x GPUs, SOR crossbar routing should be possible, such that any SOR sublink can drive any macro link.

Unfortunately, there's at least one card where some SOR sublinks being connected to a particular macro link are causing failures.

To work around this issue, supply a quirk for such cards which prevents a dynamic mapping of SOR sublink and macro link and instead relies on identity mapping.

---
 drivers/gpu/drm/nouveau/include/nvkm/core/device.h |  1 +
 drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c    | 18 ++++++++++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)
drivers/gpu/drm/nouveau/include/nvkm/core/device.h +1 -0
index 560265b15ec2..d384cb03ad85 100644
@@ -184,6 +184,7 @@ struct nvkm_device_func {
 struct nvkm_device_quirk {
 	u8 tv_pin_mask;
 	u8 tv_gpio;
+	u8 outp_links_skip;
 };
 
 struct nvkm_device_chip {
drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c +16 -2
index be9e7f8c3b23..47303bdb7ee0 100644
@@ -99,6 +99,17 @@ nvkm_outp_release(struct nvkm_outp *outp, u8 user)
 	}
 }
 
+static inline bool
+nvkm_outp_ior_route_quirk(struct nvkm_outp *outp)
+{
+	struct nvkm_device *dev = outp->disp->engine.subdev.device;
+
+	if (unlikely(dev->quirk))
+		return !(dev->quirk->outp_links_skip & BIT(outp->index));
+
+	return true;
+}
+
 static inline int
 nvkm_outp_acquire_ior(struct nvkm_outp *outp, u8 user, struct nvkm_ior *ior)
 {
@@ -115,6 +126,7 @@ nvkm_outp_acquire(struct nvkm_outp *outp, u8 user)
 	struct nvkm_ior *ior = outp->ior;
 	enum nvkm_ior_proto proto;
 	enum nvkm_ior_type type;
+	bool route_crossbar = nvkm_outp_ior_route_quirk(outp);
 
 	OUTP_TRACE(outp, "acquire %02x |= %02x %p", outp->acquired, user, ior);
 	if (ior) {
@@ -138,7 +150,8 @@ nvkm_outp_acquire(struct nvkm_outp *outp, u8 user)
 	/* Failing that, a completely unused OR is the next best thing. */
 	list_for_each_entry(ior, &outp->disp->ior, head) {
 		if (!ior->asy.outp && ior->type == type && !ior->arm.outp &&
-		    (ior->func->route.set || ior->id == __ffs(outp->info.or)))
+		    ((ior->func->route.set && route_crossbar) ||
+		     ior->id == __ffs(outp->info.or)))
 			return nvkm_outp_acquire_ior(outp, user, ior);
 	}
 
@@ -147,7 +160,8 @@ nvkm_outp_acquire(struct nvkm_outp *outp, u8 user)
 	 */
 	list_for_each_entry(ior, &outp->disp->ior, head) {
 		if (!ior->asy.outp && ior->type == type &&
-		    (ior->func->route.set || ior->id == __ffs(outp->info.or)))
+		    ((ior->func->route.set && route_crossbar) ||
+		     ior->id == __ffs(outp->info.or)))
 			return nvkm_outp_acquire_ior(outp, user, ior);
 	}
 
Signature · 6 lines
2.14.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
#3 lore raw

PATCH 3/3 drm/nouveau/pci: SOR crossbar quirk for 10b0:1b81

In reply to Danilo Krummrich

On Gainward GTX 1070 routing any other SOR than SOR-1 to macro link 'G' (outp index 7) causes failures:

[    6.712111] nouveau 0000:01:00.0: bus: MMIO read of 00000000 FAULT at 61c880 [ IBUS ]
[    6.724888] nouveau 0000:01:00.0: disp: intr24 80000000
[    8.716668] nouveau 0000:01:00.0: DRM: base-0: timeout
[   10.716679] nouveau 0000:01:00.0: DRM: base-1: timeout
[   63.511862] nouveau 0000:01:00.0: DRM: EVO timeout

As I'm not able to spot an issue in the driver, I suppose it's firmware related.

Therefore to work around this issue skip crossbar routing for this particular macro link and instead use identity mapping.

---
 drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +8 -1
index d2f9664afcf4..29de270f2232 100644
@@ -797,6 +797,13 @@ nvkm_device_pci_10de_139b[] = {
 	{}
 };
 
+static const struct nvkm_device_pci_vendor
+nvkm_device_pci_10de_1b81[] = {
+	/* Gainward GTX 1070 8192 MB */
+	{ 0x10b0, 0x1b81, "GeForce GTX 1070",{ .outp_links_skip = BIT(7) } },
+	{}
+};
+
 static const struct nvkm_device_pci_device
 nvkm_device_pci_10de[] = {
 	{ 0x0020, "RIVA TNT" },
@@ -1556,7 +1563,7 @@ nvkm_device_pci_10de[] = {
 	{ 0x1b06, "GeForce GTX 1080 TI" },
 	{ 0x1bb7, "Quadro P6000" },
 	{ 0x1b80, "GeForce GTX 1080" },
-	{ 0x1b81, "GeForce GTX 1070" },
+	{ 0x1b81, "GeForce GTX 1070", nvkm_device_pci_10de_1b81 },
 	{ 0x1b82, "GeForce GTX 1070 TI" },
 	{ 0x1b84, "GeForce GTX 1060 3GB" },
 	{ 0x1b87, "P104-100" },
Signature · 6 lines
2.14.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

Re: [Nouveau] [PATCH 3/3] drm/nouveau/pci: SOR crossbar quirk for 10b0:1b81

Quoted 11 lines · Danilo Krummrich

On Gainward GTX 1070 routing any other SOR than SOR-1 to macro link 'G' (outp index 7) causes failures:

[    6.712111] nouveau 0000:01:00.0: bus: MMIO read of 00000000 FAULT at 61c880 [ IBUS ]
[    6.724888] nouveau 0000:01:00.0: disp: intr24 80000000
[    8.716668] nouveau 0000:01:00.0: DRM: base-0: timeout
[   10.716679] nouveau 0000:01:00.0: DRM: base-1: timeout
[   63.511862] nouveau 0000:01:00.0: DRM: EVO timeout

As I'm not able to spot an issue in the driver, I suppose it's firmware related.

Are you able to mail me /dev/dri/card0/vbios.rom from that, please? I'd like to look into this some more and be 100% certain this is indeed a quirk, and not some subtle driver bug.

Thanks,
Ben.

Quoted 39 lines

Therefore to work around this issue skip crossbar routing for this particular macro link and instead use identity mapping.

---
 drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +8 -2
index d2f9664afcf4..29de270f2232 100644
@@ -797,6 +797,13 @@ nvkm_device_pci_10de_139b[] = {
        {}
 };
 
+static const struct nvkm_device_pci_vendor
+nvkm_device_pci_10de_1b81[] = {
+       /* Gainward GTX 1070 8192 MB */
+       { 0x10b0, 0x1b81, "GeForce GTX 1070",{ .outp_links_skip = BIT(7) } },
+       {}
+};
+
 static const struct nvkm_device_pci_device
 nvkm_device_pci_10de[] = {
        { 0x0020, "RIVA TNT" },
@@ -1556,7 +1563,7 @@ nvkm_device_pci_10de[] = {
        { 0x1b06, "GeForce GTX 1080 TI" },
        { 0x1bb7, "Quadro P6000" },
        { 0x1b80, "GeForce GTX 1080" },
-       { 0x1b81, "GeForce GTX 1070" },
+       { 0x1b81, "GeForce GTX 1070", nvkm_device_pci_10de_1b81 },
        { 0x1b82, "GeForce GTX 1070 TI" },
        { 0x1b84, "GeForce GTX 1060 3GB" },
        { 0x1b87, "P104-100" },
--

2.14.1

Quoted 4 lines

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): CACAvsv6svP0jGHsJ09m_fHLR8DddmPf7oWHoLbzMjQi87Sy0cA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#6 lore raw

Re: [PATCH 3/3] drm/nouveau/pci: SOR crossbar quirk for 10b0:1b81

Quoted 11 lines · Ben Skeggs
Quoted 9 lines · Danilo Krummrich

On Gainward GTX 1070 routing any other SOR than SOR-1 to macro link 'G' (outp index 7) causes failures:

[    6.712111] nouveau 0000:01:00.0: bus: MMIO read of 00000000 FAULT at 61c880 [ IBUS ]
[    6.724888] nouveau 0000:01:00.0: disp: intr24 80000000
[    8.716668] nouveau 0000:01:00.0: DRM: base-0: timeout
[   10.716679] nouveau 0000:01:00.0: DRM: base-1: timeout
[   63.511862] nouveau 0000:01:00.0: DRM: EVO timeout
Quoted 5 lines
Quoted 2 lines

As I'm not able to spot an issue in the driver, I suppose it's firmware related.

Are you able to mail me /dev/dri/card0/vbios.rom from that, please? I'd like to look into this some more and be 100% certain this is indeed a quirk, and not some subtle driver bug.

Err.. /sys/kernel/debug/dri/0/vbios.rom rather ;)

Quoted 43 lines

Thanks,
Ben.

Quoted 39 lines

Therefore to work around this issue skip crossbar routing for this particular macro link and instead use identity mapping.

---
 drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +8 -2
index d2f9664afcf4..29de270f2232 100644
@@ -797,6 +797,13 @@ nvkm_device_pci_10de_139b[] = {
        {}
 };
 
+static const struct nvkm_device_pci_vendor
+nvkm_device_pci_10de_1b81[] = {
+       /* Gainward GTX 1070 8192 MB */
+       { 0x10b0, 0x1b81, "GeForce GTX 1070",{ .outp_links_skip = BIT(7) } },
+       {}
+};
+
 static const struct nvkm_device_pci_device
 nvkm_device_pci_10de[] = {
        { 0x0020, "RIVA TNT" },
@@ -1556,7 +1563,7 @@ nvkm_device_pci_10de[] = {
        { 0x1b06, "GeForce GTX 1080 TI" },
        { 0x1bb7, "Quadro P6000" },
        { 0x1b80, "GeForce GTX 1080" },
-       { 0x1b81, "GeForce GTX 1070" },
+       { 0x1b81, "GeForce GTX 1070", nvkm_device_pci_10de_1b81 },
        { 0x1b82, "GeForce GTX 1070 TI" },
        { 0x1b84, "GeForce GTX 1060 3GB" },
        { 0x1b87, "P104-100" },
--

2.14.1

Quoted 4 lines
Quoted 4 lines

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): CACAvsv5uV8CpZ8FT-V80DHefLLXkLoLmcbT+6tjo_0zPTqiF0g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#8 lore raw

Re: [PATCH 3/3] drm/nouveau/pci: SOR crossbar quirk for 10b0:1b81

Quoted 12 lines · Ben Skeggs
Quoted 11 lines · Ben Skeggs
Quoted 9 lines · Danilo Krummrich

On Gainward GTX 1070 routing any other SOR than SOR-1 to macro link 'G' (outp index 7) causes failures:

[    6.712111] nouveau 0000:01:00.0: bus: MMIO read of 00000000 FAULT at 61c880 [ IBUS ]
[    6.724888] nouveau 0000:01:00.0: disp: intr24 80000000
[    8.716668] nouveau 0000:01:00.0: DRM: base-0: timeout
[   10.716679] nouveau 0000:01:00.0: DRM: base-1: timeout
[   63.511862] nouveau 0000:01:00.0: DRM: EVO timeout
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

As I'm not able to spot an issue in the driver, I suppose it's firmware related.

Are you able to mail me /dev/dri/card0/vbios.rom from that, please? I'd like to look into this some more and be 100% certain this is indeed a quirk, and not some subtle driver bug.

Err.. /sys/kernel/debug/dri/0/vbios.rom rather ;)

Sure, that makes sense definitely, as I have checked gm200_sor_route_set and gm200_sor_route_get only to conform to the statements in this mail thread:
https://lists.freedesktop.org/archives/nouveau/2014-December/019408.html

BTW, I can reproduce the problem with a two monitor setup only, as (of course) having one monitor only at the physical port macro link 'G' is attached to makes to vbios pick the working SOR. Therefore the physical port macro link 'G' is attached to must not be picked as primary monitor.

Also, may I ask you a related question: I was a bit confused why 'link' is completely unused in nvkm_outp_init_route() after gm200_sor_route_get() returns. Is this just obsolete or intended to use in the future somehow?

Thanks,
Danilo

Quoted 44 lines
Quoted 44 lines

Thanks,
Ben.

Quoted 40 lines

Therefore to work around this issue skip crossbar routing for this particular macro link and instead use identity mapping.

---
 drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +7 -0
index d2f9664afcf4..29de270f2232 100644
@@ -797,6 +797,13 @@ nvkm_device_pci_10de_139b[] = {
        {}
 };
 
+static const struct nvkm_device_pci_vendor
+nvkm_device_pci_10de_1b81[] = {
+       /* Gainward GTX 1070 8192 MB */
+       { 0x10b0, 0x1b81, "GeForce GTX 1070",{ .outp_links_skip = 
 BIT(7) } },
+       {}
+};
+
 static const struct nvkm_device_pci_device
 nvkm_device_pci_10de[] = {
        { 0x0020, "RIVA TNT" },
drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +1 -2
@@ -1556,7 +1563,7 @@ nvkm_device_pci_10de[] = {
        { 0x1b06, "GeForce GTX 1080 TI" },
        { 0x1bb7, "Quadro P6000" },
        { 0x1b80, "GeForce GTX 1080" },
-       { 0x1b81, "GeForce GTX 1070" },
+       { 0x1b81, "GeForce GTX 1070", nvkm_device_pci_10de_1b81 },
        { 0x1b82, "GeForce GTX 1070 TI" },
        { 0x1b84, "GeForce GTX 1060 3GB" },
        { 0x1b87, "P104-100" },
--

2.14.1

Quoted 8 lines
Quoted 4 lines
Quoted 4 lines

_______________________________________________
Nouveau mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#9 lore raw

Re: [Nouveau] [PATCH 3/3] drm/nouveau/pci: SOR crossbar quirk for 10b0:1b81

Quoted 30 lines · Danilo Krummrich
Quoted 16 lines · Ben Skeggs
Quoted 14 lines · Ben Skeggs
Quoted 11 lines · Danilo Krummrich

On Gainward GTX 1070 routing any other SOR than SOR-1 to macro link 'G' (outp index 7) causes failures:

[    6.712111] nouveau 0000:01:00.0: bus: MMIO read of 00000000 FAULT at
61c880 [ IBUS ]
[    6.724888] nouveau 0000:01:00.0: disp: intr24 80000000
[    8.716668] nouveau 0000:01:00.0: DRM: base-0: timeout
[   10.716679] nouveau 0000:01:00.0: DRM: base-1: timeout
[   63.511862] nouveau 0000:01:00.0: DRM: EVO timeout
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

As I'm not able to spot an issue in the driver, I suppose it's firmware related.

Are you able to mail me /dev/dri/card0/vbios.rom from that, please? I'd like to look into this some more and be 100% certain this is indeed a quirk, and not some subtle driver bug.

Err.. /sys/kernel/debug/dri/0/vbios.rom rather ;)

Sure, that makes sense definitely, as I have checked gm200_sor_route_set and gm200_sor_route_get only to conform to the statements in this mail thread:
https://lists.freedesktop.org/archives/nouveau/2014-December/019408.html

Quoted 7 lines

BTW, I can reproduce the problem with a two monitor setup only, as (of course) having one
monitor only at the physical port macro link 'G' is attached to makes to vbios pick the
working SOR. Therefore the physical port macro link 'G' is attached to must not be picked
as primary monitor.

Thanks for that. I've only had a quick look so far, but I'm going to guess the is a driver bug already. The DCB specifies two different outputs on pad macro 1 (which, would be SOR1 if identity-mapped) that can apparently be used together. If used at the same time though, they both can't be driven by the same SOR, and would need routing.

I guess it'd be interesting to see if NVIDIA can manage to drive those two outputs together, which would be a big hint as to whether the board is buggy, or we are. I'm going to guess the latter ;)

Quoted 6 lines

Also, may I ask you a related question: I was a bit confused why 'link' is completely unused
in nvkm_outp_init_route() after gm200_sor_route_get() returns. Is this just obsolete or
intended to use in the future somehow?

I suspect it's a left-over from an earlier revision of that code, or perhaps I intended to validate it against what we discovered? Not sure now!

Thanks,
Ben.

Quoted 58 lines

Thanks,
Danilo

Quoted 54 lines
Quoted 45 lines

Thanks,
Ben.

Quoted 41 lines

Therefore to work around this issue skip crossbar routing for this particular macro link and instead use identity mapping.

---
 drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +7 -0
index d2f9664afcf4..29de270f2232 100644
@@ -797,6 +797,13 @@ nvkm_device_pci_10de_139b[] = {
        {}
 };
 
+static const struct nvkm_device_pci_vendor
+nvkm_device_pci_10de_1b81[] = {
+       /* Gainward GTX 1070 8192 MB */
+       { 0x10b0, 0x1b81, "GeForce GTX 1070",{ .outp_links_skip = BIT(7)
 } },
+       {}
+};
+
 static const struct nvkm_device_pci_device
 nvkm_device_pci_10de[] = {
        { 0x0020, "RIVA TNT" },
drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +1 -2
@@ -1556,7 +1563,7 @@ nvkm_device_pci_10de[] = {
        { 0x1b06, "GeForce GTX 1080 TI" },
        { 0x1bb7, "Quadro P6000" },
        { 0x1b80, "GeForce GTX 1080" },
-       { 0x1b81, "GeForce GTX 1070" },
+       { 0x1b81, "GeForce GTX 1070", nvkm_device_pci_10de_1b81 },
        { 0x1b82, "GeForce GTX 1070 TI" },
        { 0x1b84, "GeForce GTX 1060 3GB" },
        { 0x1b87, "P104-100" },
--

2.14.1

Quoted 4 lines
Quoted 4 lines

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): CABDvA=kuMrzhQOhhuNAdQ25XNMhk+HVenFLMu3tZQnvGPien1A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#11 lore raw

Re: [PATCH 3/3] drm/nouveau/pci: SOR crossbar quirk for 10b0:1b81

Quoted 39 lines · Ben Skeggs
Quoted 30 lines · Danilo Krummrich
Quoted 16 lines · Ben Skeggs
Quoted 14 lines · Ben Skeggs
Quoted 11 lines · Danilo Krummrich

On Gainward GTX 1070 routing any other SOR than SOR-1 to macro link 'G' (outp index 7) causes failures:

[    6.712111] nouveau 0000:01:00.0: bus: MMIO read of 00000000 FAULT at
61c880 [ IBUS ]
[    6.724888] nouveau 0000:01:00.0: disp: intr24 80000000
[    8.716668] nouveau 0000:01:00.0: DRM: base-0: timeout
[   10.716679] nouveau 0000:01:00.0: DRM: base-1: timeout
[   63.511862] nouveau 0000:01:00.0: DRM: EVO timeout
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

As I'm not able to spot an issue in the driver, I suppose it's firmware related.

Are you able to mail me /dev/dri/card0/vbios.rom from that, please? I'd like to look into this some more and be 100% certain this is indeed a quirk, and not some subtle driver bug.

Err.. /sys/kernel/debug/dri/0/vbios.rom rather ;)

Sure, that makes sense definitely, as I have checked gm200_sor_route_set and gm200_sor_route_get only to conform to the statements in this mail thread:
https://lists.freedesktop.org/archives/nouveau/2014-December/019408.html

Quoted 7 lines

BTW, I can reproduce the problem with a two monitor setup only, as (of course) having one
monitor only at the physical port macro link 'G' is attached to makes to vbios pick the
working SOR. Therefore the physical port macro link 'G' is attached to must not be picked
as primary monitor.

Quoted 3 lines

Thanks for that. I've only had a quick look so far, but I'm going to guess the is a driver bug already. The DCB specifies two different outputs on pad macro 1 (which, would be SOR1 if identity-mapped) that

First of all, sorry for confusing with the macro link numeration. Of course, I am talking about pad macro 1, link 2 (which is also called macro link D). I was wrongly looking at outp->index.
I will send an updated patch series correcting this, just in case.

Quoted 2 lines

can apparently be used together. If used at the same time though, they both can't be driven by the same SOR, and would need routing.

I agree that there's definitely the need of routing here. Anyway, it can still be it's just buggy in a way that only macro link D cannot be routed to a different SOR than SOR-1. Probably you know better, if such a case can be possible.

Quoted 4 lines

I guess it'd be interesting to see if NVIDIA can manage to drive those two outputs together, which would be a big hint as to whether the board is buggy, or we are. I'm going to guess the latter ;)

I tested that - even nouveau is able to drive macro link C and D together. Macro link C corresponds to connector 3 (which is HDMI) and macro link D corresponds to connector 4 (which is DP). And it actually works because VBIOS serves macro link D as primary OR and routes SOR-1 to it already. Nouveau picks (of course) SOR-0 for macro link C then.
BTW, any other combination works well, as long as macro link D (if used) is not routed to another SOR than SOR-1. E.g. macro link A on SOR-2 and macro link E on either SOR-0 or SOR-3.

Quoted 72 lines
Quoted 6 lines

Also, may I ask you a related question: I was a bit confused why 'link' is completely unused
in nvkm_outp_init_route() after gm200_sor_route_get() returns. Is this just obsolete or
intended to use in the future somehow?

I suspect it's a left-over from an earlier revision of that code, or perhaps I intended to validate it against what we discovered? Not sure now!

Thanks,
Ben.

Quoted 59 lines

Thanks,
Danilo

Quoted 55 lines
Quoted 46 lines

Thanks,
Ben.

Quoted 42 lines

Therefore to work around this issue skip crossbar routing for this particular macro link and instead use identity mapping.

---
 drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +7 -0
index d2f9664afcf4..29de270f2232 100644
@@ -797,6 +797,13 @@ nvkm_device_pci_10de_139b[] = {
        {}
 };
 
+static const struct nvkm_device_pci_vendor
+nvkm_device_pci_10de_1b81[] = {
+       /* Gainward GTX 1070 8192 MB */
+       { 0x10b0, 0x1b81, "GeForce GTX 1070",{ .outp_links_skip = 
 BIT(7)
 } },
+       {}
+};
+
 static const struct nvkm_device_pci_device
 nvkm_device_pci_10de[] = {
        { 0x0020, "RIVA TNT" },
drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +1 -2
@@ -1556,7 +1563,7 @@ nvkm_device_pci_10de[] = {
        { 0x1b06, "GeForce GTX 1080 TI" },
        { 0x1bb7, "Quadro P6000" },
        { 0x1b80, "GeForce GTX 1080" },
-       { 0x1b81, "GeForce GTX 1070" },
+       { 0x1b81, "GeForce GTX 1070", nvkm_device_pci_10de_1b81 },
        { 0x1b82, "GeForce GTX 1070 TI" },
        { 0x1b84, "GeForce GTX 1060 3GB" },
        { 0x1b87, "P104-100" },
--

2.14.1

Quoted 4 lines
Quoted 4 lines

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau