summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-01-28 05:29:31 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-01-28 05:29:31 +0000
commit70147db2229c1f71313cda5009f5c92dc4f7066d (patch)
treee2ac6b4b6fa3baded5fc51c7d2b599e67c48912d /sys/dev/pci
parentb6f1f4292e8a2fec078ea7ad10a419e4ae716168 (diff)
drm/radeon: allow geom rings to be setup on r600/r700 (v2)
From Dave Airlie 7c4c62a04a2a80e3feb5d6c97aca1e413b11c790 in mainline linux
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/radeon/r600_cs.c20
-rw-r--r--sys/dev/pci/drm/radeon/r600_reg_safe.h2
-rw-r--r--sys/dev/pci/drm/radeon/reg_srcs/r6001
3 files changed, 19 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/radeon/r600_cs.c b/sys/dev/pci/drm/radeon/r600_cs.c
index 94ecf3d2a4d..3e7f3dafc6b 100644
--- a/sys/dev/pci/drm/radeon/r600_cs.c
+++ b/sys/dev/pci/drm/radeon/r600_cs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: r600_cs.c,v 1.3 2014/02/15 14:19:44 jsg Exp $ */
+/* $OpenBSD: r600_cs.c,v 1.4 2015/01/28 05:29:30 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -1153,8 +1153,22 @@ static int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx)
case R_008C64_SQ_VSTMP_RING_SIZE:
case R_0288C8_SQ_GS_VERT_ITEMSIZE:
/* get value to populate the IB don't remove */
- tmp =radeon_get_ib_value(p, idx);
- ib[idx] = 0;
+ /*tmp =radeon_get_ib_value(p, idx);
+ ib[idx] = 0;*/
+ break;
+ case SQ_ESGS_RING_BASE:
+ case SQ_GSVS_RING_BASE:
+ case SQ_ESTMP_RING_BASE:
+ case SQ_GSTMP_RING_BASE:
+ case SQ_PSTMP_RING_BASE:
+ case SQ_VSTMP_RING_BASE:
+ r = r600_cs_packet_next_reloc(p, &reloc);
+ if (r) {
+ dev_warn(p->dev, "bad SET_CONTEXT_REG "
+ "0x%04X\n", reg);
+ return -EINVAL;
+ }
+ ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff);
break;
case SQ_CONFIG:
track->sq_config = radeon_get_ib_value(p, idx);
diff --git a/sys/dev/pci/drm/radeon/r600_reg_safe.h b/sys/dev/pci/drm/radeon/r600_reg_safe.h
index 4a65b691b03..88ede67d7c7 100644
--- a/sys/dev/pci/drm/radeon/r600_reg_safe.h
+++ b/sys/dev/pci/drm/radeon/r600_reg_safe.h
@@ -324,7 +324,7 @@ static const unsigned r600_reg_safe_bm[1952] = {
0x00000000, 0x00000000, 0x00000000, 0xFFFF8000,
0x0001801F, 0xFC000000, 0xFFFFFFFF, 0xFFFFFE00,
0x7BCFFE05, 0xFE07FDEF, 0xFFFFFFFF, 0xFFFFFFFF,
- 0xF7E20000, 0xDDDF9CDD, 0xFFFFE3FD, 0xFFFFFFFF,
+ 0xF7E20000, 0xDDDF9CDD, 0xFFFFA3FD, 0xFFFFFFFF,
0xFFFB0E02, 0xFFFFFFFF, 0xFFFDC3E7, 0x3FFFFFFF,
0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
diff --git a/sys/dev/pci/drm/radeon/reg_srcs/r600 b/sys/dev/pci/drm/radeon/reg_srcs/r600
index 20bfbda7b3f..ec0c6829c1d 100644
--- a/sys/dev/pci/drm/radeon/reg_srcs/r600
+++ b/sys/dev/pci/drm/radeon/reg_srcs/r600
@@ -18,6 +18,7 @@ r600 0x9400
0x00028A3C VGT_GROUP_VECT_1_FMT_CNTL
0x00028A40 VGT_GS_MODE
0x00028A6C VGT_GS_OUT_PRIM_TYPE
+0x00028B38 VGT_GS_MAX_VERT_OUT
0x000088C8 VGT_GS_PER_ES
0x000088E8 VGT_GS_PER_VS
0x000088D4 VGT_GS_VERTEX_REUSE