All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Silence the change of LVDS sync polarity
@ 2012-04-14 15:03 Chris Wilson
  2012-04-14 16:41 ` Chris Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2012-04-14 15:03 UTC (permalink / raw)
  To: intel-gfx

When the change to start adjusting the sync polarity of the LVDS mode
was introduced in

commit aa9b500ddf1a6318e7cf8b1754696edddae86db9
Author: Bryan Freed <bfreed@google.com>
Date:   Wed Jan 12 13:43:19 2011 -0800

    drm/i915: Honour LVDS sync polarity from EDID

we made the change in state verbose so that we could quickly spot any
regressions that made have also been introduced with it. As there do not
appear to have been any, remove the extra logging.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_display.c |   34 ++++++----------------------------
 1 file changed, 6 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c4f05f8..3cc0b10 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5474,22 +5474,11 @@ static void intel_update_lvds(struct drm_crtc *crtc, intel_clock_t *clock,
 		else
 			temp &= ~LVDS_ENABLE_DITHER;
 	}
+	temp &= ~(LVDS_HSYNC_POLARITY | LVDS_VSYNC_POLARITY);
 	if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC)
-		lvds_sync |= LVDS_HSYNC_POLARITY;
+		temp |= LVDS_HSYNC_POLARITY;
 	if (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC)
-		lvds_sync |= LVDS_VSYNC_POLARITY;
-	if ((temp & (LVDS_HSYNC_POLARITY | LVDS_VSYNC_POLARITY))
-	    != lvds_sync) {
-		char flags[2] = "-+";
-		DRM_INFO("Changing LVDS panel from "
-			 "(%chsync, %cvsync) to (%chsync, %cvsync)\n",
-			 flags[!(temp & LVDS_HSYNC_POLARITY)],
-			 flags[!(temp & LVDS_VSYNC_POLARITY)],
-			 flags[!(lvds_sync & LVDS_HSYNC_POLARITY)],
-			 flags[!(lvds_sync & LVDS_VSYNC_POLARITY)]);
-		temp &= ~(LVDS_HSYNC_POLARITY | LVDS_VSYNC_POLARITY);
-		temp |= lvds_sync;
-	}
+		temp |= LVDS_VSYNC_POLARITY;
 	I915_WRITE(LVDS, temp);
 }
 
@@ -6328,22 +6317,11 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
 		 * appropriately here, but we need to look more thoroughly into how
 		 * panels behave in the two modes.
 		 */
+		temp &= ~(LVDS_HSYNC_POLARITY | LVDS_VSYNC_POLARITY);
 		if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC)
-			lvds_sync |= LVDS_HSYNC_POLARITY;
+			temp |= LVDS_HSYNC_POLARITY;
 		if (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC)
-			lvds_sync |= LVDS_VSYNC_POLARITY;
-		if ((temp & (LVDS_HSYNC_POLARITY | LVDS_VSYNC_POLARITY))
-		    != lvds_sync) {
-			char flags[2] = "-+";
-			DRM_INFO("Changing LVDS panel from "
-				 "(%chsync, %cvsync) to (%chsync, %cvsync)\n",
-				 flags[!(temp & LVDS_HSYNC_POLARITY)],
-				 flags[!(temp & LVDS_VSYNC_POLARITY)],
-				 flags[!(lvds_sync & LVDS_HSYNC_POLARITY)],
-				 flags[!(lvds_sync & LVDS_VSYNC_POLARITY)]);
-			temp &= ~(LVDS_HSYNC_POLARITY | LVDS_VSYNC_POLARITY);
-			temp |= lvds_sync;
-		}
+			temp |= LVDS_VSYNC_POLARITY;
 		I915_WRITE(PCH_LVDS, temp);
 	}
 
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] drm/i915: Silence the change of LVDS sync polarity
  2012-04-14 15:03 [PATCH] drm/i915: Silence the change of LVDS sync polarity Chris Wilson
@ 2012-04-14 16:41 ` Chris Wilson
  2012-04-18 20:51   ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2012-04-14 16:41 UTC (permalink / raw)
  To: intel-gfx

When the change to start adjusting the sync polarity of the LVDS mode
was introduced in

commit aa9b500ddf1a6318e7cf8b1754696edddae86db9
Author: Bryan Freed <bfreed@google.com>
Date:   Wed Jan 12 13:43:19 2011 -0800

    drm/i915: Honour LVDS sync polarity from EDID

we made the change in state verbose so that we could quickly spot any
regressions that made have also been introduced with it. As there do not
appear to have been any, remove the extra logging.

