diff mbox

[v3,2/4] drm/i915: Only set CURSOR_PIPE_CSC_ENABLE when cursor is enabled

Message ID 1410544415-3059-2-git-send-email-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä Sept. 12, 2014, 5:53 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

It seems cleaner if we keep CURCNTR at 0 when the cursor is disabled,
so don't set the CURSOR_PIPE_CSC_ENABLE bit unless the cursor is
enabled.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Chris Wilson Sept. 13, 2014, 4:17 p.m. UTC | #1
On Fri, Sep 12, 2014 at 08:53:33PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> It seems cleaner if we keep CURCNTR at 0 when the cursor is disabled,
> so don't set the CURSOR_PIPE_CSC_ENABLE bit unless the cursor is
> enabled.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
Daniel Vetter Sept. 15, 2014, 9:12 a.m. UTC | #2
On Sat, Sep 13, 2014 at 05:17:29PM +0100, Chris Wilson wrote:
> On Fri, Sep 12, 2014 at 08:53:33PM +0300, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > It seems cleaner if we keep CURCNTR at 0 when the cursor is disabled,
> > so don't set the CURSOR_PIPE_CSC_ENABLE bit unless the cursor is
> > enabled.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Merged the first 2 patches from this series to dinq, thanks.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 8a5cb6b..82c0ad1 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8317,9 +8317,10 @@  static void i9xx_update_cursor(struct drm_crtc *crtc, u32 base)
 				return;
 		}
 		cntl |= pipe << 28; /* Connect to correct pipe */
+
+		if (IS_HASWELL(dev) || IS_BROADWELL(dev))
+			cntl |= CURSOR_PIPE_CSC_ENABLE;
 	}
-	if (IS_HASWELL(dev) || IS_BROADWELL(dev))
-		cntl |= CURSOR_PIPE_CSC_ENABLE;
 
 	if (intel_crtc->cursor_cntl != cntl) {
 		I915_WRITE(CURCNTR(pipe), cntl);