aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r200.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/r200.c')
-rw-r--r--drivers/gpu/drm/radeon/r200.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/drivers/gpu/drm/radeon/r200.c b/drivers/gpu/drm/radeon/r200.c
index eba4cbfa78f6..a59cc474d537 100644
--- a/drivers/gpu/drm/radeon/r200.c
+++ b/drivers/gpu/drm/radeon/r200.c
@@ -215,7 +215,17 @@ int r200_packet0_check(struct radeon_cs_parser *p,
215 r100_cs_dump_packet(p, pkt); 215 r100_cs_dump_packet(p, pkt);
216 return r; 216 return r;
217 } 217 }
218 ib[idx] = idx_value + ((u32)reloc->lobj.gpu_offset); 218 if (!(p->cs_flags & RADEON_CS_KEEP_TILING_FLAGS)) {
219 if (reloc->lobj.tiling_flags & RADEON_TILING_MACRO)
220 tile_flags |= R200_TXO_MACRO_TILE;
221 if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO)
222 tile_flags |= R200_TXO_MICRO_TILE;
223
224 tmp = idx_value & ~(0x7 << 2);
225 tmp |= tile_flags;
226 ib[idx] = tmp + ((u32)reloc->lobj.gpu_offset);
227 } else
228 ib[idx] = idx_value + ((u32)reloc->lobj.gpu_offset);
219 track->textures[i].robj = reloc->robj; 229 track->textures[i].robj = reloc->robj;
220 track->tex_dirty = true; 230 track->tex_dirty = true;
221 break; 231 break;
@@ -277,14 +287,17 @@ int r200_packet0_check(struct radeon_cs_parser *p,
277 return r; 287 return r;
278 } 288 }
279 289
280 if (reloc->lobj.tiling_flags & RADEON_TILING_MACRO) 290 if (!(p->cs_flags & RADEON_CS_KEEP_TILING_FLAGS)) {
281 tile_flags |= RADEON_COLOR_TILE_ENABLE; 291 if (reloc->lobj.tiling_flags & RADEON_TILING_MACRO)
282 if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO) 292 tile_flags |= RADEON_COLOR_TILE_ENABLE;
283 tile_flags |= RADEON_COLOR_MICROTILE_ENABLE; 293 if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO)
294 tile_flags |= RADEON_COLOR_MICROTILE_ENABLE;
284 295
285 tmp = idx_value & ~(0x7 << 16); 296 tmp = idx_value & ~(0x7 << 16);
286 tmp |= tile_flags; 297 tmp |= tile_flags;
287 ib[idx] = tmp; 298 ib[idx] = tmp;
299 } else
300 ib[idx] = idx_value;
288 301
289 track->cb[0].pitch = idx_value & RADEON_COLORPITCH_MASK; 302 track->cb[0].pitch = idx_value & RADEON_COLORPITCH_MASK;
290 track->cb_dirty = true; 303 track->cb_dirty = true;