diff options
author | Marek Olšák <maraeo@gmail.com> | 2012-03-18 22:09:35 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-03-20 04:44:40 -0400 |
commit | 308385782df8d8a0097884d7556360288162c902 (patch) | |
tree | 511b90106709923cf4e006c3000c850d5e42b73b /drivers/gpu/drm/radeon/evergreen_cs.c | |
parent | 7e9fa5f69f56454facade70e3c1fece3353b0118 (diff) |
drm/radeon/kms: skip db/cb/streamout checking when possible on evergreen
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/gpu/drm/radeon/evergreen_cs.c')
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen_cs.c | 91 |
1 files changed, 66 insertions, 25 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c index 0427b966ef37..7327bc7b7df5 100644 --- a/drivers/gpu/drm/radeon/evergreen_cs.c +++ b/drivers/gpu/drm/radeon/evergreen_cs.c | |||
@@ -86,6 +86,9 @@ struct evergreen_cs_track { | |||
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 | bool sx_misc_kill_all_prims; |
89 | bool cb_dirty; | ||
90 | bool db_dirty; | ||
91 | bool streamout_dirty; | ||
89 | }; | 92 | }; |
90 | 93 | ||
91 | static u32 evergreen_cs_get_aray_mode(u32 tiling_flags) | 94 | static u32 evergreen_cs_get_aray_mode(u32 tiling_flags) |
@@ -139,6 +142,7 @@ static void evergreen_cs_track_init(struct evergreen_cs_track *track) | |||
139 | } | 142 | } |
140 | track->cb_target_mask = 0xFFFFFFFF; | 143 | track->cb_target_mask = 0xFFFFFFFF; |
141 | track->cb_shader_mask = 0xFFFFFFFF; | 144 | track->cb_shader_mask = 0xFFFFFFFF; |
145 | track->cb_dirty = true; | ||
142 | 146 | ||
143 | track->db_depth_view = 0xFFFFC000; | 147 | track->db_depth_view = 0xFFFFC000; |
144 | track->db_depth_size = 0xFFFFFFFF; | 148 | track->db_depth_size = 0xFFFFFFFF; |
@@ -156,6 +160,7 @@ static void evergreen_cs_track_init(struct evergreen_cs_track *track) | |||
156 | track->db_s_write_offset = 0xFFFFFFFF; | 160 | track->db_s_write_offset = 0xFFFFFFFF; |
157 | track->db_s_read_bo = NULL; | 161 | track->db_s_read_bo = NULL; |
158 | track->db_s_write_bo = NULL; | 162 | track->db_s_write_bo = NULL; |
163 | track->db_dirty = true; | ||
159 | 164 | ||
160 | for (i = 0; i < 4; i++) { | 165 | for (i = 0; i < 4; i++) { |
161 | track->vgt_strmout_size[i] = 0; | 166 | track->vgt_strmout_size[i] = 0; |
@@ -163,6 +168,7 @@ static void evergreen_cs_track_init(struct evergreen_cs_track *track) | |||
163 | track->vgt_strmout_bo_offset[i] = 0xFFFFFFFF; | 168 | track->vgt_strmout_bo_offset[i] = 0xFFFFFFFF; |
164 | track->vgt_strmout_bo_mc[i] = 0xFFFFFFFF; | 169 | track->vgt_strmout_bo_mc[i] = 0xFFFFFFFF; |
165 | } | 170 | } |
171 | track->streamout_dirty = true; | ||
166 | track->sx_misc_kill_all_prims = false; | 172 | track->sx_misc_kill_all_prims = false; |
167 | } | 173 | } |
168 | 174 | ||
@@ -802,7 +808,7 @@ static int evergreen_cs_track_check(struct radeon_cs_parser *p) | |||
802 | unsigned buffer_mask = 0; | 808 | unsigned buffer_mask = 0; |
803 | 809 | ||
804 | /* check streamout */ | 810 | /* check streamout */ |
805 | if (track->vgt_strmout_config) { | 811 | if (track->streamout_dirty && track->vgt_strmout_config) { |
806 | for (i = 0; i < 4; i++) { | 812 | for (i = 0; i < 4; i++) { |
807 | if (track->vgt_strmout_config & (1 << i)) { | 813 | if (track->vgt_strmout_config & (1 << i)) { |
808 | buffer_mask |= (track->vgt_strmout_buffer_config >> (i * 4)) & 0xf; | 814 | buffer_mask |= (track->vgt_strmout_buffer_config >> (i * 4)) & 0xf; |
@@ -826,6 +832,7 @@ static int evergreen_cs_track_check(struct radeon_cs_parser *p) | |||
826 | } | 832 | } |
827 | } | 833 | } |
828 | } | 834 | } |
835 | track->streamout_dirty = false; | ||
829 | } | 836 | } |
830 | 837 | ||
831 | if (track->sx_misc_kill_all_prims) | 838 | if (track->sx_misc_kill_all_prims) |
@@ -833,34 +840,40 @@ static int evergreen_cs_track_check(struct radeon_cs_parser *p) | |||
833 | 840 | ||
834 | /* check that we have a cb for each enabled target | 841 | /* check that we have a cb for each enabled target |
835 | */ | 842 | */ |
836 | tmp = track->cb_target_mask; | 843 | if (track->cb_dirty) { |
837 | for (i = 0; i < 8; i++) { | 844 | tmp = track->cb_target_mask; |
838 | if ((tmp >> (i * 4)) & 0xF) { | 845 | for (i = 0; i < 8; i++) { |
839 | /* at least one component is enabled */ | 846 | if ((tmp >> (i * 4)) & 0xF) { |
840 | if (track->cb_color_bo[i] == NULL) { | 847 | /* at least one component is enabled */ |
841 | dev_warn(p->dev, "%s:%d mask 0x%08X | 0x%08X no cb for %d\n", | 848 | if (track->cb_color_bo[i] == NULL) { |
842 | __func__, __LINE__, track->cb_target_mask, track->cb_shader_mask, i); | 849 | dev_warn(p->dev, "%s:%d mask 0x%08X | 0x%08X no cb for %d\n", |
843 | return -EINVAL; | 850 | __func__, __LINE__, track->cb_target_mask, track->cb_shader_mask, i); |
844 | } | 851 | return -EINVAL; |
845 | /* check cb */ | 852 | } |
846 | r = evergreen_cs_track_validate_cb(p, i); | 853 | /* check cb */ |
847 | if (r) { | 854 | r = evergreen_cs_track_validate_cb(p, i); |
848 | return r; | 855 | if (r) { |
856 | return r; | ||
857 | } | ||
849 | } | 858 | } |
850 | } | 859 | } |
860 | track->cb_dirty = false; | ||
851 | } | 861 | } |
852 | 862 | ||
853 | /* Check stencil buffer */ | 863 | if (track->db_dirty) { |
854 | if (G_028800_STENCIL_ENABLE(track->db_depth_control)) { | 864 | /* Check stencil buffer */ |
855 | r = evergreen_cs_track_validate_stencil(p); | 865 | if (G_028800_STENCIL_ENABLE(track->db_depth_control)) { |
856 | if (r) | 866 | r = evergreen_cs_track_validate_stencil(p); |
857 | return r; | 867 | if (r) |
858 | } | 868 | return r; |
859 | /* Check depth buffer */ | 869 | } |
860 | if (G_028800_Z_WRITE_ENABLE(track->db_depth_control)) { | 870 | /* Check depth buffer */ |
861 | r = evergreen_cs_track_validate_depth(p); | 871 | if (G_028800_Z_WRITE_ENABLE(track->db_depth_control)) { |
862 | if (r) | 872 | r = evergreen_cs_track_validate_depth(p); |
863 | return r; | 873 | if (r) |
874 | return r; | ||
875 | } | ||
876 | track->db_dirty = false; | ||
864 | } | 877 | } |
865 | 878 | ||
866 | return 0; | 879 | return 0; |
@@ -1194,6 +1207,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1194 | break; | 1207 | break; |
1195 | case DB_DEPTH_CONTROL: | 1208 | case DB_DEPTH_CONTROL: |
1196 | track->db_depth_control = radeon_get_ib_value(p, idx); | 1209 | track->db_depth_control = radeon_get_ib_value(p, idx); |
1210 | track->db_dirty = true; | ||
1197 | break; | 1211 | break; |
1198 | case CAYMAN_DB_EQAA: | 1212 | case CAYMAN_DB_EQAA: |
1199 | if (p->rdev->family < CHIP_CAYMAN) { | 1213 | if (p->rdev->family < CHIP_CAYMAN) { |
@@ -1235,19 +1249,24 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1235 | DB_MACRO_TILE_ASPECT(mtaspect); | 1249 | DB_MACRO_TILE_ASPECT(mtaspect); |
1236 | } | 1250 | } |
1237 | } | 1251 | } |
1252 | track->db_dirty = true; | ||
1238 | break; | 1253 | break; |
1239 | case DB_STENCIL_INFO: | 1254 | case DB_STENCIL_INFO: |
1240 | track->db_s_info = radeon_get_ib_value(p, idx); | 1255 | track->db_s_info = radeon_get_ib_value(p, idx); |
1256 | track->db_dirty = true; | ||
1241 | break; | 1257 | break; |
1242 | case DB_DEPTH_VIEW: | 1258 | case DB_DEPTH_VIEW: |
1243 | track->db_depth_view = radeon_get_ib_value(p, idx); | 1259 | track->db_depth_view = radeon_get_ib_value(p, idx); |
1260 | track->db_dirty = true; | ||
1244 | break; | 1261 | break; |
1245 | case DB_DEPTH_SIZE: | 1262 | case DB_DEPTH_SIZE: |
1246 | track->db_depth_size = radeon_get_ib_value(p, idx); | 1263 | track->db_depth_size = radeon_get_ib_value(p, idx); |
1247 | track->db_depth_size_idx = idx; | 1264 | track->db_depth_size_idx = idx; |
1265 | track->db_dirty = true; | ||
1248 | break; | 1266 | break; |
1249 | case R_02805C_DB_DEPTH_SLICE: | 1267 | case R_02805C_DB_DEPTH_SLICE: |
1250 | track->db_depth_slice = radeon_get_ib_value(p, idx); | 1268 | track->db_depth_slice = radeon_get_ib_value(p, idx); |
1269 | track->db_dirty = true; | ||
1251 | break; | 1270 | break; |
1252 | case DB_Z_READ_BASE: | 1271 | case DB_Z_READ_BASE: |
1253 | r = evergreen_cs_packet_next_reloc(p, &reloc); | 1272 | r = evergreen_cs_packet_next_reloc(p, &reloc); |
@@ -1259,6 +1278,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1259 | track->db_z_read_offset = radeon_get_ib_value(p, idx); | 1278 | track->db_z_read_offset = radeon_get_ib_value(p, idx); |
1260 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); | 1279 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); |
1261 | track->db_z_read_bo = reloc->robj; | 1280 | track->db_z_read_bo = reloc->robj; |
1281 | track->db_dirty = true; | ||
1262 | break; | 1282 | break; |
1263 | case DB_Z_WRITE_BASE: | 1283 | case DB_Z_WRITE_BASE: |
1264 | r = evergreen_cs_packet_next_reloc(p, &reloc); | 1284 | r = evergreen_cs_packet_next_reloc(p, &reloc); |
@@ -1270,6 +1290,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1270 | track->db_z_write_offset = radeon_get_ib_value(p, idx); | 1290 | track->db_z_write_offset = radeon_get_ib_value(p, idx); |
1271 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); | 1291 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); |
1272 | track->db_z_write_bo = reloc->robj; | 1292 | track->db_z_write_bo = reloc->robj; |
1293 | track->db_dirty = true; | ||
1273 | break; | 1294 | break; |
1274 | case DB_STENCIL_READ_BASE: | 1295 | case DB_STENCIL_READ_BASE: |
1275 | r = evergreen_cs_packet_next_reloc(p, &reloc); | 1296 | r = evergreen_cs_packet_next_reloc(p, &reloc); |
@@ -1281,6 +1302,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1281 | track->db_s_read_offset = radeon_get_ib_value(p, idx); | 1302 | track->db_s_read_offset = radeon_get_ib_value(p, idx); |
1282 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); | 1303 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); |
1283 | track->db_s_read_bo = reloc->robj; | 1304 | track->db_s_read_bo = reloc->robj; |
1305 | track->db_dirty = true; | ||
1284 | break; | 1306 | break; |
1285 | case DB_STENCIL_WRITE_BASE: | 1307 | case DB_STENCIL_WRITE_BASE: |
1286 | r = evergreen_cs_packet_next_reloc(p, &reloc); | 1308 | r = evergreen_cs_packet_next_reloc(p, &reloc); |
@@ -1292,12 +1314,15 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1292 | track->db_s_write_offset = radeon_get_ib_value(p, idx); | 1314 | track->db_s_write_offset = radeon_get_ib_value(p, idx); |
1293 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); | 1315 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); |
1294 | track->db_s_write_bo = reloc->robj; | 1316 | track->db_s_write_bo = reloc->robj; |
1317 | track->db_dirty = true; | ||
1295 | break; | 1318 | break; |
1296 | case VGT_STRMOUT_CONFIG: | 1319 | case VGT_STRMOUT_CONFIG: |
1297 | track->vgt_strmout_config = radeon_get_ib_value(p, idx); | 1320 | track->vgt_strmout_config = radeon_get_ib_value(p, idx); |
1321 | track->streamout_dirty = true; | ||
1298 | break; | 1322 | break; |
1299 | case VGT_STRMOUT_BUFFER_CONFIG: | 1323 | case VGT_STRMOUT_BUFFER_CONFIG: |
1300 | track->vgt_strmout_buffer_config = radeon_get_ib_value(p, idx); | 1324 | track->vgt_strmout_buffer_config = radeon_get_ib_value(p, idx); |
1325 | track->streamout_dirty = true; | ||
1301 | break; | 1326 | break; |
1302 | case VGT_STRMOUT_BUFFER_BASE_0: | 1327 | case VGT_STRMOUT_BUFFER_BASE_0: |
1303 | case VGT_STRMOUT_BUFFER_BASE_1: | 1328 | case VGT_STRMOUT_BUFFER_BASE_1: |
@@ -1314,6 +1339,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1314 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); | 1339 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); |
1315 | track->vgt_strmout_bo[tmp] = reloc->robj; | 1340 | track->vgt_strmout_bo[tmp] = reloc->robj; |
1316 | track->vgt_strmout_bo_mc[tmp] = reloc->lobj.gpu_offset; | 1341 | track->vgt_strmout_bo_mc[tmp] = reloc->lobj.gpu_offset; |
1342 | track->streamout_dirty = true; | ||
1317 | break; | 1343 | break; |
1318 | case VGT_STRMOUT_BUFFER_SIZE_0: | 1344 | case VGT_STRMOUT_BUFFER_SIZE_0: |
1319 | case VGT_STRMOUT_BUFFER_SIZE_1: | 1345 | case VGT_STRMOUT_BUFFER_SIZE_1: |
@@ -1322,6 +1348,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1322 | tmp = (reg - VGT_STRMOUT_BUFFER_SIZE_0) / 16; | 1348 | tmp = (reg - VGT_STRMOUT_BUFFER_SIZE_0) / 16; |
1323 | /* size in register is DWs, convert to bytes */ | 1349 | /* size in register is DWs, convert to bytes */ |
1324 | track->vgt_strmout_size[tmp] = radeon_get_ib_value(p, idx) * 4; | 1350 | track->vgt_strmout_size[tmp] = radeon_get_ib_value(p, idx) * 4; |
1351 | track->streamout_dirty = true; | ||
1325 | break; | 1352 | break; |
1326 | case CP_COHER_BASE: | 1353 | case CP_COHER_BASE: |
1327 | r = evergreen_cs_packet_next_reloc(p, &reloc); | 1354 | r = evergreen_cs_packet_next_reloc(p, &reloc); |
@@ -1333,9 +1360,11 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1333 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); | 1360 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); |
1334 | case CB_TARGET_MASK: | 1361 | case CB_TARGET_MASK: |
1335 | track->cb_target_mask = radeon_get_ib_value(p, idx); | 1362 | track->cb_target_mask = radeon_get_ib_value(p, idx); |
1363 | track->cb_dirty = true; | ||
1336 | break; | 1364 | break; |
1337 | case CB_SHADER_MASK: | 1365 | case CB_SHADER_MASK: |
1338 | track->cb_shader_mask = radeon_get_ib_value(p, idx); | 1366 | track->cb_shader_mask = radeon_get_ib_value(p, idx); |
1367 | track->cb_dirty = true; | ||
1339 | break; | 1368 | break; |
1340 | case PA_SC_AA_CONFIG: | 1369 | case PA_SC_AA_CONFIG: |
1341 | if (p->rdev->family >= CHIP_CAYMAN) { | 1370 | if (p->rdev->family >= CHIP_CAYMAN) { |
@@ -1365,6 +1394,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1365 | case CB_COLOR7_VIEW: | 1394 | case CB_COLOR7_VIEW: |
1366 | tmp = (reg - CB_COLOR0_VIEW) / 0x3c; | 1395 | tmp = (reg - CB_COLOR0_VIEW) / 0x3c; |
1367 | track->cb_color_view[tmp] = radeon_get_ib_value(p, idx); | 1396 | track->cb_color_view[tmp] = radeon_get_ib_value(p, idx); |
1397 | track->cb_dirty = true; | ||
1368 | break; | 1398 | break; |
1369 | case CB_COLOR8_VIEW: | 1399 | case CB_COLOR8_VIEW: |
1370 | case CB_COLOR9_VIEW: | 1400 | case CB_COLOR9_VIEW: |
@@ -1372,6 +1402,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1372 | case CB_COLOR11_VIEW: | 1402 | case CB_COLOR11_VIEW: |
1373 | tmp = ((reg - CB_COLOR8_VIEW) / 0x1c) + 8; | 1403 | tmp = ((reg - CB_COLOR8_VIEW) / 0x1c) + 8; |
1374 | track->cb_color_view[tmp] = radeon_get_ib_value(p, idx); | 1404 | track->cb_color_view[tmp] = radeon_get_ib_value(p, idx); |
1405 | track->cb_dirty = true; | ||
1375 | break; | 1406 | break; |
1376 | case CB_COLOR0_INFO: | 1407 | case CB_COLOR0_INFO: |
1377 | case CB_COLOR1_INFO: | 1408 | case CB_COLOR1_INFO: |
@@ -1393,6 +1424,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1393 | ib[idx] |= CB_ARRAY_MODE(evergreen_cs_get_aray_mode(reloc->lobj.tiling_flags)); | 1424 | ib[idx] |= CB_ARRAY_MODE(evergreen_cs_get_aray_mode(reloc->lobj.tiling_flags)); |
1394 | track->cb_color_info[tmp] |= CB_ARRAY_MODE(evergreen_cs_get_aray_mode(reloc->lobj.tiling_flags)); | 1425 | track->cb_color_info[tmp] |= CB_ARRAY_MODE(evergreen_cs_get_aray_mode(reloc->lobj.tiling_flags)); |
1395 | } | 1426 | } |
1427 | track->cb_dirty = true; | ||
1396 | break; | 1428 | break; |
1397 | case CB_COLOR8_INFO: | 1429 | case CB_COLOR8_INFO: |
1398 | case CB_COLOR9_INFO: | 1430 | case CB_COLOR9_INFO: |
@@ -1410,6 +1442,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1410 | ib[idx] |= CB_ARRAY_MODE(evergreen_cs_get_aray_mode(reloc->lobj.tiling_flags)); | 1442 | ib[idx] |= CB_ARRAY_MODE(evergreen_cs_get_aray_mode(reloc->lobj.tiling_flags)); |
1411 | track->cb_color_info[tmp] |= CB_ARRAY_MODE(evergreen_cs_get_aray_mode(reloc->lobj.tiling_flags)); | 1443 | track->cb_color_info[tmp] |= CB_ARRAY_MODE(evergreen_cs_get_aray_mode(reloc->lobj.tiling_flags)); |
1412 | } | 1444 | } |
1445 | track->cb_dirty = true; | ||
1413 | break; | 1446 | break; |
1414 | case CB_COLOR0_PITCH: | 1447 | case CB_COLOR0_PITCH: |
1415 | case CB_COLOR1_PITCH: | 1448 | case CB_COLOR1_PITCH: |
@@ -1422,6 +1455,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1422 | tmp = (reg - CB_COLOR0_PITCH) / 0x3c; | 1455 | tmp = (reg - CB_COLOR0_PITCH) / 0x3c; |
1423 | track->cb_color_pitch[tmp] = radeon_get_ib_value(p, idx); | 1456 | track->cb_color_pitch[tmp] = radeon_get_ib_value(p, idx); |
1424 | track->cb_color_pitch_idx[tmp] = idx; | 1457 | track->cb_color_pitch_idx[tmp] = idx; |
1458 | track->cb_dirty = true; | ||
1425 | break; | 1459 | break; |
1426 | case CB_COLOR8_PITCH: | 1460 | case CB_COLOR8_PITCH: |
1427 | case CB_COLOR9_PITCH: | 1461 | case CB_COLOR9_PITCH: |
@@ -1430,6 +1464,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1430 | tmp = ((reg - CB_COLOR8_PITCH) / 0x1c) + 8; | 1464 | tmp = ((reg - CB_COLOR8_PITCH) / 0x1c) + 8; |
1431 | track->cb_color_pitch[tmp] = radeon_get_ib_value(p, idx); | 1465 | track->cb_color_pitch[tmp] = radeon_get_ib_value(p, idx); |
1432 | track->cb_color_pitch_idx[tmp] = idx; | 1466 | track->cb_color_pitch_idx[tmp] = idx; |
1467 | track->cb_dirty = true; | ||
1433 | break; | 1468 | break; |
1434 | case CB_COLOR0_SLICE: | 1469 | case CB_COLOR0_SLICE: |
1435 | case CB_COLOR1_SLICE: | 1470 | case CB_COLOR1_SLICE: |
@@ -1442,6 +1477,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1442 | tmp = (reg - CB_COLOR0_SLICE) / 0x3c; | 1477 | tmp = (reg - CB_COLOR0_SLICE) / 0x3c; |
1443 | track->cb_color_slice[tmp] = radeon_get_ib_value(p, idx); | 1478 | track->cb_color_slice[tmp] = radeon_get_ib_value(p, idx); |
1444 | track->cb_color_slice_idx[tmp] = idx; | 1479 | track->cb_color_slice_idx[tmp] = idx; |
1480 | track->cb_dirty = true; | ||
1445 | break; | 1481 | break; |
1446 | case CB_COLOR8_SLICE: | 1482 | case CB_COLOR8_SLICE: |
1447 | case CB_COLOR9_SLICE: | 1483 | case CB_COLOR9_SLICE: |
@@ -1450,6 +1486,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1450 | tmp = ((reg - CB_COLOR8_SLICE) / 0x1c) + 8; | 1486 | tmp = ((reg - CB_COLOR8_SLICE) / 0x1c) + 8; |
1451 | track->cb_color_slice[tmp] = radeon_get_ib_value(p, idx); | 1487 | track->cb_color_slice[tmp] = radeon_get_ib_value(p, idx); |
1452 | track->cb_color_slice_idx[tmp] = idx; | 1488 | track->cb_color_slice_idx[tmp] = idx; |
1489 | track->cb_dirty = true; | ||
1453 | break; | 1490 | break; |
1454 | case CB_COLOR0_ATTRIB: | 1491 | case CB_COLOR0_ATTRIB: |
1455 | case CB_COLOR1_ATTRIB: | 1492 | case CB_COLOR1_ATTRIB: |
@@ -1481,6 +1518,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1481 | } | 1518 | } |
1482 | tmp = ((reg - CB_COLOR0_ATTRIB) / 0x3c); | 1519 | tmp = ((reg - CB_COLOR0_ATTRIB) / 0x3c); |
1483 | track->cb_color_attrib[tmp] = ib[idx]; | 1520 | track->cb_color_attrib[tmp] = ib[idx]; |
1521 | track->cb_dirty = true; | ||
1484 | break; | 1522 | break; |
1485 | case CB_COLOR8_ATTRIB: | 1523 | case CB_COLOR8_ATTRIB: |
1486 | case CB_COLOR9_ATTRIB: | 1524 | case CB_COLOR9_ATTRIB: |
@@ -1508,6 +1546,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1508 | } | 1546 | } |
1509 | tmp = ((reg - CB_COLOR8_ATTRIB) / 0x1c) + 8; | 1547 | tmp = ((reg - CB_COLOR8_ATTRIB) / 0x1c) + 8; |
1510 | track->cb_color_attrib[tmp] = ib[idx]; | 1548 | track->cb_color_attrib[tmp] = ib[idx]; |
1549 | track->cb_dirty = true; | ||
1511 | break; | 1550 | break; |
1512 | case CB_COLOR0_DIM: | 1551 | case CB_COLOR0_DIM: |
1513 | case CB_COLOR1_DIM: | 1552 | case CB_COLOR1_DIM: |
@@ -1604,6 +1643,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1604 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); | 1643 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); |
1605 | track->cb_color_base_last[tmp] = ib[idx]; | 1644 | track->cb_color_base_last[tmp] = ib[idx]; |
1606 | track->cb_color_bo[tmp] = reloc->robj; | 1645 | track->cb_color_bo[tmp] = reloc->robj; |
1646 | track->cb_dirty = true; | ||
1607 | break; | 1647 | break; |
1608 | case CB_COLOR8_BASE: | 1648 | case CB_COLOR8_BASE: |
1609 | case CB_COLOR9_BASE: | 1649 | case CB_COLOR9_BASE: |
@@ -1620,6 +1660,7 @@ static int evergreen_cs_check_reg(struct radeon_cs_parser *p, u32 reg, u32 idx) | |||
1620 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); | 1660 | ib[idx] += (u32)((reloc->lobj.gpu_offset >> 8) & 0xffffffff); |
1621 | track->cb_color_base_last[tmp] = ib[idx]; | 1661 | track->cb_color_base_last[tmp] = ib[idx]; |
1622 | track->cb_color_bo[tmp] = reloc->robj; | 1662 | track->cb_color_bo[tmp] = reloc->robj; |
1663 | track->cb_dirty = true; | ||
1623 | break; | 1664 | break; |
1624 | case CB_IMMED0_BASE: | 1665 | case CB_IMMED0_BASE: |
1625 | case CB_IMMED1_BASE: | 1666 | case CB_IMMED1_BASE: |