summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorMatthieu Castet <castet.matthieu@free.fr>2007-10-10 21:11:43 +0200
committerMatthieu Castet <castet.matthieu@free.fr>2007-10-10 21:11:43 +0200
commitbf126f4925bf1601935e085be2feeb004b474a05 (patch)
tree67db66db53f279ee3313a9daccde4198078ba36c /shared-core
parentd912709a63c59d0b3e48458bac41fb76ea279214 (diff)
nouveau : nv10 and nv04 PGRAPH_NSTATUS are different
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/nouveau_irq.c22
-rw-r--r--shared-core/nouveau_reg.h12
2 files changed, 25 insertions, 9 deletions
diff --git a/shared-core/nouveau_irq.c b/shared-core/nouveau_irq.c
index 506e8052..dfef718b 100644
--- a/shared-core/nouveau_irq.c
+++ b/shared-core/nouveau_irq.c
@@ -175,10 +175,18 @@ struct nouveau_bitfield_names
static struct nouveau_bitfield_names nouveau_nstatus_names[] =
{
- { NV03_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" },
- { NV03_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" },
- { NV03_PGRAPH_NSTATUS_BAD_ARGUMENT, "BAD_ARGUMENT" },
- { NV03_PGRAPH_NSTATUS_PROTECTION_FAULT, "PROTECTION_FAULT" }
+ { NV04_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" },
+ { NV04_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" },
+ { NV04_PGRAPH_NSTATUS_BAD_ARGUMENT, "BAD_ARGUMENT" },
+ { NV04_PGRAPH_NSTATUS_PROTECTION_FAULT, "PROTECTION_FAULT" }
+};
+
+static struct nouveau_bitfield_names nouveau_nstatus_names_nv10[] =
+{
+ { NV10_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" },
+ { NV10_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" },
+ { NV10_PGRAPH_NSTATUS_BAD_ARGUMENT, "BAD_ARGUMENT" },
+ { NV10_PGRAPH_NSTATUS_PROTECTION_FAULT, "PROTECTION_FAULT" }
};
static struct nouveau_bitfield_names nouveau_nsource_names[] =
@@ -317,8 +325,12 @@ nouveau_graph_dump_trap_info(struct drm_device *dev)
nouveau_print_bitfield_names(nsource, nouveau_nsource_names,
ARRAY_SIZE(nouveau_nsource_names));
printk(", nStatus:");
- nouveau_print_bitfield_names(nstatus, nouveau_nstatus_names,
+ if (dev_priv->card_type < NV_10)
+ nouveau_print_bitfield_names(nstatus, nouveau_nstatus_names,
ARRAY_SIZE(nouveau_nstatus_names));
+ else
+ nouveau_print_bitfield_names(nstatus, nouveau_nstatus_names_nv10,
+ ARRAY_SIZE(nouveau_nstatus_names_nv10));
printk("\n");
DRM_ERROR("Channel %d/%d (class 0x%04x) - Method 0x%04x, Data 0x%08x:0x%08x\n",
diff --git a/shared-core/nouveau_reg.h b/shared-core/nouveau_reg.h
index 76f5950d..4dc3b7fa 100644
--- a/shared-core/nouveau_reg.h
+++ b/shared-core/nouveau_reg.h
@@ -119,10 +119,14 @@
#define NV10_PGRAPH_DEBUG_4 0x00400090
#define NV03_PGRAPH_INTR 0x00400100
#define NV03_PGRAPH_NSTATUS 0x00400104
-# define NV03_PGRAPH_NSTATUS_STATE_IN_USE (1<<23)
-# define NV03_PGRAPH_NSTATUS_INVALID_STATE (1<<24)
-# define NV03_PGRAPH_NSTATUS_BAD_ARGUMENT (1<<25)
-# define NV03_PGRAPH_NSTATUS_PROTECTION_FAULT (1<<26)
+# define NV04_PGRAPH_NSTATUS_STATE_IN_USE (1<<11)
+# define NV04_PGRAPH_NSTATUS_INVALID_STATE (1<<12)
+# define NV04_PGRAPH_NSTATUS_BAD_ARGUMENT (1<<13)
+# define NV04_PGRAPH_NSTATUS_PROTECTION_FAULT (1<<14)
+# define NV10_PGRAPH_NSTATUS_STATE_IN_USE (1<<23)
+# define NV10_PGRAPH_NSTATUS_INVALID_STATE (1<<24)
+# define NV10_PGRAPH_NSTATUS_BAD_ARGUMENT (1<<25)
+# define NV10_PGRAPH_NSTATUS_PROTECTION_FAULT (1<<26)
#define NV03_PGRAPH_NSOURCE 0x00400108
# define NV03_PGRAPH_NSOURCE_NOTIFICATION (1<< 0)
# define NV03_PGRAPH_NSOURCE_DATA_ERROR (1<< 1)