From: Maarten Lankhorst Date: Thu, 7 Jan 2016 10:54:08 +0000 (+0100) Subject: drm/i915: Remove some visibility checks from intel_crtc_update_cursor. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=edd62601dd6a08e5f25cb84033e7fd9371032a13;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/i915: Remove some visibility checks from intel_crtc_update_cursor. This is duplicated with intel_check_cursor_plane, and with all non-atomic paths removed this should be dead code. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1452164052-21752-4-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Ville Syrjälä --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 24b3503f94be..4fe0c4d02fda 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -85,8 +85,6 @@ static const uint32_t intel_cursor_formats[] = { DRM_FORMAT_ARGB8888, }; -static void intel_crtc_update_cursor(struct drm_crtc *crtc, bool on); - static void i9xx_crtc_clock_get(struct intel_crtc *crtc, struct intel_crtc_state *pipe_config); static void ironlake_pch_clock_get(struct intel_crtc *crtc, @@ -10237,25 +10235,13 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc, base = intel_crtc->cursor_addr; - if (x >= intel_crtc->config->pipe_src_w) - on = false; - - if (y >= intel_crtc->config->pipe_src_h) - on = false; - if (x < 0) { - if (x + cursor_state->crtc_w <= 0) - on = false; - pos |= CURSOR_POS_SIGN << CURSOR_X_SHIFT; x = -x; } pos |= x << CURSOR_X_SHIFT; if (y < 0) { - if (y + cursor_state->crtc_h <= 0) - on = false; - pos |= CURSOR_POS_SIGN << CURSOR_Y_SHIFT; y = -y; }