aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-11-09 16:41:21 -0500
committerDave Airlie <airlied@redhat.com>2009-11-09 22:41:07 -0500
commita39533b4ddad388b64a20bcabd17ac125fd4ba65 (patch)
tree20eb55eb5caa047eff34a93e40bb00669b98458f /drivers/gpu
parent7433874e31f7f2e6e942b12012790565731d0f4a (diff)
drm/radeon/r600: CS parser updates
Add some additional regs that require relocs. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/r600_cs.c18
-rw-r--r--drivers/gpu/drm/radeon/r600d.h10
2 files changed, 28 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
index 17e42195c632..0d820764f340 100644
--- a/drivers/gpu/drm/radeon/r600_cs.c
+++ b/drivers/gpu/drm/radeon/r600_cs.c
@@ -466,6 +466,23 @@ static int r600_packet3_check(struct radeon_cs_parser *p,
466 for (i = 0; i < pkt->count; i++) { 466 for (i = 0; i < pkt->count; i++) {
467 reg = start_reg + (4 * i); 467 reg = start_reg + (4 * i);
468 switch (reg) { 468 switch (reg) {
469 case SQ_ESGS_RING_BASE:
470 case SQ_GSVS_RING_BASE:
471 case SQ_ESTMP_RING_BASE:
472 case SQ_GSTMP_RING_BASE:
473 case SQ_VSTMP_RING_BASE:
474 case SQ_PSTMP_RING_BASE:
475 case SQ_FBUF_RING_BASE:
476 case SQ_REDUC_RING_BASE:
477 case SX_MEMORY_EXPORT_BASE:
478 r = r600_cs_packet_next_reloc(p, &reloc);
479 if (r) {
480 DRM_ERROR("bad SET_CONFIG_REG "
481 "0x%04X\n", reg);
482 return -EINVAL;
483 }
484 ib[idx+1+i] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff);
485 break;
469 case CP_COHER_BASE: 486 case CP_COHER_BASE:
470 /* use PACKET3_SURFACE_SYNC */ 487 /* use PACKET3_SURFACE_SYNC */
471 return -EINVAL; 488 return -EINVAL;
@@ -487,6 +504,7 @@ static int r600_packet3_check(struct radeon_cs_parser *p,
487 reg = start_reg + (4 * i); 504 reg = start_reg + (4 * i);
488 switch (reg) { 505 switch (reg) {
489 case DB_DEPTH_BASE: 506 case DB_DEPTH_BASE:
507 case DB_HTILE_DATA_BASE:
490 case CB_COLOR0_BASE: 508 case CB_COLOR0_BASE:
491 case CB_COLOR1_BASE: 509 case CB_COLOR1_BASE:
492 case CB_COLOR2_BASE: 510 case CB_COLOR2_BASE:
diff --git a/drivers/gpu/drm/radeon/r600d.h b/drivers/gpu/drm/radeon/r600d.h
index cf238bf5700f..b99f45d85d88 100644
--- a/drivers/gpu/drm/radeon/r600d.h
+++ b/drivers/gpu/drm/radeon/r600d.h
@@ -118,6 +118,7 @@
118#define DB_DEBUG 0x9830 118#define DB_DEBUG 0x9830
119#define PREZ_MUST_WAIT_FOR_POSTZ_DONE (1 << 31) 119#define PREZ_MUST_WAIT_FOR_POSTZ_DONE (1 << 31)
120#define DB_DEPTH_BASE 0x2800C 120#define DB_DEPTH_BASE 0x2800C
121#define DB_HTILE_DATA_BASE 0x28014
121#define DB_WATERMARKS 0x9838 122#define DB_WATERMARKS 0x9838
122#define DEPTH_FREE(x) ((x) << 0) 123#define DEPTH_FREE(x) ((x) << 0)
123#define DEPTH_FLUSH(x) ((x) << 5) 124#define DEPTH_FLUSH(x) ((x) << 5)
@@ -170,6 +171,14 @@
170#define SQ_STACK_RESOURCE_MGMT_2 0x8c14 171#define SQ_STACK_RESOURCE_MGMT_2 0x8c14
171# define NUM_GS_STACK_ENTRIES(x) ((x) << 0) 172# define NUM_GS_STACK_ENTRIES(x) ((x) << 0)
172# define NUM_ES_STACK_ENTRIES(x) ((x) << 16) 173# define NUM_ES_STACK_ENTRIES(x) ((x) << 16)
174#define SQ_ESGS_RING_BASE 0x8c40
175#define SQ_GSVS_RING_BASE 0x8c48
176#define SQ_ESTMP_RING_BASE 0x8c50
177#define SQ_GSTMP_RING_BASE 0x8c58
178#define SQ_VSTMP_RING_BASE 0x8c60
179#define SQ_PSTMP_RING_BASE 0x8c68
180#define SQ_FBUF_RING_BASE 0x8c70
181#define SQ_REDUC_RING_BASE 0x8c78
173 182
174#define GRBM_CNTL 0x8000 183#define GRBM_CNTL 0x8000
175# define GRBM_READ_TIMEOUT(x) ((x) << 0) 184# define GRBM_READ_TIMEOUT(x) ((x) << 0)
@@ -355,6 +364,7 @@
355 364
356 365
357#define SX_MISC 0x28350 366#define SX_MISC 0x28350
367#define SX_MEMORY_EXPORT_BASE 0x9010
358#define SX_DEBUG_1 0x9054 368#define SX_DEBUG_1 0x9054
359#define SMX_EVENT_RELEASE (1 << 0) 369#define SMX_EVENT_RELEASE (1 << 0)
360#define ENABLE_NEW_SMX_ADDRESS (1 << 16) 370#define ENABLE_NEW_SMX_ADDRESS (1 << 16)