Skip to content

Commit

Permalink
drm/i915: Fix not checking cursor and object sizes
Browse files Browse the repository at this point in the history
Even if the fb is the same we should still check if the sizes are
valid to be set.

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 757f9a3 commit e391ea8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -11923,9 +11923,6 @@ intel_check_cursor_plane(struct drm_plane *plane,
if (!obj)
return 0;

if (fb == crtc->cursor->fb)
return 0;

/* Check for which cursor types we support */
crtc_w = drm_rect_width(&state->orig_dst);
crtc_h = drm_rect_height(&state->orig_dst);
Expand All @@ -11940,6 +11937,9 @@ intel_check_cursor_plane(struct drm_plane *plane,
return -ENOMEM;
}

if (fb == crtc->cursor->fb)
return 0;

/* we only need to pin inside GTT if cursor is non-phy */
mutex_lock(&dev->struct_mutex);
if (!INTEL_INFO(dev)->cursor_needs_physical && obj->tiling_mode) {
Expand Down

0 comments on commit e391ea8

Please sign in to comment.