drm/nouveau/fifo/nv84: support user event trigger
[cascardo/linux.git] / drivers / gpu / drm / nouveau / core / engine / fifo / nv04.c
index e34ab40..f877bd5 100644 (file)
@@ -28,6 +28,7 @@
 #include <core/namedb.h>
 #include <core/handle.h>
 #include <core/ramht.h>
+#include <core/event.h>
 
 #include <subdev/instmem.h>
 #include <subdev/instmem/nv04.h>
@@ -536,6 +537,12 @@ nv04_fifo_intr(struct nouveau_subdev *subdev)
                                status &= ~0x00000010;
                                nv_wr32(priv, 0x002100, 0x00000010);
                        }
+
+                       if (status & 0x40000000) {
+                               nouveau_event_trigger(priv->base.uevent, 0);
+                               nv_wr32(priv, 0x002100, 0x40000000);
+                               status &= ~0x40000000;
+                       }
                }
 
                if (status) {