summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <darktama@iinet.net.au>2006-10-17 23:44:05 +1100
committerBen Skeggs <darktama@iinet.net.au>2006-10-17 23:44:05 +1100
commit55de3f763f0de66b99f1afde9872f0072a84a9e3 (patch)
tree87f062e3086bb21d19e31fe55ff1a5f1dedc3a83
parent07059f427819755e13b051e1422c6e8671c70f92 (diff)
Useful output on a FIFO error interrupt.
-rw-r--r--shared-core/nouveau_irq.c17
-rw-r--r--shared-core/nouveau_object.c1
-rw-r--r--shared-core/nouveau_reg.h5
3 files changed, 22 insertions, 1 deletions
diff --git a/shared-core/nouveau_irq.c b/shared-core/nouveau_irq.c
index 086c064c..af6109e9 100644
--- a/shared-core/nouveau_irq.c
+++ b/shared-core/nouveau_irq.c
@@ -146,8 +146,25 @@ static void nouveau_fifo_irq_handler(drm_device_t *dev)
DRM_DEBUG("NV: PFIFO interrupt! Channel=%d, INTSTAT=0x%08x/MODE=0x%08x/PEND=0x%08x\n", channel, status, chmode, chstat);
if (status & NV_PFIFO_INTR_CACHE_ERROR) {
+ uint32_t c1get, c1method, c1data;
+
DRM_ERROR("NV: PFIFO error interrupt\n");
+ c1get = NV_READ(NV_PFIFO_CACH1_GET) >> 2;
+ if (dev_priv->card_type < NV_40) {
+ /* Untested, so it may not work.. */
+ c1method = NV_READ(NV_PFIFO_CACH1_METHOD(c1get));
+ c1data = NV_READ(NV_PFIFO_CACH1_DATA(c1get));
+ } else {
+ c1method = NV_READ(NV40_PFIFO_CACH1_METHOD(c1get));
+ c1data = NV_READ(NV40_PFIFO_CACH1_DATA(c1get));
+ }
+
+ DRM_ERROR("NV: Channel %d/%d - Method 0x%04x, Data 0x%08x\n",
+ channel, (c1method >> 13) & 3,
+ c1method & 0x1ffc, c1data
+ );
+
status &= ~NV_PFIFO_INTR_CACHE_ERROR;
NV_WRITE(NV_PFIFO_INTSTAT, NV_PFIFO_INTR_CACHE_ERROR);
}
diff --git a/shared-core/nouveau_object.c b/shared-core/nouveau_object.c
index 18c50763..78a4b78f 100644
--- a/shared-core/nouveau_object.c
+++ b/shared-core/nouveau_object.c
@@ -290,7 +290,6 @@ static void nouveau_object_instance_free(drm_device_t *dev,
void nouveau_hash_table_init(drm_device_t* dev)
{
drm_nouveau_private_t *dev_priv=dev->dev_private;
- int ht_start, ht_end;
int i;
dev_priv->objs.ht_bits = 9;
diff --git a/shared-core/nouveau_reg.h b/shared-core/nouveau_reg.h
index 7a0f429a..b393e87f 100644
--- a/shared-core/nouveau_reg.h
+++ b/shared-core/nouveau_reg.h
@@ -165,7 +165,12 @@
#define NV_PFIFO_CACH1_PUL0 0x00003250
#define NV_PFIFO_CACH1_PUL1 0x00003254
#define NV_PFIFO_CACH1_HASH 0x00003258
+#define NV_PFIFO_CACH1_GET 0x00003270
#define NV_PFIFO_CACH1_ENG 0x00003280
+#define NV_PFIFO_CACH1_METHOD(i) (0x00003800+(i*8))
+#define NV_PFIFO_CACH1_DATA(i) (0x00003804+(i*8))
+#define NV40_PFIFO_CACH1_METHOD(i) (0x00090000+(i*8))
+#define NV40_PFIFO_CACH1_DATA(i) (0x00090004+(i*8))
#define NV_CRTC0_INTSTAT 0x00600100
#define NV_CRTC0_INTEN 0x00600140