v2: Remove the no longer used variables.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_display.c |   37 +++++++---------------------------
 1 file changed, 7 insertions(+), 30 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c4f05f8..1a175a8 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5444,7 +5444,7 @@ static void intel_update_lvds(struct drm_crtc *crtc, intel_clock_t *clock,
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
 	int pipe = intel_crtc->pipe;
-	u32 temp, lvds_sync = 0;
+	u32 temp;
 
 	temp = I915_READ(LVDS);
 	temp |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP;
@@ -5474,22 +5474,11 @@ static void intel_update_lvds(struct drm_crtc *crtc, intel_clock_t *clock,
 		else
 			temp &= ~LVDS_ENABLE_DITHER;
 	}
+	temp &= ~(LVDS_HSYNC_POLARITY | LVDS_VSYNC_POLARITY);
 	if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC)
-		lvds_sync |= LVDS_HSYNC_POLARITY;
+		temp |= LVDS_HSYNC_POLARITY;
 	if (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC)
-		lvds_sync |= LVDS_VSYNC_POLARITY;
-	if ((temp & (LVDS_HSYNC_POLARITY | LVDS_VSYNC_POLARITY))
-	    != lvds_sync) {
-		char flags[2] = "-+";
-		DRM_INFO("Changing LVDS panel from "
-			 "(%chsync, %cvsync) to (%chsync, %cvsync)\n",
-			 flags[!(temp & LVDS_HSYNC_POLARITY)],
-			 flags[!(temp & LVDS_VSYNC_POLARITY)],
-			 flags[!(lvds_sync & LVDS_HSYNC_POLARITY)],
-			 flags[!(lvds_sync & LVDS_VSYNC_POLARITY)]);
-		temp &= ~(LVDS_HSYNC_POLARITY | LVDS_VSYNC_POLARITY);
-		temp |= lvds_sync;
-	}
+		temp |= LVDS_VSYNC_POLARITY;
 	I915_WRITE(LVDS, temp);
 }
 
@@ -6040,7 +6029,6 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
 	int ret;
 	struct fdi_m_n m_n = {0};
 	u32 temp;
-	u32 lvds_sync = 0;
 	int target_clock, pixel_multiplier, lane, link_bw, factor;
 	unsigned int pipe_bpp;
 	bool dither;
@@ -6328,22 +6316,11 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
 		 * appropriately here, but we need to look more thoroughly into how
 		 * panels behave in the two modes.
 		 */
+		temp &= ~(LVDS_HSYNC_POLARITY | LVDS_VSYNC_POLARITY);
 		if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC)
-			lvds_sync |= LVDS_HSYNC_POLARITY;
+			temp |= LVDS_HSYNC_POLARITY;
 		if (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC)
-			lvds_sync |= LVDS_VSYNC_POLARITY;
-		if ((temp & (LVDS_HSYNC_POLARITY | LVDS_VSYNC_POLARITY))
-		    != lvds_sync) {
-			char flags[2] = "-+";
-			DRM_INFO("Changing LVDS panel from "
-				 "(%chsync, %cvsync) to (%chsync, %cvsync)\n",
-				 flags[!(temp & LVDS_HSYNC_POLARITY)],
-				 flags[!(temp & LVDS_VSYNC_POLARITY)],
-				 flags[!(lvds_sync & LVDS_HSYNC_POLARITY)],
-				 flags[!(lvds_sync & LVDS_VSYNC_POLARITY)]);
-			temp &= ~(LVDS_HSYNC_POLARITY | LVDS_VSYNC_POLARITY);
-			temp |= lvds_sync;
-		}
+			temp |= LVDS_VSYNC_POLARITY;
 		I915_WRITE(PCH_LVDS, temp);
 	}
 
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Silence the change of LVDS sync polarity
  2012-04-14 16:41 ` Chris Wilson
@ 2012-04-18 20:51   ` Daniel Vetter
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2012-04-18 20:51 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Sat, Apr 14, 2012 at 05:41:59PM +0100, Chris Wilson wrote:
> When the change to start adjusting the sync polarity of the LVDS mode
> was introduced in
> 
> commit aa9b500ddf1a6318e7cf8b1754696edddae86db9
> Author: Bryan Freed <bfreed@google.com>
> Date:   Wed Jan 12 13:43:19 2011 -0800
> 
>     drm/i915: Honour LVDS sync polarity from EDID
> 
> we made the change in state verbose so that we could quickly spot any
> regressions that made have also been introduced with it. As there do not
> appear to have been any, remove the extra logging.
> 
> v2: Remove the no longer used variables.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-18 20:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-14 15:03 [PATCH] drm/i915: Silence the change of LVDS sync polarity Chris Wilson
2012-04-14 16:41 ` Chris Wilson
2012-04-18 20:51   ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.