diff options
-rw-r--r-- | shared-core/nouveau_irq.c | 15 | ||||
-rw-r--r-- | shared-core/nouveau_reg.h | 2 |
2 files changed, 10 insertions, 7 deletions
diff --git a/shared-core/nouveau_irq.c b/shared-core/nouveau_irq.c index 84319219..ffc4bac6 100644 --- a/shared-core/nouveau_irq.c +++ b/shared-core/nouveau_irq.c @@ -266,7 +266,8 @@ nouveau_graph_dump_trap_info(struct drm_device *dev) } DRM_ERROR("NV: nSource: 0x%08x, nStatus: 0x%08x\n", - NV_READ(0x400108), NV_READ(0x400104)); + NV_READ(NV03_PGRAPH_NSOURCE), + NV_READ(NV03_PGRAPH_NSTATUS)); DRM_ERROR("NV: Channel %d/%d (class 0x%04x) -" "Method 0x%04x, Data 0x%08x\n", channel, subc, class, method, data @@ -286,8 +287,8 @@ static void nouveau_pgraph_irq_handler(struct drm_device *dev) uint32_t nsource, nstatus, instance, notify; DRM_DEBUG("NV: PGRAPH notify interrupt\n"); - nstatus = NV_READ(0x00400104); - nsource = NV_READ(0x00400108); + nstatus = NV_READ(NV03_PGRAPH_NSTATUS); + nsource = NV_READ(NV03_PGRAPH_NSOURCE); DRM_DEBUG("nsource:0x%08x\tnstatus:0x%08x\n", nsource, nstatus); /* if this wasn't NOTIFICATION_PENDING, dump extra trap info */ @@ -308,8 +309,8 @@ static void nouveau_pgraph_irq_handler(struct drm_device *dev) uint32_t nsource, nstatus, instance, notify; DRM_DEBUG("NV: PGRAPH buffer notify interrupt\n"); - nstatus = NV_READ(0x00400104); - nsource = NV_READ(0x00400108); + nstatus = NV_READ(NV03_PGRAPH_NSTATUS); + nsource = NV_READ(NV03_PGRAPH_NSOURCE); DRM_DEBUG("nsource:0x%08x\tnstatus:0x%08x\n", nsource, nstatus); instance = NV_READ(0x00400158); @@ -332,8 +333,8 @@ static void nouveau_pgraph_irq_handler(struct drm_device *dev) DRM_ERROR("NV: PGRAPH error interrupt\n"); - nstatus = NV_READ(0x00400104); - nsource = NV_READ(0x00400108); + nstatus = NV_READ(NV03_PGRAPH_NSTATUS); + nsource = NV_READ(NV03_PGRAPH_NSOURCE); DRM_ERROR("nsource:0x%08x\tnstatus:0x%08x\n", nsource, nstatus); instance = NV_READ(0x00400158); diff --git a/shared-core/nouveau_reg.h b/shared-core/nouveau_reg.h index a66d2d34..bcdb1a9f 100644 --- a/shared-core/nouveau_reg.h +++ b/shared-core/nouveau_reg.h @@ -110,6 +110,8 @@ #define NV04_PGRAPH_DEBUG_3 0x0040008c #define NV10_PGRAPH_DEBUG_4 0x00400090 #define NV03_PGRAPH_INTR 0x00400100 +#define NV03_PGRAPH_NSTATUS 0x00400104 +#define NV03_PGRAPH_NSOURCE 0x00400108 #define NV03_PGRAPH_INTR_EN 0x00400140 #define NV40_PGRAPH_INTR_EN 0x0040013C # define NV_PGRAPH_INTR_NOTIFY (1<< 0) |