diff options
author | Dave Airlie <airlied@redhat.com> | 2014-01-29 23:11:12 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-02-05 21:13:52 -0500 |
commit | 7c4c62a04a2a80e3feb5d6c97aca1e413b11c790 (patch) | |
tree | 39f6647a4a002f71960fd4fac08c654ccd177c03 | |
parent | 9ca5d4b4e1d4416b6d01804be843f8e39845c73d (diff) |
drm/radeon: allow geom rings to be setup on r600/r700 (v2)
the evergreen CS parser has allowed this for a while, just port
the code to the r600 one.
This is required before geom shaders can be made work.
v2: agd5f: minor cleanup and add additional 7xx reg.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/radeon/r600_cs.c | 18 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/reg_srcs/r600 | 1 |
3 files changed, 19 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index 7b399dc5fd54..2812c7d1ae6f 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c | |||
@@ -1007,8 +1007,22 @@ static int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1007 | case R_008C64_SQ_VSTMP_RING_SIZE: | 1007 | case R_008C64_SQ_VSTMP_RING_SIZE: |
1008 | case R_0288C8_SQ_GS_VERT_ITEMSIZE: | 1008 | case R_0288C8_SQ_GS_VERT_ITEMSIZE: |
1009 | /* get value to populate the IB don't remove */ | 1009 | /* get value to populate the IB don't remove */ |
1010 | tmp =radeon_get_ib_value(p, idx); | 1010 | /*tmp =radeon_get_ib_value(p, idx); |
1011 | ib[idx] = 0; | 1011 | ib[idx] = 0;*/ |
1012 | break; | ||
1013 | case SQ_ESGS_RING_BASE: | ||
1014 | case SQ_GSVS_RING_BASE: | ||
1015 | case SQ_ESTMP_RING_BASE: | ||
1016 | case SQ_GSTMP_RING_BASE: | ||
1017 | case SQ_PSTMP_RING_BASE: | ||
1018 | case SQ_VSTMP_RING_BASE: | ||
1019 | r = radeon_cs_packet_next_reloc(p, &reloc, 0); | ||
1020 | if (r) { | ||
1021 | dev_warn(p->dev, "bad SET_CONTEXT_REG " | ||
1022 | "0x%04X\n", reg); | ||
1023 | return -EINVAL; | ||
1024 | } | ||
1025 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); | ||
1012 | break; | 1026 | break; |
1013 | case SQ_CONFIG: | 1027 | case SQ_CONFIG: |
1014 | track->sq_config = radeon_get_ib_value(p, idx); | 1028 | track->sq_config = radeon_get_ib_value(p, idx); |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index ec8c388eec17..84a1bbb75f91 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
@@ -78,9 +78,10 @@ | |||
78 | * 2.34.0 - Add CIK tiling mode array query | 78 | * 2.34.0 - Add CIK tiling mode array query |
79 | * 2.35.0 - Add CIK macrotile mode array query | 79 | * 2.35.0 - Add CIK macrotile mode array query |
80 | * 2.36.0 - Fix CIK DCE tiling setup | 80 | * 2.36.0 - Fix CIK DCE tiling setup |
81 | * 2.37.0 - allow GS ring setup on r6xx/r7xx | ||
81 | */ | 82 | */ |
82 | #define KMS_DRIVER_MAJOR 2 | 83 | #define KMS_DRIVER_MAJOR 2 |
83 | #define KMS_DRIVER_MINOR 36 | 84 | #define KMS_DRIVER_MINOR 37 |
84 | #define KMS_DRIVER_PATCHLEVEL 0 | 85 | #define KMS_DRIVER_PATCHLEVEL 0 |
85 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); | 86 | int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); |
86 | int radeon_driver_unload_kms(struct drm_device *dev); | 87 | int radeon_driver_unload_kms(struct drm_device *dev); |
diff --git a/drivers/gpu/drm/radeon/reg_srcs/r600 b/drivers/gpu/drm/radeon/reg_srcs/r600 index 20bfbda7b3f1..ec0c6829c1dc 100644 --- a/drivers/gpu/drm/radeon/reg_srcs/r600 +++ b/drivers/gpu/drm/radeon/reg_srcs/r600 | |||
@@ -18,6 +18,7 @@ r600 0x9400 | |||
18 | 0x00028A3C VGT_GROUP_VECT_1_FMT_CNTL | 18 | 0x00028A3C VGT_GROUP_VECT_1_FMT_CNTL |
19 | 0x00028A40 VGT_GS_MODE | 19 | 0x00028A40 VGT_GS_MODE |
20 | 0x00028A6C VGT_GS_OUT_PRIM_TYPE | 20 | 0x00028A6C VGT_GS_OUT_PRIM_TYPE |
21 | 0x00028B38 VGT_GS_MAX_VERT_OUT | ||
21 | 0x000088C8 VGT_GS_PER_ES | 22 | 0x000088C8 VGT_GS_PER_ES |
22 | 0x000088E8 VGT_GS_PER_VS | 23 | 0x000088E8 VGT_GS_PER_VS |
23 | 0x000088D4 VGT_GS_VERTEX_REUSE | 24 | 0x000088D4 VGT_GS_VERTEX_REUSE |