Commit 75c82a53 authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: Drop return value from intel_fill_fb_ggtt_view

It can't fail and there's even a WARN_ON suggesting that if it would,
it would be a disaster.

Correct this to make things less confusing.

Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1444834266-12689-1-git-send-email-daniel.vetter@ffwll.chReviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent bf68dc9d
No related merge requests found
...@@ -2261,7 +2261,7 @@ intel_fb_align_height(struct drm_device *dev, unsigned int height, ...@@ -2261,7 +2261,7 @@ intel_fb_align_height(struct drm_device *dev, unsigned int height,
fb_format_modifier, 0)); fb_format_modifier, 0));
} }
static int static void
intel_fill_fb_ggtt_view(struct i915_ggtt_view *view, struct drm_framebuffer *fb, intel_fill_fb_ggtt_view(struct i915_ggtt_view *view, struct drm_framebuffer *fb,
const struct drm_plane_state *plane_state) const struct drm_plane_state *plane_state)
{ {
...@@ -2271,10 +2271,10 @@ intel_fill_fb_ggtt_view(struct i915_ggtt_view *view, struct drm_framebuffer *fb, ...@@ -2271,10 +2271,10 @@ intel_fill_fb_ggtt_view(struct i915_ggtt_view *view, struct drm_framebuffer *fb,
*view = i915_ggtt_view_normal; *view = i915_ggtt_view_normal;
if (!plane_state) if (!plane_state)
return 0; return;
if (!intel_rotation_90_or_270(plane_state->rotation)) if (!intel_rotation_90_or_270(plane_state->rotation))
return 0; return;
*view = i915_ggtt_view_rotated; *view = i915_ggtt_view_rotated;
...@@ -2301,8 +2301,6 @@ intel_fill_fb_ggtt_view(struct i915_ggtt_view *view, struct drm_framebuffer *fb, ...@@ -2301,8 +2301,6 @@ intel_fill_fb_ggtt_view(struct i915_ggtt_view *view, struct drm_framebuffer *fb,
info->size_uv = info->width_pages_uv * info->height_pages_uv * info->size_uv = info->width_pages_uv * info->height_pages_uv *
PAGE_SIZE; PAGE_SIZE;
} }
return 0;
} }
static unsigned int intel_linear_alignment(struct drm_i915_private *dev_priv) static unsigned int intel_linear_alignment(struct drm_i915_private *dev_priv)
...@@ -2356,9 +2354,7 @@ intel_pin_and_fence_fb_obj(struct drm_plane *plane, ...@@ -2356,9 +2354,7 @@ intel_pin_and_fence_fb_obj(struct drm_plane *plane,
return -EINVAL; return -EINVAL;
} }
ret = intel_fill_fb_ggtt_view(&view, fb, plane_state); intel_fill_fb_ggtt_view(&view, fb, plane_state);
if (ret)
return ret;
/* Note that the w/a also requires 64 PTE of padding following the /* Note that the w/a also requires 64 PTE of padding following the
* bo. We currently fill all unused PTE with the shadow page and so * bo. We currently fill all unused PTE with the shadow page and so
...@@ -2419,12 +2415,10 @@ static void intel_unpin_fb_obj(struct drm_framebuffer *fb, ...@@ -2419,12 +2415,10 @@ static void intel_unpin_fb_obj(struct drm_framebuffer *fb,
{ {
struct drm_i915_gem_object *obj = intel_fb_obj(fb); struct drm_i915_gem_object *obj = intel_fb_obj(fb);
struct i915_ggtt_view view; struct i915_ggtt_view view;
int ret;
WARN_ON(!mutex_is_locked(&obj->base.dev->struct_mutex)); WARN_ON(!mutex_is_locked(&obj->base.dev->struct_mutex));
ret = intel_fill_fb_ggtt_view(&view, fb, plane_state); intel_fill_fb_ggtt_view(&view, fb, plane_state);
WARN_ONCE(ret, "Couldn't get view from plane state!");
i915_gem_object_unpin_fence(obj); i915_gem_object_unpin_fence(obj);
i915_gem_object_unpin_from_display_plane(obj, &view); i915_gem_object_unpin_from_display_plane(obj, &view);
......
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