diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-07-22 16:18:18 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-07-26 14:27:03 -0400 |
commit | 4a655f043160eeae447efd3be297b6b4c397a640 (patch) | |
tree | 7332d15be37e4ca939a83f3ca223f93c70813359 /drivers | |
parent | 6ba770dc5c334aff1c055c8728d34656e0f091e2 (diff) |
drm/i915: add PANEL_UNLOCK_REGS definition
In some cases, unlocking the panel regs is safe and can help us avoid a
flickery, full mode set sequence. So define the unlock key and use it.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 150400f40534..c41f945283ab 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -2805,6 +2805,7 @@ | |||
2805 | 2805 | ||
2806 | #define PCH_PP_STATUS 0xc7200 | 2806 | #define PCH_PP_STATUS 0xc7200 |
2807 | #define PCH_PP_CONTROL 0xc7204 | 2807 | #define PCH_PP_CONTROL 0xc7204 |
2808 | #define PANEL_UNLOCK_REGS (0xabcd << 16) | ||
2808 | #define EDP_FORCE_VDD (1 << 3) | 2809 | #define EDP_FORCE_VDD (1 << 3) |
2809 | #define EDP_BLC_ENABLE (1 << 2) | 2810 | #define EDP_BLC_ENABLE (1 << 2) |
2810 | #define PANEL_POWER_RESET (1 << 1) | 2811 | #define PANEL_POWER_RESET (1 << 1) |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f28691f9742a..6d5477c5df04 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4413,7 +4413,8 @@ static void intel_increase_pllclock(struct drm_crtc *crtc, bool schedule) | |||
4413 | DRM_DEBUG_DRIVER("upclocking LVDS\n"); | 4413 | DRM_DEBUG_DRIVER("upclocking LVDS\n"); |
4414 | 4414 | ||
4415 | /* Unlock panel regs */ | 4415 | /* Unlock panel regs */ |
4416 | I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) | (0xabcd << 16)); | 4416 | I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) | |
4417 | PANEL_UNLOCK_REGS); | ||
4417 | 4418 | ||
4418 | dpll &= ~DISPLAY_RATE_SELECT_FPA1; | 4419 | dpll &= ~DISPLAY_RATE_SELECT_FPA1; |
4419 | I915_WRITE(dpll_reg, dpll); | 4420 | I915_WRITE(dpll_reg, dpll); |
@@ -4456,7 +4457,8 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc) | |||
4456 | DRM_DEBUG_DRIVER("downclocking LVDS\n"); | 4457 | DRM_DEBUG_DRIVER("downclocking LVDS\n"); |
4457 | 4458 | ||
4458 | /* Unlock panel regs */ | 4459 | /* Unlock panel regs */ |
4459 | I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) | (0xabcd << 16)); | 4460 | I915_WRITE(PP_CONTROL, I915_READ(PP_CONTROL) | |
4461 | PANEL_UNLOCK_REGS); | ||
4460 | 4462 | ||
4461 | dpll |= DISPLAY_RATE_SELECT_FPA1; | 4463 | dpll |= DISPLAY_RATE_SELECT_FPA1; |
4462 | I915_WRITE(dpll_reg, dpll); | 4464 | I915_WRITE(dpll_reg, dpll); |