diff options
author | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2014-09-24 14:20:25 -0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-10-24 16:34:00 +0200 |
commit | e391ea882b1a04fb3f559287ac694652a3cd9da9 (patch) | |
tree | c177499836403c550bab1b4872a9247768dd43da /drivers/gpu/drm/i915/intel_display.c | |
parent | 757f9a3e5b8a812af0c213099a5b31cb423f4d3c (diff) | |
download | lwn-e391ea882b1a04fb3f559287ac694652a3cd9da9.tar.gz lwn-e391ea882b1a04fb3f559287ac694652a3cd9da9.zip |
drm/i915: Fix not checking cursor and object sizes
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>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 81f5656b2343..f150765faf3f 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -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); @@ -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) { |