提交 cda2bb78 编写于 作者: A Adam Jackson 提交者: Keith Packard

drm/i915/pch: Save/restore PCH_PORT_HOTPLUG across suspend

At least on a Lenovo X220 the HPD bits of this are enabled at boot but
cleared after resume, which means plug interrupts stop working.

This also happens to fix DP displays re-lighting on resume.  I'm quite
certain that's an accident: the first DP link train inevitably fails on
that machine, and it's only serendipity that we're getting multiple plug
interrupts and the second train works.  But I shall take my victories
where I get them.
Signed-off-by: NAdam Jackson <ajax@redhat.com>
Tested-by: NKeith Packard <keithp@keithp.com>
Reviewed-by: NKeith Packard <keithp@keithp.com>
Signed-off-by: NKeith Packard <keithp@keithp.com>
上级 291427f5
...@@ -541,6 +541,7 @@ typedef struct drm_i915_private { ...@@ -541,6 +541,7 @@ typedef struct drm_i915_private {
u32 savePIPEB_LINK_M1; u32 savePIPEB_LINK_M1;
u32 savePIPEB_LINK_N1; u32 savePIPEB_LINK_N1;
u32 saveMCHBAR_RENDER_STANDBY; u32 saveMCHBAR_RENDER_STANDBY;
u32 savePCH_PORT_HOTPLUG;
struct { struct {
/** Bridge to intel-gtt-ko */ /** Bridge to intel-gtt-ko */
......
...@@ -814,6 +814,7 @@ int i915_save_state(struct drm_device *dev) ...@@ -814,6 +814,7 @@ int i915_save_state(struct drm_device *dev)
dev_priv->saveFDI_RXB_IMR = I915_READ(_FDI_RXB_IMR); dev_priv->saveFDI_RXB_IMR = I915_READ(_FDI_RXB_IMR);
dev_priv->saveMCHBAR_RENDER_STANDBY = dev_priv->saveMCHBAR_RENDER_STANDBY =
I915_READ(RSTDBYCTL); I915_READ(RSTDBYCTL);
dev_priv->savePCH_PORT_HOTPLUG = I915_READ(PCH_PORT_HOTPLUG);
} else { } else {
dev_priv->saveIER = I915_READ(IER); dev_priv->saveIER = I915_READ(IER);
dev_priv->saveIMR = I915_READ(IMR); dev_priv->saveIMR = I915_READ(IMR);
...@@ -865,6 +866,7 @@ int i915_restore_state(struct drm_device *dev) ...@@ -865,6 +866,7 @@ int i915_restore_state(struct drm_device *dev)
I915_WRITE(GTIMR, dev_priv->saveGTIMR); I915_WRITE(GTIMR, dev_priv->saveGTIMR);
I915_WRITE(_FDI_RXA_IMR, dev_priv->saveFDI_RXA_IMR); I915_WRITE(_FDI_RXA_IMR, dev_priv->saveFDI_RXA_IMR);
I915_WRITE(_FDI_RXB_IMR, dev_priv->saveFDI_RXB_IMR); I915_WRITE(_FDI_RXB_IMR, dev_priv->saveFDI_RXB_IMR);
I915_WRITE(PCH_PORT_HOTPLUG, dev_priv->savePCH_PORT_HOTPLUG);
} else { } else {
I915_WRITE(IER, dev_priv->saveIER); I915_WRITE(IER, dev_priv->saveIER);
I915_WRITE(IMR, dev_priv->saveIMR); I915_WRITE(IMR, dev_priv->saveIMR);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册