[Intel-gfx] [PATCH 14/22] drm/i915: Don't treat differently sized rotated views as equal

Daniel Vetter daniel at ffwll.ch
Wed Oct 21 04:36:19 PDT 2015


On Wed, Oct 14, 2015 at 07:29:06PM +0300, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> In case we have multiple different rotated views into the same object,
> each one may need its own vma due to being of different sizes. So don't
> treat all rotated views as equal.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
> index caa182f..68de734 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.h
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
> @@ -553,6 +553,8 @@ i915_ggtt_view_equal(const struct i915_ggtt_view *a,
>  
>  	if (a->type != b->type)
>  		return false;
> +	if (a->type == I915_GGTT_VIEW_ROTATED)
> +		return !memcmp(&a->rotated, &b->rotated, sizeof(a->rotated));

We should take my "[PATCH 3/3] drm/i915: Fix i915_ggtt_view_equal to
handle rotation correctly" instead since being more strict here means
intel_plane_obj_offset won't find the prepared view any more.

Another reasons to just track the vma in the plane_state.
-Daniel
>  	if (a->type == I915_GGTT_VIEW_PARTIAL)
>  		return !memcmp(&a->partial, &b->partial, sizeof(a->partial));
>  	return true;
> -- 
> 2.4.9
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list