]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/nouveau/sw: trap and clear PMC_INTR_0_SOFTWARE
authorBen Skeggs <bskeggs@redhat.com>
Thu, 23 Aug 2012 05:14:21 +0000 (01:14 -0400)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 3 Oct 2012 03:13:07 +0000 (13:13 +1000)
Came in useful for debugging another issue earlier, so keep it around.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/engine/software/nv04.c
drivers/gpu/drm/nouveau/core/engine/software/nv10.c
drivers/gpu/drm/nouveau/core/engine/software/nv50.c
drivers/gpu/drm/nouveau/core/engine/software/nvc0.c
drivers/gpu/drm/nouveau/core/include/engine/software.h

index f48da7577cc6e9db9193834f44b639b8ed72da12..3ca4c3aa90b7eac50fa053c3b8c93154cfcf2ba9 100644 (file)
@@ -110,6 +110,12 @@ nv04_software_cclass = {
  * software engine/subdev functions
  ******************************************************************************/
 
+void
+nv04_software_intr(struct nouveau_subdev *subdev)
+{
+       nv_mask(subdev, 0x000100, 0x80000000, 0x00000000);
+}
+
 static int
 nv04_software_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
              struct nouveau_oclass *oclass, void *data, u32 size,
@@ -125,6 +131,7 @@ nv04_software_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
 
        nv_engine(priv)->cclass = &nv04_software_cclass;
        nv_engine(priv)->sclass = nv04_software_sclass;
+       nv_subdev(priv)->intr = nv04_software_intr;
        return 0;
 }
 
index 46dada53d272384e66e1ba530a7c5f5ca8a0ec83..6e699afbfdb7fc5a8a1c72ba1ff29f0ac77f5950 100644 (file)
@@ -113,6 +113,7 @@ nv10_software_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
 
        nv_engine(priv)->cclass = &nv10_software_cclass;
        nv_engine(priv)->sclass = nv10_software_sclass;
+       nv_subdev(priv)->intr = nv04_software_intr;
        return 0;
 }
 
index 6b889713480da141b6baba0a98a866a81e2bac19..a2edcd38544a5b705c53143d2369ef496f06650c 100644 (file)
@@ -183,6 +183,7 @@ nv50_software_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
 
        nv_engine(priv)->cclass = &nv50_software_cclass;
        nv_engine(priv)->sclass = nv50_software_sclass;
+       nv_subdev(priv)->intr = nv04_software_intr;
        return 0;
 }
 
index e3be78f3a5d8ed7e369a38bd027378dbe21ec887..b7b0d7e330d61409b48c34606ade622712812e37 100644 (file)
@@ -165,6 +165,7 @@ nvc0_software_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
 
        nv_engine(priv)->cclass = &nvc0_software_cclass;
        nv_engine(priv)->sclass = nvc0_software_sclass;
+       nv_subdev(priv)->intr = nv04_software_intr;
        return 0;
 }
 
index 8d740793cf8a81bb265f593078e20550a25c9c69..c945691c8564d0d0f05b13f16524c877ccdb1e91 100644 (file)
@@ -55,4 +55,6 @@ extern struct nouveau_oclass nv10_software_oclass;
 extern struct nouveau_oclass nv50_software_oclass;
 extern struct nouveau_oclass nvc0_software_oclass;
 
+void nv04_software_intr(struct nouveau_subdev *);
+
 #endif