[Intel-gfx] [PATCH] drm/i915: Skip fence installation for objects with rotated views

Chris Wilson chris at chris-wilson.co.uk
Wed Sep 16 01:03:33 PDT 2015


On Tue, Sep 15, 2015 at 07:05:12PM -0700, Vivek Kasireddy wrote:
> While pinning a fb object to the display plane, only install a fence
> if the object is using a normal view. This corresponds with the
> behavior found in i915_gem_object_do_pin() where the fencability
> criteria is determined only for objects with normal views.
> 
> Suggested-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Signed-off-by: Vivek Kasireddy <vivek.kasireddy at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 52fb3f2..8b3e943 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2357,7 +2357,8 @@ intel_pin_and_fence_fb_obj(struct drm_plane *plane,
>  	 * framebuffer compression.  For simplicity, we always install
>  	 * a fence as the cost is not that onerous.
>  	 */
> -	ret = i915_gem_object_get_fence(obj);
> +	ret = view.type == I915_GGTT_VIEW_NORMAL ?
> +				i915_gem_object_get_fence(obj) : 0;

ret = 0;
if (vma->map_and_fenceable)
	ret = i915_gem_object_get_fence(obj);

is how I wrote it in my patch. One day that will become
i915_vma_get_fence().
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list