diff options
author | Marek Olšák <maraeo@gmail.com> | 2012-03-07 18:56:00 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-03-20 04:44:12 -0400 |
commit | 779923bc40e123976bb0bee07b1c6a47d2858137 (patch) | |
tree | 9e4118055cc0baf8ef04c1bc6381cafcc6fa3cc1 /drivers | |
parent | 9c1dfc5574a7f7115c0fe5bd8f838a8b7a52ee6d (diff) |
drm/radeon/kms: skip cb/db checking if SX_MISC is 1 on r600+
Signed-off-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen_cs.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600_cs.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/reg_srcs/cayman | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/reg_srcs/evergreen | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/reg_srcs/r600 | 1 |
5 files changed, 16 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c index 49203b67b81..8bf576a50c5 100644 --- a/drivers/gpu/drm/radeon/evergreen_cs.c +++ b/drivers/gpu/drm/radeon/evergreen_cs.c | |||
@@ -85,6 +85,7 @@ struct evergreen_cs_track { | |||
85 | u32 db_s_write_offset; | 85 | u32 db_s_write_offset; |
86 | struct radeon_bo *db_s_read_bo; | 86 | struct radeon_bo *db_s_read_bo; |
87 | struct radeon_bo *db_s_write_bo; | 87 | struct radeon_bo *db_s_write_bo; |
88 | bool sx_misc_kill_all_prims; | ||
88 | }; | 89 | }; |
89 | 90 | ||
90 | static u32 evergreen_cs_get_aray_mode(u32 tiling_flags) | 91 | static u32 evergreen_cs_get_aray_mode(u32 tiling_flags) |
@@ -162,6 +163,7 @@ static void evergreen_cs_track_init(struct evergreen_cs_track *track) | |||
162 | track->vgt_strmout_bo_offset[i] = 0xFFFFFFFF; | 163 | track->vgt_strmout_bo_offset[i] = 0xFFFFFFFF; |
163 | track->vgt_strmout_bo_mc[i] = 0xFFFFFFFF; | 164 | track->vgt_strmout_bo_mc[i] = 0xFFFFFFFF; |
164 | } | 165 | } |
166 | track->sx_misc_kill_all_prims = false; | ||
165 | } | 167 | } |
166 | 168 | ||
167 | struct eg_surface { | 169 | struct eg_surface { |
@@ -821,6 +823,9 @@ static int evergreen_cs_track_check(struct radeon_cs_parser *p) | |||
821 | } | 823 | } |
822 | } | 824 | } |
823 | 825 | ||
826 | if (track->sx_misc_kill_all_prims) | ||
827 | return 0; | ||
828 | |||
824 | /* check that we have a cb for each enabled target | 829 | /* check that we have a cb for each enabled target |
825 | */ | 830 | */ |
826 | tmp = track->cb_target_mask; | 831 | tmp = track->cb_target_mask; |
@@ -1748,6 +1753,9 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1748 | } | 1753 | } |
1749 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); | 1754 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); |
1750 | break; | 1755 | break; |
1756 | case SX_MISC: | ||
1757 | track->sx_misc_kill_all_prims = (radeon_get_ib_value(p, idx) & 0x1) != 0; | ||
1758 | break; | ||
1751 | default: | 1759 | default: |
1752 | dev_warn(p->dev, "forbidden register 0x%08x at %d\n", reg, idx); | 1760 | dev_warn(p->dev, "forbidden register 0x%08x at %d\n", reg, idx); |
1753 | return -EINVAL; | 1761 | return -EINVAL; |
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index 2e465a7089b..b3c40e0fe7e 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c | |||
@@ -74,6 +74,7 @@ struct r600_cs_track { | |||
74 | u32 db_offset; | 74 | u32 db_offset; |
75 | struct radeon_bo *db_bo; | 75 | struct radeon_bo *db_bo; |
76 | u64 db_bo_mc; | 76 | u64 db_bo_mc; |
77 | bool sx_misc_kill_all_prims; | ||
77 | }; | 78 | }; |
78 | 79 | ||
79 | #define FMT_8_BIT(fmt, vc) [fmt] = { 1, 1, 1, vc, CHIP_R600 } | 80 | #define FMT_8_BIT(fmt, vc) [fmt] = { 1, 1, 1, vc, CHIP_R600 } |
@@ -322,6 +323,7 @@ static void r600_cs_track_init(struct r600_cs_track *track) | |||
322 | track->vgt_strmout_bo_offset[i] = 0xFFFFFFFF; | 323 | track->vgt_strmout_bo_offset[i] = 0xFFFFFFFF; |
323 | track->vgt_strmout_bo_mc[i] = 0xFFFFFFFF; | 324 | track->vgt_strmout_bo_mc[i] = 0xFFFFFFFF; |
324 | } | 325 | } |
326 | track->sx_misc_kill_all_prims = false; | ||
325 | } | 327 | } |
326 | 328 | ||
327 | static int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i) | 329 | static int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i) |
@@ -479,6 +481,9 @@ static int r600_cs_track_check(struct radeon_cs_parser *p) | |||
479 | } | 481 | } |
480 | } | 482 | } |
481 | 483 | ||
484 | if (track->sx_misc_kill_all_prims) | ||
485 | return 0; | ||
486 | |||
482 | /* check that we have a cb for each enabled target, we don't check | 487 | /* check that we have a cb for each enabled target, we don't check |
483 | * shader_mask because it seems mesa isn't always setting it :( | 488 | * shader_mask because it seems mesa isn't always setting it :( |
484 | */ | 489 | */ |
@@ -1279,6 +1284,9 @@ static int r600_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1279 | } | 1284 | } |
1280 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); | 1285 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); |
1281 | break; | 1286 | break; |
1287 | case SX_MISC: | ||
1288 | track->sx_misc_kill_all_prims = (radeon_get_ib_value(p, idx) & 0x1) != 0; | ||
1289 | break; | ||
1282 | default: | 1290 | default: |
1283 | dev_warn(p->dev, "forbidden register 0x%08x at %d\n", reg, idx); | 1291 | dev_warn(p->dev, "forbidden register 0x%08x at %d\n", reg, idx); |
1284 | return -EINVAL; | 1292 | return -EINVAL; |
diff --git a/drivers/gpu/drm/radeon/reg_srcs/cayman b/drivers/gpu/drm/radeon/reg_srcs/cayman index 7b526d3ceac..2d30b06f460 100644 --- a/drivers/gpu/drm/radeon/reg_srcs/cayman +++ b/drivers/gpu/drm/radeon/reg_srcs/cayman | |||
@@ -208,7 +208,6 @@ cayman 0x9400 | |||
208 | 0x00028344 PA_SC_VPORT_ZMAX_14 | 208 | 0x00028344 PA_SC_VPORT_ZMAX_14 |
209 | 0x00028348 PA_SC_VPORT_ZMIN_15 | 209 | 0x00028348 PA_SC_VPORT_ZMIN_15 |
210 | 0x0002834C PA_SC_VPORT_ZMAX_15 | 210 | 0x0002834C PA_SC_VPORT_ZMAX_15 |
211 | 0x00028350 SX_MISC | ||
212 | 0x00028354 SX_SURFACE_SYNC | 211 | 0x00028354 SX_SURFACE_SYNC |
213 | 0x0002835C SX_SCATTER_EXPORT_SIZE | 212 | 0x0002835C SX_SCATTER_EXPORT_SIZE |
214 | 0x00028380 SQ_VTX_SEMANTIC_0 | 213 | 0x00028380 SQ_VTX_SEMANTIC_0 |
diff --git a/drivers/gpu/drm/radeon/reg_srcs/evergreen b/drivers/gpu/drm/radeon/reg_srcs/evergreen index 7f4339463e3..ba48394e35b 100644 --- a/drivers/gpu/drm/radeon/reg_srcs/evergreen +++ b/drivers/gpu/drm/radeon/reg_srcs/evergreen | |||
@@ -224,7 +224,6 @@ evergreen 0x9400 | |||
224 | 0x00028344 PA_SC_VPORT_ZMAX_14 | 224 | 0x00028344 PA_SC_VPORT_ZMAX_14 |
225 | 0x00028348 PA_SC_VPORT_ZMIN_15 | 225 | 0x00028348 PA_SC_VPORT_ZMIN_15 |
226 | 0x0002834C PA_SC_VPORT_ZMAX_15 | 226 | 0x0002834C PA_SC_VPORT_ZMAX_15 |
227 | 0x00028350 SX_MISC | ||
228 | 0x00028354 SX_SURFACE_SYNC | 227 | 0x00028354 SX_SURFACE_SYNC |
229 | 0x00028380 SQ_VTX_SEMANTIC_0 | 228 | 0x00028380 SQ_VTX_SEMANTIC_0 |
230 | 0x00028384 SQ_VTX_SEMANTIC_1 | 229 | 0x00028384 SQ_VTX_SEMANTIC_1 |
diff --git a/drivers/gpu/drm/radeon/reg_srcs/r600 b/drivers/gpu/drm/radeon/reg_srcs/r600 index 79d245527ba..626c24ea0b5 100644 --- a/drivers/gpu/drm/radeon/reg_srcs/r600 +++ b/drivers/gpu/drm/radeon/reg_srcs/r600 | |||
@@ -438,7 +438,6 @@ r600 0x9400 | |||
438 | 0x00028638 SPI_VS_OUT_ID_9 | 438 | 0x00028638 SPI_VS_OUT_ID_9 |
439 | 0x00028438 SX_ALPHA_REF | 439 | 0x00028438 SX_ALPHA_REF |
440 | 0x00028410 SX_ALPHA_TEST_CONTROL | 440 | 0x00028410 SX_ALPHA_TEST_CONTROL |
441 | 0x00028350 SX_MISC | ||
442 | 0x00028354 SX_SURFACE_SYNC | 441 | 0x00028354 SX_SURFACE_SYNC |
443 | 0x00009014 SX_MEMORY_EXPORT_SIZE | 442 | 0x00009014 SX_MEMORY_EXPORT_SIZE |
444 | 0x00009604 TC_INVALIDATE | 443 | 0x00009604 TC_INVALIDATE |