drm/nouveau: use different register to wait for secret scrubber
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Sat, 12 Jan 2013 12:03:16 +0000 (13:03 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 31 Jan 2013 05:59:57 +0000 (15:59 +1000)
Fixes long delay when waiting for scrubber on some secret engines.
The exit interrupt seems to not always be generated, so use secret
scrubber active register instead.

Later fuc engines also no longer generate an interrupt, so don't wait
there.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/core/falcon.c

index 6b0843c338775d6455322a099f568a4390d8db64..e05c15777588616f69b753e915c7c8bcb59a922f 100644 (file)
@@ -73,8 +73,11 @@ _nouveau_falcon_init(struct nouveau_object *object)
        nv_debug(falcon, "data limit: %d\n", falcon->data.limit);
 
        /* wait for 'uc halted' to be signalled before continuing */
-       if (falcon->secret) {
-               nv_wait(falcon, 0x008, 0x00000010, 0x00000010);
+       if (falcon->secret && falcon->version < 4) {
+               if (!falcon->version)
+                       nv_wait(falcon, 0x008, 0x00000010, 0x00000010);
+               else
+                       nv_wait(falcon, 0x180, 0x80000000, 0);
                nv_wo32(falcon, 0x004, 0x00000010);
        }