aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2008-07-29 14:54:06 -0400
committerDave Airlie <airlied@linux.ie>2008-10-17 17:10:10 -0400
commit585fb111348f7cdc30c6a1b903987612ddeafb23 (patch)
tree7998ada4b4cb1c251d808f5cba30b3b4174e70cf /drivers/gpu/drm/i915/i915_drv.c
parent962d4fd7273e144ae003ddb90138ae4b80567c70 (diff)
i915: Use more consistent names for regs, and store them in a separate file.
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 93aed1c38bd2..6c99aab12da3 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -279,13 +279,13 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
279 dev_priv->saveDSPASTRIDE = I915_READ(DSPASTRIDE); 279 dev_priv->saveDSPASTRIDE = I915_READ(DSPASTRIDE);
280 dev_priv->saveDSPASIZE = I915_READ(DSPASIZE); 280 dev_priv->saveDSPASIZE = I915_READ(DSPASIZE);
281 dev_priv->saveDSPAPOS = I915_READ(DSPAPOS); 281 dev_priv->saveDSPAPOS = I915_READ(DSPAPOS);
282 dev_priv->saveDSPABASE = I915_READ(DSPABASE); 282 dev_priv->saveDSPAADDR = I915_READ(DSPAADDR);
283 if (IS_I965G(dev)) { 283 if (IS_I965G(dev)) {
284 dev_priv->saveDSPASURF = I915_READ(DSPASURF); 284 dev_priv->saveDSPASURF = I915_READ(DSPASURF);
285 dev_priv->saveDSPATILEOFF = I915_READ(DSPATILEOFF); 285 dev_priv->saveDSPATILEOFF = I915_READ(DSPATILEOFF);
286 } 286 }
287 i915_save_palette(dev, PIPE_A); 287 i915_save_palette(dev, PIPE_A);
288 dev_priv->savePIPEASTAT = I915_READ(I915REG_PIPEASTAT); 288 dev_priv->savePIPEASTAT = I915_READ(PIPEASTAT);
289 289
290 /* Pipe & plane B info */ 290 /* Pipe & plane B info */
291 dev_priv->savePIPEBCONF = I915_READ(PIPEBCONF); 291 dev_priv->savePIPEBCONF = I915_READ(PIPEBCONF);
@@ -307,13 +307,13 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
307 dev_priv->saveDSPBSTRIDE = I915_READ(DSPBSTRIDE); 307 dev_priv->saveDSPBSTRIDE = I915_READ(DSPBSTRIDE);
308 dev_priv->saveDSPBSIZE = I915_READ(DSPBSIZE); 308 dev_priv->saveDSPBSIZE = I915_READ(DSPBSIZE);
309 dev_priv->saveDSPBPOS = I915_READ(DSPBPOS); 309 dev_priv->saveDSPBPOS = I915_READ(DSPBPOS);
310 dev_priv->saveDSPBBASE = I915_READ(DSPBBASE); 310 dev_priv->saveDSPBADDR = I915_READ(DSPBADDR);
311 if (IS_I965GM(dev) || IS_IGD_GM(dev)) { 311 if (IS_I965GM(dev) || IS_IGD_GM(dev)) {
312 dev_priv->saveDSPBSURF = I915_READ(DSPBSURF); 312 dev_priv->saveDSPBSURF = I915_READ(DSPBSURF);
313 dev_priv->saveDSPBTILEOFF = I915_READ(DSPBTILEOFF); 313 dev_priv->saveDSPBTILEOFF = I915_READ(DSPBTILEOFF);
314 } 314 }
315 i915_save_palette(dev, PIPE_B); 315 i915_save_palette(dev, PIPE_B);
316 dev_priv->savePIPEBSTAT = I915_READ(I915REG_PIPEBSTAT); 316 dev_priv->savePIPEBSTAT = I915_READ(PIPEBSTAT);
317 317
318 /* CRT state */ 318 /* CRT state */
319 dev_priv->saveADPA = I915_READ(ADPA); 319 dev_priv->saveADPA = I915_READ(ADPA);
@@ -328,9 +328,9 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
328 dev_priv->saveLVDS = I915_READ(LVDS); 328 dev_priv->saveLVDS = I915_READ(LVDS);
329 if (!IS_I830(dev) && !IS_845G(dev)) 329 if (!IS_I830(dev) && !IS_845G(dev))
330 dev_priv->savePFIT_CONTROL = I915_READ(PFIT_CONTROL); 330 dev_priv->savePFIT_CONTROL = I915_READ(PFIT_CONTROL);
331 dev_priv->saveLVDSPP_ON = I915_READ(LVDSPP_ON); 331 dev_priv->savePP_ON_DELAYS = I915_READ(PP_ON_DELAYS);
332 dev_priv->saveLVDSPP_OFF = I915_READ(LVDSPP_OFF); 332 dev_priv->savePP_OFF_DELAYS = I915_READ(PP_OFF_DELAYS);
333 dev_priv->savePP_CYCLE = I915_READ(PP_CYCLE); 333 dev_priv->savePP_DIVISOR = I915_READ(PP_DIVISOR);
334 334
335 /* FIXME: save TV & SDVO state */ 335 /* FIXME: save TV & SDVO state */
336 336
@@ -341,19 +341,19 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
341 dev_priv->saveFBC_CONTROL = I915_READ(FBC_CONTROL); 341 dev_priv->saveFBC_CONTROL = I915_READ(FBC_CONTROL);
342 342
343 /* Interrupt state */ 343 /* Interrupt state */
344 dev_priv->saveIIR = I915_READ(I915REG_INT_IDENTITY_R); 344 dev_priv->saveIIR = I915_READ(IIR);
345 dev_priv->saveIER = I915_READ(I915REG_INT_ENABLE_R); 345 dev_priv->saveIER = I915_READ(IER);
346 dev_priv->saveIMR = I915_READ(I915REG_INT_MASK_R); 346 dev_priv->saveIMR = I915_READ(IMR);
347 347
348 /* VGA state */ 348 /* VGA state */
349 dev_priv->saveVCLK_DIVISOR_VGA0 = I915_READ(VCLK_DIVISOR_VGA0); 349 dev_priv->saveVGA0 = I915_READ(VGA0);
350 dev_priv->saveVCLK_DIVISOR_VGA1 = I915_READ(VCLK_DIVISOR_VGA1); 350 dev_priv->saveVGA1 = I915_READ(VGA1);
351 dev_priv->saveVCLK_POST_DIV = I915_READ(VCLK_POST_DIV); 351 dev_priv->saveVGA_PD = I915_READ(VGA_PD);
352 dev_priv->saveVGACNTRL = I915_READ(VGACNTRL); 352 dev_priv->saveVGACNTRL = I915_READ(VGACNTRL);
353 353
354 /* Clock gating state */ 354 /* Clock gating state */
355 dev_priv->saveD_STATE = I915_READ(D_STATE); 355 dev_priv->saveD_STATE = I915_READ(D_STATE);
356 dev_priv->saveDSPCLK_GATE_D = I915_READ(DSPCLK_GATE_D); 356 dev_priv->saveCG_2D_DIS = I915_READ(CG_2D_DIS);
357 357
358 /* Cache mode state */ 358 /* Cache mode state */
359 dev_priv->saveCACHE_MODE_0 = I915_READ(CACHE_MODE_0); 359 dev_priv->saveCACHE_MODE_0 = I915_READ(CACHE_MODE_0);
@@ -363,7 +363,7 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
363 363
364 /* Scratch space */ 364 /* Scratch space */
365 for (i = 0; i < 16; i++) { 365 for (i = 0; i < 16; i++) {
366 dev_priv->saveSWF0[i] = I915_READ(SWF0 + (i << 2)); 366 dev_priv->saveSWF0[i] = I915_READ(SWF00 + (i << 2));
367 dev_priv->saveSWF1[i] = I915_READ(SWF10 + (i << 2)); 367 dev_priv->saveSWF1[i] = I915_READ(SWF10 + (i << 2));
368 } 368 }
369 for (i = 0; i < 3; i++) 369 for (i = 0; i < 3; i++)
@@ -424,7 +424,7 @@ static int i915_resume(struct drm_device *dev)
424 I915_WRITE(DSPASIZE, dev_priv->saveDSPASIZE); 424 I915_WRITE(DSPASIZE, dev_priv->saveDSPASIZE);
425 I915_WRITE(DSPAPOS, dev_priv->saveDSPAPOS); 425 I915_WRITE(DSPAPOS, dev_priv->saveDSPAPOS);
426 I915_WRITE(PIPEASRC, dev_priv->savePIPEASRC); 426 I915_WRITE(PIPEASRC, dev_priv->savePIPEASRC);
427 I915_WRITE(DSPABASE, dev_priv->saveDSPABASE); 427 I915_WRITE(DSPAADDR, dev_priv->saveDSPAADDR);
428 I915_WRITE(DSPASTRIDE, dev_priv->saveDSPASTRIDE); 428 I915_WRITE(DSPASTRIDE, dev_priv->saveDSPASTRIDE);
429 if (IS_I965G(dev)) { 429 if (IS_I965G(dev)) {
430 I915_WRITE(DSPASURF, dev_priv->saveDSPASURF); 430 I915_WRITE(DSPASURF, dev_priv->saveDSPASURF);
@@ -436,7 +436,7 @@ static int i915_resume(struct drm_device *dev)
436 i915_restore_palette(dev, PIPE_A); 436 i915_restore_palette(dev, PIPE_A);
437 /* Enable the plane */ 437 /* Enable the plane */
438 I915_WRITE(DSPACNTR, dev_priv->saveDSPACNTR); 438 I915_WRITE(DSPACNTR, dev_priv->saveDSPACNTR);
439 I915_WRITE(DSPABASE, I915_READ(DSPABASE)); 439 I915_WRITE(DSPAADDR, I915_READ(DSPAADDR));
440 440
441 /* Pipe & plane B info */ 441 /* Pipe & plane B info */
442 if (dev_priv->saveDPLL_B & DPLL_VCO_ENABLE) { 442 if (dev_priv->saveDPLL_B & DPLL_VCO_ENABLE) {
@@ -466,7 +466,7 @@ static int i915_resume(struct drm_device *dev)
466 I915_WRITE(DSPBSIZE, dev_priv->saveDSPBSIZE); 466 I915_WRITE(DSPBSIZE, dev_priv->saveDSPBSIZE);
467 I915_WRITE(DSPBPOS, dev_priv->saveDSPBPOS); 467 I915_WRITE(DSPBPOS, dev_priv->saveDSPBPOS);
468 I915_WRITE(PIPEBSRC, dev_priv->savePIPEBSRC); 468 I915_WRITE(PIPEBSRC, dev_priv->savePIPEBSRC);
469 I915_WRITE(DSPBBASE, dev_priv->saveDSPBBASE); 469 I915_WRITE(DSPBADDR, dev_priv->saveDSPBADDR);
470 I915_WRITE(DSPBSTRIDE, dev_priv->saveDSPBSTRIDE); 470 I915_WRITE(DSPBSTRIDE, dev_priv->saveDSPBSTRIDE);
471 if (IS_I965G(dev)) { 471 if (IS_I965G(dev)) {
472 I915_WRITE(DSPBSURF, dev_priv->saveDSPBSURF); 472 I915_WRITE(DSPBSURF, dev_priv->saveDSPBSURF);
@@ -478,7 +478,7 @@ static int i915_resume(struct drm_device *dev)
478 i915_restore_palette(dev, PIPE_B); 478 i915_restore_palette(dev, PIPE_B);
479 /* Enable the plane */ 479 /* Enable the plane */
480 I915_WRITE(DSPBCNTR, dev_priv->saveDSPBCNTR); 480 I915_WRITE(DSPBCNTR, dev_priv->saveDSPBCNTR);
481 I915_WRITE(DSPBBASE, I915_READ(DSPBBASE)); 481 I915_WRITE(DSPBADDR, I915_READ(DSPBADDR));
482 482
483 /* CRT state */ 483 /* CRT state */
484 I915_WRITE(ADPA, dev_priv->saveADPA); 484 I915_WRITE(ADPA, dev_priv->saveADPA);
@@ -493,9 +493,9 @@ static int i915_resume(struct drm_device *dev)
493 493
494 I915_WRITE(PFIT_PGM_RATIOS, dev_priv->savePFIT_PGM_RATIOS); 494 I915_WRITE(PFIT_PGM_RATIOS, dev_priv->savePFIT_PGM_RATIOS);
495 I915_WRITE(BLC_PWM_CTL, dev_priv->saveBLC_PWM_CTL); 495 I915_WRITE(BLC_PWM_CTL, dev_priv->saveBLC_PWM_CTL);
496 I915_WRITE(LVDSPP_ON, dev_priv->saveLVDSPP_ON); 496 I915_WRITE(PP_ON_DELAYS, dev_priv->savePP_ON_DELAYS);
497 I915_WRITE(LVDSPP_OFF, dev_priv->saveLVDSPP_OFF); 497 I915_WRITE(PP_OFF_DELAYS, dev_priv->savePP_OFF_DELAYS);
498 I915_WRITE(PP_CYCLE, dev_priv->savePP_CYCLE); 498 I915_WRITE(PP_DIVISOR, dev_priv->savePP_DIVISOR);
499 I915_WRITE(PP_CONTROL, dev_priv->savePP_CONTROL); 499 I915_WRITE(PP_CONTROL, dev_priv->savePP_CONTROL);
500 500
501 /* FIXME: restore TV & SDVO state */ 501 /* FIXME: restore TV & SDVO state */
@@ -508,14 +508,14 @@ static int i915_resume(struct drm_device *dev)
508 508
509 /* VGA state */ 509 /* VGA state */
510 I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL); 510 I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL);
511 I915_WRITE(VCLK_DIVISOR_VGA0, dev_priv->saveVCLK_DIVISOR_VGA0); 511 I915_WRITE(VGA0, dev_priv->saveVGA0);
512 I915_WRITE(VCLK_DIVISOR_VGA1, dev_priv->saveVCLK_DIVISOR_VGA1); 512 I915_WRITE(VGA1, dev_priv->saveVGA1);
513 I915_WRITE(VCLK_POST_DIV, dev_priv->saveVCLK_POST_DIV); 513 I915_WRITE(VGA_PD, dev_priv->saveVGA_PD);
514 udelay(150); 514 udelay(150);
515 515
516 /* Clock gating state */ 516 /* Clock gating state */
517 I915_WRITE (D_STATE, dev_priv->saveD_STATE); 517 I915_WRITE (D_STATE, dev_priv->saveD_STATE);
518 I915_WRITE (DSPCLK_GATE_D, dev_priv->saveDSPCLK_GATE_D); 518 I915_WRITE(CG_2D_DIS, dev_priv->saveCG_2D_DIS);
519 519
520 /* Cache mode state */ 520 /* Cache mode state */
521 I915_WRITE (CACHE_MODE_0, dev_priv->saveCACHE_MODE_0 | 0xffff0000); 521 I915_WRITE (CACHE_MODE_0, dev_priv->saveCACHE_MODE_0 | 0xffff0000);
@@ -524,7 +524,7 @@ static int i915_resume(struct drm_device *dev)
524 I915_WRITE (MI_ARB_STATE, dev_priv->saveMI_ARB_STATE | 0xffff0000); 524 I915_WRITE (MI_ARB_STATE, dev_priv->saveMI_ARB_STATE | 0xffff0000);
525 525
526 for (i = 0; i < 16; i++) { 526 for (i = 0; i < 16; i++) {
527 I915_WRITE(SWF0 + (i << 2), dev_priv->saveSWF0[i]); 527 I915_WRITE(SWF00 + (i << 2), dev_priv->saveSWF0[i]);
528 I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i+7]); 528 I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i+7]);
529 } 529 }
530 for (i = 0; i < 3; i++) 530 for (i = 0; i < 3; i++)