diff options
-rw-r--r-- | drivers/char/drm/i915_drv.c | 18 | ||||
-rw-r--r-- | drivers/char/drm/i915_drv.h | 10 |
2 files changed, 28 insertions, 0 deletions
diff --git a/drivers/char/drm/i915_drv.c b/drivers/char/drm/i915_drv.c index 248e7b1c46a5..5025f5b02412 100644 --- a/drivers/char/drm/i915_drv.c +++ b/drivers/char/drm/i915_drv.c | |||
@@ -342,6 +342,15 @@ static int i915_suspend(struct drm_device *dev) | |||
342 | dev_priv->saveVCLK_POST_DIV = I915_READ(VCLK_POST_DIV); | 342 | dev_priv->saveVCLK_POST_DIV = I915_READ(VCLK_POST_DIV); |
343 | dev_priv->saveVGACNTRL = I915_READ(VGACNTRL); | 343 | dev_priv->saveVGACNTRL = I915_READ(VGACNTRL); |
344 | 344 | ||
345 | /* Clock gating state */ | ||
346 | dev_priv->saveDSPCLK_GATE_D = I915_READ(DSPCLK_GATE_D); | ||
347 | |||
348 | /* Cache mode state */ | ||
349 | dev_priv->saveCACHE_MODE_0 = I915_READ(CACHE_MODE_0); | ||
350 | |||
351 | /* Memory Arbitration state */ | ||
352 | dev_priv->saveMI_ARB_STATE = I915_READ(MI_ARB_STATE); | ||
353 | |||
345 | /* Scratch space */ | 354 | /* Scratch space */ |
346 | for (i = 0; i < 16; i++) { | 355 | for (i = 0; i < 16; i++) { |
347 | dev_priv->saveSWF0[i] = I915_READ(SWF0 + (i << 2)); | 356 | dev_priv->saveSWF0[i] = I915_READ(SWF0 + (i << 2)); |
@@ -489,6 +498,15 @@ static int i915_resume(struct drm_device *dev) | |||
489 | I915_WRITE(VCLK_POST_DIV, dev_priv->saveVCLK_POST_DIV); | 498 | I915_WRITE(VCLK_POST_DIV, dev_priv->saveVCLK_POST_DIV); |
490 | udelay(150); | 499 | udelay(150); |
491 | 500 | ||
501 | /* Clock gating state */ | ||
502 | I915_WRITE (DSPCLK_GATE_D, dev_priv->saveDSPCLK_GATE_D); | ||
503 | |||
504 | /* Cache mode state */ | ||
505 | I915_WRITE (CACHE_MODE_0, dev_priv->saveCACHE_MODE_0 | 0xffff0000); | ||
506 | |||
507 | /* Memory arbitration state */ | ||
508 | I915_WRITE (MI_ARB_STATE, dev_priv->saveMI_ARB_STATE | 0xffff0000); | ||
509 | |||
492 | for (i = 0; i < 16; i++) { | 510 | for (i = 0; i < 16; i++) { |
493 | I915_WRITE(SWF0 + (i << 2), dev_priv->saveSWF0[i]); | 511 | I915_WRITE(SWF0 + (i << 2), dev_priv->saveSWF0[i]); |
494 | I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i+7]); | 512 | I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i+7]); |
diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h index 360f6600427b..c10d128e34db 100644 --- a/drivers/char/drm/i915_drv.h +++ b/drivers/char/drm/i915_drv.h | |||
@@ -187,6 +187,9 @@ typedef struct drm_i915_private { | |||
187 | u32 saveIER; | 187 | u32 saveIER; |
188 | u32 saveIIR; | 188 | u32 saveIIR; |
189 | u32 saveIMR; | 189 | u32 saveIMR; |
190 | u32 saveCACHE_MODE_0; | ||
191 | u32 saveDSPCLK_GATE_D; | ||
192 | u32 saveMI_ARB_STATE; | ||
190 | u32 saveSWF0[16]; | 193 | u32 saveSWF0[16]; |
191 | u32 saveSWF1[16]; | 194 | u32 saveSWF1[16]; |
192 | u32 saveSWF2[3]; | 195 | u32 saveSWF2[3]; |
@@ -455,6 +458,10 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
455 | */ | 458 | */ |
456 | #define DMA_FADD_S 0x20d4 | 459 | #define DMA_FADD_S 0x20d4 |
457 | 460 | ||
461 | /* Memory Interface Arbitration State | ||
462 | */ | ||
463 | #define MI_ARB_STATE 0x20e4 | ||
464 | |||
458 | /* Cache mode 0 reg. | 465 | /* Cache mode 0 reg. |
459 | * - Manipulating render cache behaviour is central | 466 | * - Manipulating render cache behaviour is central |
460 | * to the concept of zone rendering, tuning this reg can help avoid | 467 | * to the concept of zone rendering, tuning this reg can help avoid |
@@ -465,6 +472,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
465 | * bit of interest either set or cleared. EG: (BIT<<16) | BIT to set. | 472 | * bit of interest either set or cleared. EG: (BIT<<16) | BIT to set. |
466 | */ | 473 | */ |
467 | #define Cache_Mode_0 0x2120 | 474 | #define Cache_Mode_0 0x2120 |
475 | #define CACHE_MODE_0 0x2120 | ||
468 | #define CM0_MASK_SHIFT 16 | 476 | #define CM0_MASK_SHIFT 16 |
469 | #define CM0_IZ_OPT_DISABLE (1<<6) | 477 | #define CM0_IZ_OPT_DISABLE (1<<6) |
470 | #define CM0_ZR_OPT_DISABLE (1<<5) | 478 | #define CM0_ZR_OPT_DISABLE (1<<5) |
@@ -660,6 +668,8 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
660 | /** P1 value is 2 greater than this field */ | 668 | /** P1 value is 2 greater than this field */ |
661 | # define VGA0_PD_P1_MASK (0x1f << 0) | 669 | # define VGA0_PD_P1_MASK (0x1f << 0) |
662 | 670 | ||
671 | #define DSPCLK_GATE_D 0x6200 | ||
672 | |||
663 | /* I830 CRTC registers */ | 673 | /* I830 CRTC registers */ |
664 | #define HTOTAL_A 0x60000 | 674 | #define HTOTAL_A 0x60000 |
665 | #define HBLANK_A 0x60004 | 675 | #define HBLANK_A 0x60004 |