diff options
author | Pekka Paalanen <pq@iki.fi> | 2007-07-06 12:47:53 +0300 |
---|---|---|
committer | Pekka Paalanen <pq@iki.fi> | 2007-07-18 13:52:39 +0300 |
commit | 14ecf8d6c2ccecbe9841ad4a7eb3b301685f2351 (patch) | |
tree | 4031f34a5449722acf1d73f8104f8143b4c27b19 /shared-core | |
parent | 1ff858fe3a6b632c879a9f99a67227db7df70b62 (diff) |
nouveau: Replace 0x00400104 and 0x00400108 with names.
NV03_PGRAPH_NSTATUS and NV03_PGRAPH_NSOURCE.
The prefix NV03 is chosen because nv10reg.h had no versioned prefix,
and the code using these registers does not check card_type.
Diffstat (limited to 'shared-core')
-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) |