提交 d6e4db15 编写于 作者: V Ville Syrjälä 提交者: Daniel Vetter

drm/i915: Fix cursor visibility checks also for the right/bottom screen edges

First of all we should not be looking at fb->{width,height} as those do
not tell us what the actual pipe size is. Second of all we need to use
>= for the comparison.

So fix the comparison, and make use of the new pipe_src_{w,h} to
determine the real pipe source dimensions.
Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 efc9064e
......@@ -6921,19 +6921,16 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
int pipe = intel_crtc->pipe;
int x = intel_crtc->cursor_x;
int y = intel_crtc->cursor_y;
u32 base, pos;
u32 base = 0, pos = 0;
bool visible;
pos = 0;
if (on && crtc->enabled && crtc->fb) {
if (on)
base = intel_crtc->cursor_addr;
if (x > (int) crtc->fb->width)
base = 0;
if (y > (int) crtc->fb->height)
base = 0;
} else
if (x >= intel_crtc->config.pipe_src_w)
base = 0;
if (y >= intel_crtc->config.pipe_src_h)
base = 0;
if (x < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册