Skip to content

Commit

Permalink
drm/i915: remove leftover from pre-universal planes days
Browse files Browse the repository at this point in the history
Now that universal planes are in place we don't need this plane unref on
failures.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Gustavo Padovan authored and Daniel Vetter committed Oct 24, 2014
1 parent ccc759d commit 5ee4463
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -8455,13 +8455,6 @@ static bool cursor_size_ok(struct drm_device *dev,
return true;
}

/*
* intel_crtc_cursor_set_obj - Set cursor to specified GEM object
*
* Note that the object's reference will be consumed if the update fails. If
* the update succeeds, the reference of the old object (if any) will be
* consumed.
*/
static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
struct drm_i915_gem_object *obj,
uint32_t width, uint32_t height)
Expand Down Expand Up @@ -8491,8 +8484,7 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
stride = roundup_pow_of_two(width) * 4;
if (obj->base.size < stride * height) {
DRM_DEBUG_KMS("buffer is too small\n");
ret = -ENOMEM;
goto fail;
return -ENOMEM;
}

/* we only need to pin inside GTT if cursor is non-phy */
Expand Down Expand Up @@ -8581,8 +8573,6 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
i915_gem_object_unpin_from_display_plane(obj);
fail_locked:
mutex_unlock(&dev->struct_mutex);
fail:
drm_gem_object_unreference_unlocked(&obj->base);
return ret;
}

Expand Down

0 comments on commit 5ee4463

Please sign in to comment.