Danilo Krummrich
2018-Feb-05 01:22 UTC
[Nouveau] [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. Signed-off-by: Danilo Krummrich <danilokrummrich at dk-develop.de> --- drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c index f302d2b5782a..d2f9664afcf4 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c @@ -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" }, {} }; -- 2.14.1
Danilo Krummrich
2018-Feb-05 01:22 UTC
[Nouveau] [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. Signed-off-by: Danilo Krummrich <danilokrummrich at dk-develop.de> --- 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(-) diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h index 560265b15ec2..d384cb03ad85 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h @@ -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 { diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c index be9e7f8c3b23..47303bdb7ee0 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.c @@ -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); } -- 2.14.1
Danilo Krummrich
2018-Feb-05 01:22 UTC
[Nouveau] [PATCH 3/3] drm/nouveau/pci: SOR crossbar quirk for 10b0:1b81
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. Signed-off-by: Danilo Krummrich <danilokrummrich at dk-develop.de> --- drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c index d2f9664afcf4..29de270f2232 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c @@ -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
Ben Skeggs
2018-Feb-05 01:37 UTC
[Nouveau] [PATCH 3/3] drm/nouveau/pci: SOR crossbar quirk for 10b0:1b81
On 5 February 2018 at 11:22, Danilo Krummrich <danilokrummrich at dk-develop.de> wrote:> 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.> > Therefore to work around this issue skip crossbar routing for this > particular macro link and instead use identity mapping. > > Signed-off-by: Danilo Krummrich <danilokrummrich at dk-develop.de> > --- > drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c > index d2f9664afcf4..29de270f2232 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c > +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c > @@ -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 > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau
Apparently Analagous Threads
- [PATCH v2 2/3] drm/nouveau/disp: quirk for SOR crossbar routing
- [PATCH 2/2] drm/nouveau/kms: Add INHERIT ioctl to nvkm/nvif for reading IOR state
- [PATCH v2 1/3] drm/nouveau/pci: PCI IDs for pascal architecture
- [PATCH 1/3] drm/nouveau/pci: PCI IDs for pascal architecture
- [PATCH 0/1] drm/nouveau/disp: prefer identity-mapped route of SOR <-> macro link