mirror of https://gitee.com/openkylin/linux.git
drm/i915: Silence the change of LVDS sync polarity
When the change to start adjusting the sync polarity of the LVDS mode
was introduced in
commit aa9b500ddf
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>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
1fa6110650
commit
284d5df571
|
@ -3416,7 +3416,7 @@ static void intel_update_lvds(struct drm_crtc *crtc, intel_clock_t *clock,
|
||||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||||
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
||||||
int pipe = intel_crtc->pipe;
|
int pipe = intel_crtc->pipe;
|
||||||
u32 temp, lvds_sync = 0;
|
u32 temp;
|
||||||
|
|
||||||
temp = I915_READ(LVDS);
|
temp = I915_READ(LVDS);
|
||||||
temp |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP;
|
temp |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP;
|
||||||
|
@ -3446,22 +3446,11 @@ static void intel_update_lvds(struct drm_crtc *crtc, intel_clock_t *clock,
|
||||||
else
|
else
|
||||||
temp &= ~LVDS_ENABLE_DITHER;
|
temp &= ~LVDS_ENABLE_DITHER;
|
||||||
}
|
}
|
||||||
if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC)
|
|
||||||
lvds_sync |= 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_HSYNC_POLARITY | LVDS_VSYNC_POLARITY);
|
||||||
temp |= lvds_sync;
|
if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC)
|
||||||
}
|
temp |= LVDS_HSYNC_POLARITY;
|
||||||
|
if (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC)
|
||||||
|
temp |= LVDS_VSYNC_POLARITY;
|
||||||
I915_WRITE(LVDS, temp);
|
I915_WRITE(LVDS, temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4012,7 +4001,6 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
|
||||||
int ret;
|
int ret;
|
||||||
struct fdi_m_n m_n = {0};
|
struct fdi_m_n m_n = {0};
|
||||||
u32 temp;
|
u32 temp;
|
||||||
u32 lvds_sync = 0;
|
|
||||||
int target_clock, pixel_multiplier, lane, link_bw, factor;
|
int target_clock, pixel_multiplier, lane, link_bw, factor;
|
||||||
unsigned int pipe_bpp;
|
unsigned int pipe_bpp;
|
||||||
bool dither;
|
bool dither;
|
||||||
|
@ -4305,22 +4293,11 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
|
||||||
* appropriately here, but we need to look more thoroughly into how
|
* appropriately here, but we need to look more thoroughly into how
|
||||||
* panels behave in the two modes.
|
* panels behave in the two modes.
|
||||||
*/
|
*/
|
||||||
if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC)
|
|
||||||
lvds_sync |= 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_HSYNC_POLARITY | LVDS_VSYNC_POLARITY);
|
||||||
temp |= lvds_sync;
|
if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC)
|
||||||
}
|
temp |= LVDS_HSYNC_POLARITY;
|
||||||
|
if (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC)
|
||||||
|
temp |= LVDS_VSYNC_POLARITY;
|
||||||
I915_WRITE(PCH_LVDS, temp);
|
I915_WRITE(PCH_LVDS, temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue