Commit 9106cf17 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Account for the size of the chroma plane for the rotated gtt view

The size of the rotated ggtt mapping ought to include the size of the
chroma plane as well. Not a huge deal since we don't expose NV12 (or any
pother planar format for that matter) yet.

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Fixes: 89e3e142 ("drm/i915: Support NV12 in rotated GGTT mapping")
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1455569699-27905-2-git-send-email-ville.syrjala@linux.intel.comReviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
parent 1d5bf5d9
...@@ -3634,7 +3634,7 @@ i915_ggtt_view_size(struct drm_i915_gem_object *obj, ...@@ -3634,7 +3634,7 @@ i915_ggtt_view_size(struct drm_i915_gem_object *obj,
if (view->type == I915_GGTT_VIEW_NORMAL) { if (view->type == I915_GGTT_VIEW_NORMAL) {
return obj->base.size; return obj->base.size;
} else if (view->type == I915_GGTT_VIEW_ROTATED) { } else if (view->type == I915_GGTT_VIEW_ROTATED) {
return view->params.rotated.size; return view->params.rotated.size + view->params.rotated.size_uv;
} else if (view->type == I915_GGTT_VIEW_PARTIAL) { } else if (view->type == I915_GGTT_VIEW_PARTIAL) {
return view->params.partial.size << PAGE_SHIFT; return view->params.partial.size << PAGE_SHIFT;
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment