Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345656
b: refs/heads/master
c: 68d18ad
h: refs/heads/master
v: v3
  • Loading branch information
Paulo Zanoni authored and Daniel Vetter committed Dec 10, 2012
1 parent 571dde4 commit b1fbca4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dde86e2db54545ef981b64805097a7b4c3156d6e
refs/heads/master: 68d18ad7fbc16288aa230ec0ffb4416fd4363c87
2 changes: 2 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,8 @@ typedef struct drm_i915_private {
bool hw_contexts_disabled;
uint32_t hw_context_size;

bool fdi_rx_polarity_reversed;

struct i915_suspend_saved_registers regfile;

/* Old dri1 support infrastructure, beware the dragons ya fools entering
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/i915/i915_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -3917,6 +3917,7 @@
#define FDI_FS_ERRC_ENABLE (1<<27)
#define FDI_FE_ERRC_ENABLE (1<<26)
#define FDI_DP_PORT_WIDTH_X8 (7<<19)
#define FDI_RX_POLARITY_REVERSED_LPT (1<<16)
#define FDI_8BPC (0<<16)
#define FDI_10BPC (1<<16)
#define FDI_6BPC (2<<16)
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/gpu/drm/i915/intel_crt.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,4 +798,12 @@ void intel_crt_init(struct drm_device *dev)
crt->force_hotplug_required = 0;

dev_priv->hotplug_supported_mask |= CRT_HOTPLUG_INT_STATUS;

/*
* TODO: find a proper way to discover whether we need to set the
* polarity reversal bit or not, instead of relying on the BIOS.
*/
if (HAS_PCH_LPT(dev))
dev_priv->fdi_rx_polarity_reversed =
!!(I915_READ(_FDI_RXA_CTL) & FDI_RX_POLARITY_REVERSED_LPT);
}
2 changes: 2 additions & 0 deletions trunk/drivers/gpu/drm/i915/intel_ddi.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ void hsw_fdi_link_train(struct drm_crtc *crtc)
/* Enable the PCH Receiver FDI PLL */
rx_ctl_val = FDI_RX_PLL_ENABLE | FDI_RX_ENHANCE_FRAME_ENABLE |
((intel_crtc->fdi_lanes - 1) << 19);
if (dev_priv->fdi_rx_polarity_reversed)
rx_ctl_val |= FDI_RX_POLARITY_REVERSED_LPT;
I915_WRITE(_FDI_RXA_CTL, rx_ctl_val);
POSTING_READ(_FDI_RXA_CTL);
udelay(220);
Expand Down

0 comments on commit b1fbca4

Please sign in to comment.