drm/i915/selftests: Add live vma selftest
Add a live selftest to excercise rotated/remapped vmas. We simply write through the rotated/remapped vma, and confirm that the data appears in the right page when read through the normal vma. Not sure what the fallout of making all rotated/remapped vmas mappable/fenceable would be, hence I just hacked it in the test. v2: Grab rpm reference (Chris) GEM_BUG_ON(view.type not as expected) (Chris) Allow CAN_FENCE for rotated/remapped vmas (Chris) Update intel_plane_uses_fence() to ask for a fence only for normal vmas on gen4+ v3: Deal with intel_wakeref_t v4: Rebase Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190509122159.24376-4-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
This commit is contained in:
@@ -483,14 +483,6 @@ void __i915_vma_set_map_and_fenceable(struct i915_vma *vma)
|
||||
GEM_BUG_ON(!i915_vma_is_ggtt(vma));
|
||||
GEM_BUG_ON(!vma->fence_size);
|
||||
|
||||
/*
|
||||
* Explicitly disable for rotated VMA since the display does not
|
||||
* need the fence and the VMA is not accessible to other users.
|
||||
*/
|
||||
if (vma->ggtt_view.type == I915_GGTT_VIEW_ROTATED ||
|
||||
vma->ggtt_view.type == I915_GGTT_VIEW_REMAPPED)
|
||||
return;
|
||||
|
||||
fenceable = (vma->node.size >= vma->fence_size &&
|
||||
IS_ALIGNED(vma->node.start, vma->fence_alignment));
|
||||
|
||||
|
Reference in New Issue
Block a user