[Intel-gfx] [PATCH 2/2] drm/i915: use SNB A step FDI values on A step CPUs
Jesse Barnes
jbarnes at virtuousgeek.org
Wed May 21 20:42:26 CEST 2014
More of an example of where to use the stepping macro than anything
else. I think these early steppings never went outside of Intel.
Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
---
drivers/gpu/drm/i915/intel_display.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index bdb4624..828bac5 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2883,6 +2883,13 @@ static void ironlake_fdi_link_train(struct drm_crtc *crtc)
}
+static const int snb_a_fdi_train_param[] = {
+ FDI_LINK_TRAIN_400MV_0DB_SNB_A,
+ FDI_LINK_TRAIN_400MV_6DB_SNB_A,
+ FDI_LINK_TRAIN_600MV_3_5DB_SNB_A,
+ FDI_LINK_TRAIN_800MV_0DB_SNB_A,
+};
+
static const int snb_b_fdi_train_param[] = {
FDI_LINK_TRAIN_400MV_0DB_SNB_B,
FDI_LINK_TRAIN_400MV_6DB_SNB_B,
@@ -2898,6 +2905,12 @@ static void gen6_fdi_link_train(struct drm_crtc *crtc)
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
int pipe = intel_crtc->pipe;
u32 reg, temp, i, retry;
+ const int *train_param;
+
+ if (INTEL_STEPPING(dev) == 0)
+ train_param = snb_a_fdi_train_param;
+ else
+ train_param = snb_b_fdi_train_param;
/* Train 1: umask FDI RX Interrupt symbol_lock and bit_lock bit
for train result */
@@ -2943,7 +2956,7 @@ static void gen6_fdi_link_train(struct drm_crtc *crtc)
reg = FDI_TX_CTL(pipe);
temp = I915_READ(reg);
temp &= ~FDI_LINK_TRAIN_VOL_EMP_MASK;
- temp |= snb_b_fdi_train_param[i];
+ temp |= train_param[i];
I915_WRITE(reg, temp);
POSTING_READ(reg);
@@ -2996,7 +3009,7 @@ static void gen6_fdi_link_train(struct drm_crtc *crtc)
reg = FDI_TX_CTL(pipe);
temp = I915_READ(reg);
temp &= ~FDI_LINK_TRAIN_VOL_EMP_MASK;
- temp |= snb_b_fdi_train_param[i];
+ temp |= train_param[i];
I915_WRITE(reg, temp);
POSTING_READ(reg);
--
1.8.4.2
More information about the Intel-gfx
mailing list