drm/i915: Zap the GTT mapping when transitioning from untiled to tiled.
As of 52dc7d32b8
, we could leave an old
linear GTT mapping in place, so that apps trying to GTT-mapped write in
tiled data wouldn't get the fence added, and garbage would get displayed.
Signed-off-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
@@ -521,6 +521,12 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* If we've changed tiling, GTT-mappings of the object
|
||||
* need to re-fault to ensure that the correct fence register
|
||||
* setup is in place.
|
||||
*/
|
||||
i915_gem_release_mmap(obj);
|
||||
|
||||
obj_priv->tiling_mode = args->tiling_mode;
|
||||
obj_priv->stride = args->stride;
|
||||
}
|
||||
|
Reference in New Issue
Block a user