]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/nvc0/copy: check PUNITS to determine which copy engines are disabled
authorBen Skeggs <bskeggs@redhat.com>
Mon, 27 Aug 2012 06:22:49 +0000 (16:22 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:39:41 +0000 (10:39 -0700)
commit 14f0458a41e033dee31ba605137419385c03fc78 upstream.

On some Fermi chipsets (NVCE particularly) PCOPY1 doesn't exist.  And if
what I've seen on Kepler is true of Fermi too, chipsets of the same type
can have different PCOPY units available.

This should fix a v3.5 regression reported by a number of people effecting
suspend/resume on NVC8/NVCE chipsets.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/nouveau/nouveau_state.c

index 19706f0532eac60deb973b0b994ad0065a04f980..22a90a005ba793f03000a8482aca7f2a9139f398 100644 (file)
@@ -737,9 +737,11 @@ nouveau_card_init(struct drm_device *dev)
                        }
                        break;
                case NV_C0:
-                       nvc0_copy_create(dev, 1);
+                       if (!(nv_rd32(dev, 0x022500) & 0x00000200))
+                               nvc0_copy_create(dev, 1);
                case NV_D0:
-                       nvc0_copy_create(dev, 0);
+                       if (!(nv_rd32(dev, 0x022500) & 0x00000100))
+                               nvc0_copy_create(dev, 0);
                        break;
                default:
                        break;