提交 e391ea88 编写于 作者: G Gustavo Padovan 提交者: Daniel Vetter

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: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 757f9a3e
...@@ -11923,9 +11923,6 @@ intel_check_cursor_plane(struct drm_plane *plane, ...@@ -11923,9 +11923,6 @@ intel_check_cursor_plane(struct drm_plane *plane,
if (!obj) if (!obj)
return 0; return 0;
if (fb == crtc->cursor->fb)
return 0;
/* Check for which cursor types we support */ /* Check for which cursor types we support */
crtc_w = drm_rect_width(&state->orig_dst); crtc_w = drm_rect_width(&state->orig_dst);
crtc_h = drm_rect_height(&state->orig_dst); crtc_h = drm_rect_height(&state->orig_dst);
...@@ -11940,6 +11937,9 @@ intel_check_cursor_plane(struct drm_plane *plane, ...@@ -11940,6 +11937,9 @@ intel_check_cursor_plane(struct drm_plane *plane,
return -ENOMEM; return -ENOMEM;
} }
if (fb == crtc->cursor->fb)
return 0;
/* we only need to pin inside GTT if cursor is non-phy */ /* we only need to pin inside GTT if cursor is non-phy */
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
if (!INTEL_INFO(dev)->cursor_needs_physical && obj->tiling_mode) { if (!INTEL_INFO(dev)->cursor_needs_physical && obj->tiling_mode) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册