[Intel-gfx] [PATCH 03/18] drm/i915: Pass rotation_info to intel_rotate_fb_obj_pages()

Daniel Vetter daniel at ffwll.ch
Mon Jan 25 08:53:45 PST 2016


On Wed, Jan 20, 2016 at 09:05:24PM +0200, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> intel_rotate_fb_obj_pages() doens't need the entire gtt view, just the
> rotation info suffices.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index d547eecac242..b3d8e2b0948c 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -3364,10 +3364,9 @@ rotate_pages(const dma_addr_t *in, unsigned int offset,
>  }
>  
>  static struct sg_table *
> -intel_rotate_fb_obj_pages(struct i915_ggtt_view *ggtt_view,
> +intel_rotate_fb_obj_pages(struct intel_rotation_info *rot_info,
>  			  struct drm_i915_gem_object *obj)
>  {
> -	struct intel_rotation_info *rot_info = &ggtt_view->params.rotated;
>  	unsigned int size_pages = rot_info->size >> PAGE_SHIFT;
>  	unsigned int size_pages_uv;
>  	struct sg_page_iter sg_iter;
> @@ -3507,7 +3506,7 @@ i915_get_ggtt_vma_pages(struct i915_vma *vma)
>  		vma->ggtt_view.pages = vma->obj->pages;
>  	else if (vma->ggtt_view.type == I915_GGTT_VIEW_ROTATED)
>  		vma->ggtt_view.pages =
> -			intel_rotate_fb_obj_pages(&vma->ggtt_view, vma->obj);
> +			intel_rotate_fb_obj_pages(&vma->ggtt_view.params.rotated, vma->obj);
>  	else if (vma->ggtt_view.type == I915_GGTT_VIEW_PARTIAL)
>  		vma->ggtt_view.pages =
>  			intel_partial_pages(&vma->ggtt_view, vma->obj);
> -- 
> 2.4.10
> 
> _______________________________________________
> 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