sna/gen2: Prevent using the GTT maps with I915_TILING_Y on 855gm
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
0a2c5eb766
commit
c7ad655359
|
|
@ -3826,8 +3826,10 @@ uint32_t kgem_add_reloc(struct kgem *kgem,
|
|||
kgem->reloc[index].target_handle = bo->handle;
|
||||
kgem->reloc[index].presumed_offset = bo->presumed_offset;
|
||||
|
||||
if (read_write_domain & 0x7ff)
|
||||
if (read_write_domain & 0x7ff) {
|
||||
assert(!bo->snoop || kgem->can_blt_cpu);
|
||||
kgem_bo_mark_dirty(bo);
|
||||
}
|
||||
|
||||
delta += bo->presumed_offset;
|
||||
} else {
|
||||
|
|
@ -3964,6 +3966,7 @@ void *kgem_bo_map(struct kgem *kgem, struct kgem_bo *bo)
|
|||
ptr = bo->map;
|
||||
if (ptr == NULL) {
|
||||
assert(kgem_bo_size(bo) <= kgem->aperture_mappable / 2);
|
||||
assert(kgem->gen != 21 || bo->tiling != I915_TILING_Y);
|
||||
|
||||
kgem_trim_vma_cache(kgem, MAP_GTT, bucket(bo));
|
||||
|
||||
|
|
|
|||
|
|
@ -519,6 +519,9 @@ static inline bool kgem_bo_can_map(struct kgem *kgem, struct kgem_bo *bo)
|
|||
if (!bo->tiling && kgem->has_llc)
|
||||
return true;
|
||||
|
||||
if (kgem->gen == 21 && bo->tiling == I915_TILING_Y)
|
||||
return false;
|
||||
|
||||
return kgem_bo_size(bo) <= kgem->aperture_mappable / 4;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1830,6 +1830,7 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
|
|||
assert(flags & MOVE_WRITE);
|
||||
|
||||
if (priv->stride && priv->gpu_bo &&
|
||||
kgem_bo_can_map(&sna->kgem, priv->gpu_bo) &&
|
||||
region_inplace(sna, pixmap, region, priv, true)) {
|
||||
assert(priv->gpu_bo->proxy == NULL);
|
||||
if (!__kgem_bo_is_busy(&sna->kgem, priv->gpu_bo)) {
|
||||
|
|
@ -1913,6 +1914,7 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
|
|||
}
|
||||
|
||||
if (operate_inplace(priv, flags) &&
|
||||
kgem_bo_can_map(&sna->kgem, priv->gpu_bo) &&
|
||||
region_inplace(sna, pixmap, region, priv, (flags & MOVE_READ) == 0)) {
|
||||
kgem_bo_submit(&sna->kgem, priv->gpu_bo);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue