drm/i915: Pass rotation_info to intel_rotate_fb_obj_pages()

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@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1453316739-13296-4-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Ville Syrjälä 2016-01-20 21:05:24 +02:00
parent 871302555b
commit 11d23e6fa1
1 changed files with 2 additions and 3 deletions

View File

@ -3379,10 +3379,9 @@ rotate_pages(const dma_addr_t *in, unsigned int offset,
} }
static struct sg_table * 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 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 = rot_info->size >> PAGE_SHIFT;
unsigned int size_pages_uv; unsigned int size_pages_uv;
struct sg_page_iter sg_iter; struct sg_page_iter sg_iter;
@ -3522,7 +3521,7 @@ i915_get_ggtt_vma_pages(struct i915_vma *vma)
vma->ggtt_view.pages = vma->obj->pages; vma->ggtt_view.pages = vma->obj->pages;
else if (vma->ggtt_view.type == I915_GGTT_VIEW_ROTATED) else if (vma->ggtt_view.type == I915_GGTT_VIEW_ROTATED)
vma->ggtt_view.pages = 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) else if (vma->ggtt_view.type == I915_GGTT_VIEW_PARTIAL)
vma->ggtt_view.pages = vma->ggtt_view.pages =
intel_partial_pages(&vma->ggtt_view, vma->obj); intel_partial_pages(&vma->ggtt_view, vma->obj);