drm/i915: Don't try to enable cursor from setplane when crtc is disabled
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 12 Aug 2014 16:39:52 +0000 (19:39 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 13 Aug 2014 12:23:36 +0000 (14:23 +0200)
Make sure the cursor gets fully clipped when enabling it on a disabled
crtc via setplane. This will prevent the lower level code from
attempting to enable the cursor in hardware.

Cc: Paulo Zanoni <przanoni@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index 1bd1aa21a8e9037e0071a33eba6c3dbc24d6d76d..a93d5ffd3863302c46b78be2f771a9d5d355a1b4 100644 (file)
@@ -11743,8 +11743,8 @@ intel_cursor_plane_update(struct drm_plane *plane, struct drm_crtc *crtc,
        };
        const struct drm_rect clip = {
                /* integer pixels */
-               .x2 = intel_crtc->config.pipe_src_w,
-               .y2 = intel_crtc->config.pipe_src_h,
+               .x2 = intel_crtc->active ? intel_crtc->config.pipe_src_w : 0,
+               .y2 = intel_crtc->active ? intel_crtc->config.pipe_src_h : 0,
        };
        bool visible;
        int ret;