Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 881ee988 authored by Keith Packard's avatar Keith Packard Committed by Dave Airlie
Browse files

i915: Save/restore MCHBAR_RENDER_STANDBY on GM965/GM45



This register is set by the 2D driver to prevent lockups, and so it needs to
be preserved across suspend/resume too. This makes my X200s work.

Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent 3ad4f597
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -157,6 +157,7 @@ typedef struct drm_i915_private {
	u32 saveDSPACNTR;
	u32 saveDSPBCNTR;
	u32 saveDSPARB;
	u32 saveRENDERSTANDBY;
	u32 savePIPEACONF;
	u32 savePIPEBCONF;
	u32 savePIPEASRC;
+3 −0
Original line number Diff line number Diff line
@@ -527,6 +527,9 @@
#define C0DRB3			0x10206
#define C1DRB3			0x10606

/** GM965 GM45 render standby register */
#define MCHBAR_RENDER_STANDBY	0x111B8

/*
 * Overlay regs
 */
+9 −0
Original line number Diff line number Diff line
@@ -240,6 +240,10 @@ int i915_save_state(struct drm_device *dev)

	pci_read_config_byte(dev->pdev, LBB, &dev_priv->saveLBB);

	/* Render Standby */
	if (IS_I965G(dev) && IS_MOBILE(dev))
		dev_priv->saveRENDERSTANDBY = I915_READ(MCHBAR_RENDER_STANDBY);

	/* Display arbitration control */
	dev_priv->saveDSPARB = I915_READ(DSPARB);

@@ -365,6 +369,11 @@ int i915_restore_state(struct drm_device *dev)

	pci_write_config_byte(dev->pdev, LBB, dev_priv->saveLBB);

	/* Render Standby */
	if (IS_I965G(dev) && IS_MOBILE(dev))
		I915_WRITE(MCHBAR_RENDER_STANDBY, dev_priv->saveRENDERSTANDBY);

	/* Display arbitration */
	I915_WRITE(DSPARB, dev_priv->saveDSPARB);

	/* Pipe & plane A info */