diff options
author | Adam Jackson <ajax@redhat.com> | 2009-12-03 17:14:42 -0500 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-12-07 17:55:56 -0500 |
commit | f2b115e69d46344ae7afcaad5823496d2a0d8650 (patch) | |
tree | 8bf56f7d43e3462a26088317bad04f04b676d26c /drivers/gpu/drm/i915/intel_display.c | |
parent | 107f517b8f2a9d5858e640bc046606b1cff14bb5 (diff) |
drm/i915: Fix product names and #defines
IGD* isn't a useful name. Replace with the codenames, as sourced from
pci.ids.
Signed-off-by: Adam Jackson <ajax@redhat.com>
[anholt: Fixed up for merge with pineview/ironlake changes]
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 408 |
1 files changed, 203 insertions, 205 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 6b9dd672dd59..902cc5386f19 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -102,32 +102,32 @@ struct intel_limit { | |||
102 | #define I9XX_DOT_MAX 400000 | 102 | #define I9XX_DOT_MAX 400000 |
103 | #define I9XX_VCO_MIN 1400000 | 103 | #define I9XX_VCO_MIN 1400000 |
104 | #define I9XX_VCO_MAX 2800000 | 104 | #define I9XX_VCO_MAX 2800000 |
105 | #define IGD_VCO_MIN 1700000 | 105 | #define PINEVIEW_VCO_MIN 1700000 |
106 | #define IGD_VCO_MAX 3500000 | 106 | #define PINEVIEW_VCO_MAX 3500000 |
107 | #define I9XX_N_MIN 1 | 107 | #define I9XX_N_MIN 1 |
108 | #define I9XX_N_MAX 6 | 108 | #define I9XX_N_MAX 6 |
109 | /* IGD's Ncounter is a ring counter */ | 109 | /* Pineview's Ncounter is a ring counter */ |
110 | #define IGD_N_MIN 3 | 110 | #define PINEVIEW_N_MIN 3 |
111 | #define IGD_N_MAX 6 | 111 | #define PINEVIEW_N_MAX 6 |
112 | #define I9XX_M_MIN 70 | 112 | #define I9XX_M_MIN 70 |
113 | #define I9XX_M_MAX 120 | 113 | #define I9XX_M_MAX 120 |
114 | #define IGD_M_MIN 2 | 114 | #define PINEVIEW_M_MIN 2 |
115 | #define IGD_M_MAX 256 | 115 | #define PINEVIEW_M_MAX 256 |
116 | #define I9XX_M1_MIN 10 | 116 | #define I9XX_M1_MIN 10 |
117 | #define I9XX_M1_MAX 22 | 117 | #define I9XX_M1_MAX 22 |
118 | #define I9XX_M2_MIN 5 | 118 | #define I9XX_M2_MIN 5 |
119 | #define I9XX_M2_MAX 9 | 119 | #define I9XX_M2_MAX 9 |
120 | /* IGD M1 is reserved, and must be 0 */ | 120 | /* Pineview M1 is reserved, and must be 0 */ |
121 | #define IGD_M1_MIN 0 | 121 | #define PINEVIEW_M1_MIN 0 |
122 | #define IGD_M1_MAX 0 | 122 | #define PINEVIEW_M1_MAX 0 |
123 | #define IGD_M2_MIN 0 | 123 | #define PINEVIEW_M2_MIN 0 |
124 | #define IGD_M2_MAX 254 | 124 | #define PINEVIEW_M2_MAX 254 |
125 | #define I9XX_P_SDVO_DAC_MIN 5 | 125 | #define I9XX_P_SDVO_DAC_MIN 5 |
126 | #define I9XX_P_SDVO_DAC_MAX 80 | 126 | #define I9XX_P_SDVO_DAC_MAX 80 |
127 | #define I9XX_P_LVDS_MIN 7 | 127 | #define I9XX_P_LVDS_MIN 7 |
128 | #define I9XX_P_LVDS_MAX 98 | 128 | #define I9XX_P_LVDS_MAX 98 |
129 | #define IGD_P_LVDS_MIN 7 | 129 | #define PINEVIEW_P_LVDS_MIN 7 |
130 | #define IGD_P_LVDS_MAX 112 | 130 | #define PINEVIEW_P_LVDS_MAX 112 |
131 | #define I9XX_P1_MIN 1 | 131 | #define I9XX_P1_MIN 1 |
132 | #define I9XX_P1_MAX 8 | 132 | #define I9XX_P1_MAX 8 |
133 | #define I9XX_P2_SDVO_DAC_SLOW 10 | 133 | #define I9XX_P2_SDVO_DAC_SLOW 10 |
@@ -234,33 +234,33 @@ struct intel_limit { | |||
234 | #define G4X_P2_DISPLAY_PORT_FAST 10 | 234 | #define G4X_P2_DISPLAY_PORT_FAST 10 |
235 | #define G4X_P2_DISPLAY_PORT_LIMIT 0 | 235 | #define G4X_P2_DISPLAY_PORT_LIMIT 0 |
236 | 236 | ||
237 | /* IGDNG */ | 237 | /* Ironlake */ |
238 | /* as we calculate clock using (register_value + 2) for | 238 | /* as we calculate clock using (register_value + 2) for |
239 | N/M1/M2, so here the range value for them is (actual_value-2). | 239 | N/M1/M2, so here the range value for them is (actual_value-2). |
240 | */ | 240 | */ |
241 | #define IGDNG_DOT_MIN 25000 | 241 | #define IRONLAKE_DOT_MIN 25000 |
242 | #define IGDNG_DOT_MAX 350000 | 242 | #define IRONLAKE_DOT_MAX 350000 |
243 | #define IGDNG_VCO_MIN 1760000 | 243 | #define IRONLAKE_VCO_MIN 1760000 |
244 | #define IGDNG_VCO_MAX 3510000 | 244 | #define IRONLAKE_VCO_MAX 3510000 |
245 | #define IGDNG_N_MIN 1 | 245 | #define IRONLAKE_N_MIN 1 |
246 | #define IGDNG_N_MAX 5 | 246 | #define IRONLAKE_N_MAX 5 |
247 | #define IGDNG_M_MIN 79 | 247 | #define IRONLAKE_M_MIN 79 |
248 | #define IGDNG_M_MAX 118 | 248 | #define IRONLAKE_M_MAX 118 |
249 | #define IGDNG_M1_MIN 12 | 249 | #define IRONLAKE_M1_MIN 12 |
250 | #define IGDNG_M1_MAX 23 | 250 | #define IRONLAKE_M1_MAX 23 |
251 | #define IGDNG_M2_MIN 5 | 251 | #define IRONLAKE_M2_MIN 5 |
252 | #define IGDNG_M2_MAX 9 | 252 | #define IRONLAKE_M2_MAX 9 |
253 | #define IGDNG_P_SDVO_DAC_MIN 5 | 253 | #define IRONLAKE_P_SDVO_DAC_MIN 5 |
254 | #define IGDNG_P_SDVO_DAC_MAX 80 | 254 | #define IRONLAKE_P_SDVO_DAC_MAX 80 |
255 | #define IGDNG_P_LVDS_MIN 28 | 255 | #define IRONLAKE_P_LVDS_MIN 28 |
256 | #define IGDNG_P_LVDS_MAX 112 | 256 | #define IRONLAKE_P_LVDS_MAX 112 |
257 | #define IGDNG_P1_MIN 1 | 257 | #define IRONLAKE_P1_MIN 1 |
258 | #define IGDNG_P1_MAX 8 | 258 | #define IRONLAKE_P1_MAX 8 |
259 | #define IGDNG_P2_SDVO_DAC_SLOW 10 | 259 | #define IRONLAKE_P2_SDVO_DAC_SLOW 10 |
260 | #define IGDNG_P2_SDVO_DAC_FAST 5 | 260 | #define IRONLAKE_P2_SDVO_DAC_FAST 5 |
261 | #define IGDNG_P2_LVDS_SLOW 14 /* single channel */ | 261 | #define IRONLAKE_P2_LVDS_SLOW 14 /* single channel */ |
262 | #define IGDNG_P2_LVDS_FAST 7 /* double channel */ | 262 | #define IRONLAKE_P2_LVDS_FAST 7 /* double channel */ |
263 | #define IGDNG_P2_DOT_LIMIT 225000 /* 225Mhz */ | 263 | #define IRONLAKE_P2_DOT_LIMIT 225000 /* 225Mhz */ |
264 | 264 | ||
265 | static bool | 265 | static bool |
266 | intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, | 266 | intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, |
@@ -272,15 +272,15 @@ static bool | |||
272 | intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, | 272 | intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, |
273 | int target, int refclk, intel_clock_t *best_clock); | 273 | int target, int refclk, intel_clock_t *best_clock); |
274 | static bool | 274 | static bool |
275 | intel_igdng_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, | 275 | intel_ironlake_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, |
276 | int target, int refclk, intel_clock_t *best_clock); | 276 | int target, int refclk, intel_clock_t *best_clock); |
277 | 277 | ||
278 | static bool | 278 | static bool |
279 | intel_find_pll_g4x_dp(const intel_limit_t *, struct drm_crtc *crtc, | 279 | intel_find_pll_g4x_dp(const intel_limit_t *, struct drm_crtc *crtc, |
280 | int target, int refclk, intel_clock_t *best_clock); | 280 | int target, int refclk, intel_clock_t *best_clock); |
281 | static bool | 281 | static bool |
282 | intel_find_pll_igdng_dp(const intel_limit_t *, struct drm_crtc *crtc, | 282 | intel_find_pll_ironlake_dp(const intel_limit_t *, struct drm_crtc *crtc, |
283 | int target, int refclk, intel_clock_t *best_clock); | 283 | int target, int refclk, intel_clock_t *best_clock); |
284 | 284 | ||
285 | static const intel_limit_t intel_limits_i8xx_dvo = { | 285 | static const intel_limit_t intel_limits_i8xx_dvo = { |
286 | .dot = { .min = I8XX_DOT_MIN, .max = I8XX_DOT_MAX }, | 286 | .dot = { .min = I8XX_DOT_MIN, .max = I8XX_DOT_MAX }, |
@@ -453,13 +453,13 @@ static const intel_limit_t intel_limits_g4x_display_port = { | |||
453 | .find_pll = intel_find_pll_g4x_dp, | 453 | .find_pll = intel_find_pll_g4x_dp, |
454 | }; | 454 | }; |
455 | 455 | ||
456 | static const intel_limit_t intel_limits_igd_sdvo = { | 456 | static const intel_limit_t intel_limits_pineview_sdvo = { |
457 | .dot = { .min = I9XX_DOT_MIN, .max = I9XX_DOT_MAX}, | 457 | .dot = { .min = I9XX_DOT_MIN, .max = I9XX_DOT_MAX}, |
458 | .vco = { .min = IGD_VCO_MIN, .max = IGD_VCO_MAX }, | 458 | .vco = { .min = PINEVIEW_VCO_MIN, .max = PINEVIEW_VCO_MAX }, |
459 | .n = { .min = IGD_N_MIN, .max = IGD_N_MAX }, | 459 | .n = { .min = PINEVIEW_N_MIN, .max = PINEVIEW_N_MAX }, |
460 | .m = { .min = IGD_M_MIN, .max = IGD_M_MAX }, | 460 | .m = { .min = PINEVIEW_M_MIN, .max = PINEVIEW_M_MAX }, |
461 | .m1 = { .min = IGD_M1_MIN, .max = IGD_M1_MAX }, | 461 | .m1 = { .min = PINEVIEW_M1_MIN, .max = PINEVIEW_M1_MAX }, |
462 | .m2 = { .min = IGD_M2_MIN, .max = IGD_M2_MAX }, | 462 | .m2 = { .min = PINEVIEW_M2_MIN, .max = PINEVIEW_M2_MAX }, |
463 | .p = { .min = I9XX_P_SDVO_DAC_MIN, .max = I9XX_P_SDVO_DAC_MAX }, | 463 | .p = { .min = I9XX_P_SDVO_DAC_MIN, .max = I9XX_P_SDVO_DAC_MAX }, |
464 | .p1 = { .min = I9XX_P1_MIN, .max = I9XX_P1_MAX }, | 464 | .p1 = { .min = I9XX_P1_MIN, .max = I9XX_P1_MAX }, |
465 | .p2 = { .dot_limit = I9XX_P2_SDVO_DAC_SLOW_LIMIT, | 465 | .p2 = { .dot_limit = I9XX_P2_SDVO_DAC_SLOW_LIMIT, |
@@ -468,59 +468,59 @@ static const intel_limit_t intel_limits_igd_sdvo = { | |||
468 | .find_reduced_pll = intel_find_best_reduced_PLL, | 468 | .find_reduced_pll = intel_find_best_reduced_PLL, |
469 | }; | 469 | }; |
470 | 470 | ||
471 | static const intel_limit_t intel_limits_igd_lvds = { | 471 | static const intel_limit_t intel_limits_pineview_lvds = { |
472 | .dot = { .min = I9XX_DOT_MIN, .max = I9XX_DOT_MAX }, | 472 | .dot = { .min = I9XX_DOT_MIN, .max = I9XX_DOT_MAX }, |
473 | .vco = { .min = IGD_VCO_MIN, .max = IGD_VCO_MAX }, | 473 | .vco = { .min = PINEVIEW_VCO_MIN, .max = PINEVIEW_VCO_MAX }, |
474 | .n = { .min = IGD_N_MIN, .max = IGD_N_MAX }, | 474 | .n = { .min = PINEVIEW_N_MIN, .max = PINEVIEW_N_MAX }, |
475 | .m = { .min = IGD_M_MIN, .max = IGD_M_MAX }, | 475 | .m = { .min = PINEVIEW_M_MIN, .max = PINEVIEW_M_MAX }, |
476 | .m1 = { .min = IGD_M1_MIN, .max = IGD_M1_MAX }, | 476 | .m1 = { .min = PINEVIEW_M1_MIN, .max = PINEVIEW_M1_MAX }, |
477 | .m2 = { .min = IGD_M2_MIN, .max = IGD_M2_MAX }, | 477 | .m2 = { .min = PINEVIEW_M2_MIN, .max = PINEVIEW_M2_MAX }, |
478 | .p = { .min = IGD_P_LVDS_MIN, .max = IGD_P_LVDS_MAX }, | 478 | .p = { .min = PINEVIEW_P_LVDS_MIN, .max = PINEVIEW_P_LVDS_MAX }, |
479 | .p1 = { .min = I9XX_P1_MIN, .max = I9XX_P1_MAX }, | 479 | .p1 = { .min = I9XX_P1_MIN, .max = I9XX_P1_MAX }, |
480 | /* IGD only supports single-channel mode. */ | 480 | /* Pineview only supports single-channel mode. */ |
481 | .p2 = { .dot_limit = I9XX_P2_LVDS_SLOW_LIMIT, | 481 | .p2 = { .dot_limit = I9XX_P2_LVDS_SLOW_LIMIT, |
482 | .p2_slow = I9XX_P2_LVDS_SLOW, .p2_fast = I9XX_P2_LVDS_SLOW }, | 482 | .p2_slow = I9XX_P2_LVDS_SLOW, .p2_fast = I9XX_P2_LVDS_SLOW }, |
483 | .find_pll = intel_find_best_PLL, | 483 | .find_pll = intel_find_best_PLL, |
484 | .find_reduced_pll = intel_find_best_reduced_PLL, | 484 | .find_reduced_pll = intel_find_best_reduced_PLL, |
485 | }; | 485 | }; |
486 | 486 | ||
487 | static const intel_limit_t intel_limits_igdng_sdvo = { | 487 | static const intel_limit_t intel_limits_ironlake_sdvo = { |
488 | .dot = { .min = IGDNG_DOT_MIN, .max = IGDNG_DOT_MAX }, | 488 | .dot = { .min = IRONLAKE_DOT_MIN, .max = IRONLAKE_DOT_MAX }, |
489 | .vco = { .min = IGDNG_VCO_MIN, .max = IGDNG_VCO_MAX }, | 489 | .vco = { .min = IRONLAKE_VCO_MIN, .max = IRONLAKE_VCO_MAX }, |
490 | .n = { .min = IGDNG_N_MIN, .max = IGDNG_N_MAX }, | 490 | .n = { .min = IRONLAKE_N_MIN, .max = IRONLAKE_N_MAX }, |
491 | .m = { .min = IGDNG_M_MIN, .max = IGDNG_M_MAX }, | 491 | .m = { .min = IRONLAKE_M_MIN, .max = IRONLAKE_M_MAX }, |
492 | .m1 = { .min = IGDNG_M1_MIN, .max = IGDNG_M1_MAX }, | 492 | .m1 = { .min = IRONLAKE_M1_MIN, .max = IRONLAKE_M1_MAX }, |
493 | .m2 = { .min = IGDNG_M2_MIN, .max = IGDNG_M2_MAX }, | 493 | .m2 = { .min = IRONLAKE_M2_MIN, .max = IRONLAKE_M2_MAX }, |
494 | .p = { .min = IGDNG_P_SDVO_DAC_MIN, .max = IGDNG_P_SDVO_DAC_MAX }, | 494 | .p = { .min = IRONLAKE_P_SDVO_DAC_MIN, .max = IRONLAKE_P_SDVO_DAC_MAX }, |
495 | .p1 = { .min = IGDNG_P1_MIN, .max = IGDNG_P1_MAX }, | 495 | .p1 = { .min = IRONLAKE_P1_MIN, .max = IRONLAKE_P1_MAX }, |
496 | .p2 = { .dot_limit = IGDNG_P2_DOT_LIMIT, | 496 | .p2 = { .dot_limit = IRONLAKE_P2_DOT_LIMIT, |
497 | .p2_slow = IGDNG_P2_SDVO_DAC_SLOW, | 497 | .p2_slow = IRONLAKE_P2_SDVO_DAC_SLOW, |
498 | .p2_fast = IGDNG_P2_SDVO_DAC_FAST }, | 498 | .p2_fast = IRONLAKE_P2_SDVO_DAC_FAST }, |
499 | .find_pll = intel_igdng_find_best_PLL, | 499 | .find_pll = intel_ironlake_find_best_PLL, |
500 | }; | 500 | }; |
501 | 501 | ||
502 | static const intel_limit_t intel_limits_igdng_lvds = { | 502 | static const intel_limit_t intel_limits_ironlake_lvds = { |
503 | .dot = { .min = IGDNG_DOT_MIN, .max = IGDNG_DOT_MAX }, | 503 | .dot = { .min = IRONLAKE_DOT_MIN, .max = IRONLAKE_DOT_MAX }, |
504 | .vco = { .min = IGDNG_VCO_MIN, .max = IGDNG_VCO_MAX }, | 504 | .vco = { .min = IRONLAKE_VCO_MIN, .max = IRONLAKE_VCO_MAX }, |
505 | .n = { .min = IGDNG_N_MIN, .max = IGDNG_N_MAX }, | 505 | .n = { .min = IRONLAKE_N_MIN, .max = IRONLAKE_N_MAX }, |
506 | .m = { .min = IGDNG_M_MIN, .max = IGDNG_M_MAX }, | 506 | .m = { .min = IRONLAKE_M_MIN, .max = IRONLAKE_M_MAX }, |
507 | .m1 = { .min = IGDNG_M1_MIN, .max = IGDNG_M1_MAX }, | 507 | .m1 = { .min = IRONLAKE_M1_MIN, .max = IRONLAKE_M1_MAX }, |
508 | .m2 = { .min = IGDNG_M2_MIN, .max = IGDNG_M2_MAX }, | 508 | .m2 = { .min = IRONLAKE_M2_MIN, .max = IRONLAKE_M2_MAX }, |
509 | .p = { .min = IGDNG_P_LVDS_MIN, .max = IGDNG_P_LVDS_MAX }, | 509 | .p = { .min = IRONLAKE_P_LVDS_MIN, .max = IRONLAKE_P_LVDS_MAX }, |
510 | .p1 = { .min = IGDNG_P1_MIN, .max = IGDNG_P1_MAX }, | 510 | .p1 = { .min = IRONLAKE_P1_MIN, .max = IRONLAKE_P1_MAX }, |
511 | .p2 = { .dot_limit = IGDNG_P2_DOT_LIMIT, | 511 | .p2 = { .dot_limit = IRONLAKE_P2_DOT_LIMIT, |
512 | .p2_slow = IGDNG_P2_LVDS_SLOW, | 512 | .p2_slow = IRONLAKE_P2_LVDS_SLOW, |
513 | .p2_fast = IGDNG_P2_LVDS_FAST }, | 513 | .p2_fast = IRONLAKE_P2_LVDS_FAST }, |
514 | .find_pll = intel_igdng_find_best_PLL, | 514 | .find_pll = intel_ironlake_find_best_PLL, |
515 | }; | 515 | }; |
516 | 516 | ||
517 | static const intel_limit_t *intel_igdng_limit(struct drm_crtc *crtc) | 517 | static const intel_limit_t *intel_ironlake_limit(struct drm_crtc *crtc) |
518 | { | 518 | { |
519 | const intel_limit_t *limit; | 519 | const intel_limit_t *limit; |
520 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) | 520 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) |
521 | limit = &intel_limits_igdng_lvds; | 521 | limit = &intel_limits_ironlake_lvds; |
522 | else | 522 | else |
523 | limit = &intel_limits_igdng_sdvo; | 523 | limit = &intel_limits_ironlake_sdvo; |
524 | 524 | ||
525 | return limit; | 525 | return limit; |
526 | } | 526 | } |
@@ -557,20 +557,20 @@ static const intel_limit_t *intel_limit(struct drm_crtc *crtc) | |||
557 | struct drm_device *dev = crtc->dev; | 557 | struct drm_device *dev = crtc->dev; |
558 | const intel_limit_t *limit; | 558 | const intel_limit_t *limit; |
559 | 559 | ||
560 | if (IS_IGDNG(dev)) | 560 | if (IS_IRONLAKE(dev)) |
561 | limit = intel_igdng_limit(crtc); | 561 | limit = intel_ironlake_limit(crtc); |
562 | else if (IS_G4X(dev)) { | 562 | else if (IS_G4X(dev)) { |
563 | limit = intel_g4x_limit(crtc); | 563 | limit = intel_g4x_limit(crtc); |
564 | } else if (IS_I9XX(dev) && !IS_IGD(dev)) { | 564 | } else if (IS_I9XX(dev) && !IS_PINEVIEW(dev)) { |
565 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) | 565 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) |
566 | limit = &intel_limits_i9xx_lvds; | 566 | limit = &intel_limits_i9xx_lvds; |
567 | else | 567 | else |
568 | limit = &intel_limits_i9xx_sdvo; | 568 | limit = &intel_limits_i9xx_sdvo; |
569 | } else if (IS_IGD(dev)) { | 569 | } else if (IS_PINEVIEW(dev)) { |
570 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) | 570 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) |
571 | limit = &intel_limits_igd_lvds; | 571 | limit = &intel_limits_pineview_lvds; |
572 | else | 572 | else |
573 | limit = &intel_limits_igd_sdvo; | 573 | limit = &intel_limits_pineview_sdvo; |
574 | } else { | 574 | } else { |
575 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) | 575 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) |
576 | limit = &intel_limits_i8xx_lvds; | 576 | limit = &intel_limits_i8xx_lvds; |
@@ -580,8 +580,8 @@ static const intel_limit_t *intel_limit(struct drm_crtc *crtc) | |||
580 | return limit; | 580 | return limit; |
581 | } | 581 | } |
582 | 582 | ||
583 | /* m1 is reserved as 0 in IGD, n is a ring counter */ | 583 | /* m1 is reserved as 0 in Pineview, n is a ring counter */ |
584 | static void igd_clock(int refclk, intel_clock_t *clock) | 584 | static void pineview_clock(int refclk, intel_clock_t *clock) |
585 | { | 585 | { |
586 | clock->m = clock->m2 + 2; | 586 | clock->m = clock->m2 + 2; |
587 | clock->p = clock->p1 * clock->p2; | 587 | clock->p = clock->p1 * clock->p2; |
@@ -591,8 +591,8 @@ static void igd_clock(int refclk, intel_clock_t *clock) | |||
591 | 591 | ||
592 | static void intel_clock(struct drm_device *dev, int refclk, intel_clock_t *clock) | 592 | static void intel_clock(struct drm_device *dev, int refclk, intel_clock_t *clock) |
593 | { | 593 | { |
594 | if (IS_IGD(dev)) { | 594 | if (IS_PINEVIEW(dev)) { |
595 | igd_clock(refclk, clock); | 595 | pineview_clock(refclk, clock); |
596 | return; | 596 | return; |
597 | } | 597 | } |
598 | clock->m = 5 * (clock->m1 + 2) + (clock->m2 + 2); | 598 | clock->m = 5 * (clock->m1 + 2) + (clock->m2 + 2); |
@@ -657,7 +657,7 @@ static bool intel_PLL_is_valid(struct drm_crtc *crtc, intel_clock_t *clock) | |||
657 | INTELPllInvalid ("m2 out of range\n"); | 657 | INTELPllInvalid ("m2 out of range\n"); |
658 | if (clock->m1 < limit->m1.min || limit->m1.max < clock->m1) | 658 | if (clock->m1 < limit->m1.min || limit->m1.max < clock->m1) |
659 | INTELPllInvalid ("m1 out of range\n"); | 659 | INTELPllInvalid ("m1 out of range\n"); |
660 | if (clock->m1 <= clock->m2 && !IS_IGD(dev)) | 660 | if (clock->m1 <= clock->m2 && !IS_PINEVIEW(dev)) |
661 | INTELPllInvalid ("m1 <= m2\n"); | 661 | INTELPllInvalid ("m1 <= m2\n"); |
662 | if (clock->m < limit->m.min || limit->m.max < clock->m) | 662 | if (clock->m < limit->m.min || limit->m.max < clock->m) |
663 | INTELPllInvalid ("m out of range\n"); | 663 | INTELPllInvalid ("m out of range\n"); |
@@ -710,8 +710,8 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, | |||
710 | clock.m1++) { | 710 | clock.m1++) { |
711 | for (clock.m2 = limit->m2.min; | 711 | for (clock.m2 = limit->m2.min; |
712 | clock.m2 <= limit->m2.max; clock.m2++) { | 712 | clock.m2 <= limit->m2.max; clock.m2++) { |
713 | /* m1 is always 0 in IGD */ | 713 | /* m1 is always 0 in Pineview */ |
714 | if (clock.m2 >= clock.m1 && !IS_IGD(dev)) | 714 | if (clock.m2 >= clock.m1 && !IS_PINEVIEW(dev)) |
715 | break; | 715 | break; |
716 | for (clock.n = limit->n.min; | 716 | for (clock.n = limit->n.min; |
717 | clock.n <= limit->n.max; clock.n++) { | 717 | clock.n <= limit->n.max; clock.n++) { |
@@ -752,8 +752,8 @@ intel_find_best_reduced_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, | |||
752 | 752 | ||
753 | for (clock.m1 = limit->m1.min; clock.m1 <= limit->m1.max; clock.m1++) { | 753 | for (clock.m1 = limit->m1.min; clock.m1 <= limit->m1.max; clock.m1++) { |
754 | for (clock.m2 = limit->m2.min; clock.m2 <= limit->m2.max; clock.m2++) { | 754 | for (clock.m2 = limit->m2.min; clock.m2 <= limit->m2.max; clock.m2++) { |
755 | /* m1 is always 0 in IGD */ | 755 | /* m1 is always 0 in Pineview */ |
756 | if (clock.m2 >= clock.m1 && !IS_IGD(dev)) | 756 | if (clock.m2 >= clock.m1 && !IS_PINEVIEW(dev)) |
757 | break; | 757 | break; |
758 | for (clock.n = limit->n.min; clock.n <= limit->n.max; | 758 | for (clock.n = limit->n.min; clock.n <= limit->n.max; |
759 | clock.n++) { | 759 | clock.n++) { |
@@ -834,8 +834,8 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, | |||
834 | } | 834 | } |
835 | 835 | ||
836 | static bool | 836 | static bool |
837 | intel_find_pll_igdng_dp(const intel_limit_t *limit, struct drm_crtc *crtc, | 837 | intel_find_pll_ironlake_dp(const intel_limit_t *limit, struct drm_crtc *crtc, |
838 | int target, int refclk, intel_clock_t *best_clock) | 838 | int target, int refclk, intel_clock_t *best_clock) |
839 | { | 839 | { |
840 | struct drm_device *dev = crtc->dev; | 840 | struct drm_device *dev = crtc->dev; |
841 | intel_clock_t clock; | 841 | intel_clock_t clock; |
@@ -858,8 +858,8 @@ intel_find_pll_igdng_dp(const intel_limit_t *limit, struct drm_crtc *crtc, | |||
858 | } | 858 | } |
859 | 859 | ||
860 | static bool | 860 | static bool |
861 | intel_igdng_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, | 861 | intel_ironlake_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, |
862 | int target, int refclk, intel_clock_t *best_clock) | 862 | int target, int refclk, intel_clock_t *best_clock) |
863 | { | 863 | { |
864 | struct drm_device *dev = crtc->dev; | 864 | struct drm_device *dev = crtc->dev; |
865 | struct drm_i915_private *dev_priv = dev->dev_private; | 865 | struct drm_i915_private *dev_priv = dev->dev_private; |
@@ -872,7 +872,7 @@ intel_igdng_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, | |||
872 | return true; | 872 | return true; |
873 | 873 | ||
874 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_DISPLAYPORT)) | 874 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_DISPLAYPORT)) |
875 | return intel_find_pll_igdng_dp(limit, crtc, target, | 875 | return intel_find_pll_ironlake_dp(limit, crtc, target, |
876 | refclk, best_clock); | 876 | refclk, best_clock); |
877 | 877 | ||
878 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) { | 878 | if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) { |
@@ -1322,7 +1322,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, | |||
1322 | dspcntr &= ~DISPPLANE_TILED; | 1322 | dspcntr &= ~DISPPLANE_TILED; |
1323 | } | 1323 | } |
1324 | 1324 | ||
1325 | if (IS_IGDNG(dev)) | 1325 | if (IS_IRONLAKE(dev)) |
1326 | /* must disable */ | 1326 | /* must disable */ |
1327 | dspcntr |= DISPPLANE_TRICKLE_FEED_DISABLE; | 1327 | dspcntr |= DISPPLANE_TRICKLE_FEED_DISABLE; |
1328 | 1328 | ||
@@ -1383,7 +1383,7 @@ static void i915_disable_vga (struct drm_device *dev) | |||
1383 | u8 sr1; | 1383 | u8 sr1; |
1384 | u32 vga_reg; | 1384 | u32 vga_reg; |
1385 | 1385 | ||
1386 | if (IS_IGDNG(dev)) | 1386 | if (IS_IRONLAKE(dev)) |
1387 | vga_reg = CPU_VGACNTRL; | 1387 | vga_reg = CPU_VGACNTRL; |
1388 | else | 1388 | else |
1389 | vga_reg = VGACNTRL; | 1389 | vga_reg = VGACNTRL; |
@@ -1399,7 +1399,7 @@ static void i915_disable_vga (struct drm_device *dev) | |||
1399 | I915_WRITE(vga_reg, VGA_DISP_DISABLE); | 1399 | I915_WRITE(vga_reg, VGA_DISP_DISABLE); |
1400 | } | 1400 | } |
1401 | 1401 | ||
1402 | static void igdng_disable_pll_edp (struct drm_crtc *crtc) | 1402 | static void ironlake_disable_pll_edp (struct drm_crtc *crtc) |
1403 | { | 1403 | { |
1404 | struct drm_device *dev = crtc->dev; | 1404 | struct drm_device *dev = crtc->dev; |
1405 | struct drm_i915_private *dev_priv = dev->dev_private; | 1405 | struct drm_i915_private *dev_priv = dev->dev_private; |
@@ -1411,7 +1411,7 @@ static void igdng_disable_pll_edp (struct drm_crtc *crtc) | |||
1411 | I915_WRITE(DP_A, dpa_ctl); | 1411 | I915_WRITE(DP_A, dpa_ctl); |
1412 | } | 1412 | } |
1413 | 1413 | ||
1414 | static void igdng_enable_pll_edp (struct drm_crtc *crtc) | 1414 | static void ironlake_enable_pll_edp (struct drm_crtc *crtc) |
1415 | { | 1415 | { |
1416 | struct drm_device *dev = crtc->dev; | 1416 | struct drm_device *dev = crtc->dev; |
1417 | struct drm_i915_private *dev_priv = dev->dev_private; | 1417 | struct drm_i915_private *dev_priv = dev->dev_private; |
@@ -1424,7 +1424,7 @@ static void igdng_enable_pll_edp (struct drm_crtc *crtc) | |||
1424 | } | 1424 | } |
1425 | 1425 | ||
1426 | 1426 | ||
1427 | static void igdng_set_pll_edp (struct drm_crtc *crtc, int clock) | 1427 | static void ironlake_set_pll_edp (struct drm_crtc *crtc, int clock) |
1428 | { | 1428 | { |
1429 | struct drm_device *dev = crtc->dev; | 1429 | struct drm_device *dev = crtc->dev; |
1430 | struct drm_i915_private *dev_priv = dev->dev_private; | 1430 | struct drm_i915_private *dev_priv = dev->dev_private; |
@@ -1460,7 +1460,7 @@ static void igdng_set_pll_edp (struct drm_crtc *crtc, int clock) | |||
1460 | udelay(500); | 1460 | udelay(500); |
1461 | } | 1461 | } |
1462 | 1462 | ||
1463 | static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode) | 1463 | static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode) |
1464 | { | 1464 | { |
1465 | struct drm_device *dev = crtc->dev; | 1465 | struct drm_device *dev = crtc->dev; |
1466 | struct drm_i915_private *dev_priv = dev->dev_private; | 1466 | struct drm_i915_private *dev_priv = dev->dev_private; |
@@ -1513,7 +1513,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode) | |||
1513 | 1513 | ||
1514 | if (HAS_eDP) { | 1514 | if (HAS_eDP) { |
1515 | /* enable eDP PLL */ | 1515 | /* enable eDP PLL */ |
1516 | igdng_enable_pll_edp(crtc); | 1516 | ironlake_enable_pll_edp(crtc); |
1517 | } else { | 1517 | } else { |
1518 | /* enable PCH DPLL */ | 1518 | /* enable PCH DPLL */ |
1519 | temp = I915_READ(pch_dpll_reg); | 1519 | temp = I915_READ(pch_dpll_reg); |
@@ -1530,7 +1530,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode) | |||
1530 | I915_READ(fdi_rx_reg); | 1530 | I915_READ(fdi_rx_reg); |
1531 | udelay(200); | 1531 | udelay(200); |
1532 | 1532 | ||
1533 | /* Enable CPU FDI TX PLL, always on for IGDNG */ | 1533 | /* Enable CPU FDI TX PLL, always on for Ironlake */ |
1534 | temp = I915_READ(fdi_tx_reg); | 1534 | temp = I915_READ(fdi_tx_reg); |
1535 | if ((temp & FDI_TX_PLL_ENABLE) == 0) { | 1535 | if ((temp & FDI_TX_PLL_ENABLE) == 0) { |
1536 | I915_WRITE(fdi_tx_reg, temp | FDI_TX_PLL_ENABLE); | 1536 | I915_WRITE(fdi_tx_reg, temp | FDI_TX_PLL_ENABLE); |
@@ -1800,7 +1800,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode) | |||
1800 | } | 1800 | } |
1801 | 1801 | ||
1802 | if (HAS_eDP) { | 1802 | if (HAS_eDP) { |
1803 | igdng_disable_pll_edp(crtc); | 1803 | ironlake_disable_pll_edp(crtc); |
1804 | } | 1804 | } |
1805 | 1805 | ||
1806 | temp = I915_READ(fdi_rx_reg); | 1806 | temp = I915_READ(fdi_rx_reg); |
@@ -2042,7 +2042,7 @@ static bool intel_crtc_mode_fixup(struct drm_crtc *crtc, | |||
2042 | struct drm_display_mode *adjusted_mode) | 2042 | struct drm_display_mode *adjusted_mode) |
2043 | { | 2043 | { |
2044 | struct drm_device *dev = crtc->dev; | 2044 | struct drm_device *dev = crtc->dev; |
2045 | if (IS_IGDNG(dev)) { | 2045 | if (IS_IRONLAKE(dev)) { |
2046 | /* FDI link clock is fixed at 2.7G */ | 2046 | /* FDI link clock is fixed at 2.7G */ |
2047 | if (mode->clock * 3 > 27000 * 4) | 2047 | if (mode->clock * 3 > 27000 * 4) |
2048 | return MODE_CLOCK_HIGH; | 2048 | return MODE_CLOCK_HIGH; |
@@ -2162,9 +2162,8 @@ fdi_reduce_ratio(u32 *num, u32 *den) | |||
2162 | #define LINK_N 0x80000 | 2162 | #define LINK_N 0x80000 |
2163 | 2163 | ||
2164 | static void | 2164 | static void |
2165 | igdng_compute_m_n(int bits_per_pixel, int nlanes, | 2165 | ironlake_compute_m_n(int bits_per_pixel, int nlanes, int pixel_clock, |
2166 | int pixel_clock, int link_clock, | 2166 | int link_clock, struct fdi_m_n *m_n) |
2167 | struct fdi_m_n *m_n) | ||
2168 | { | 2167 | { |
2169 | u64 temp; | 2168 | u64 temp; |
2170 | 2169 | ||
@@ -2192,34 +2191,34 @@ struct intel_watermark_params { | |||
2192 | unsigned long cacheline_size; | 2191 | unsigned long cacheline_size; |
2193 | }; | 2192 | }; |
2194 | 2193 | ||
2195 | /* IGD has different values for various configs */ | 2194 | /* Pineview has different values for various configs */ |
2196 | static struct intel_watermark_params igd_display_wm = { | 2195 | static struct intel_watermark_params pineview_display_wm = { |
2197 | IGD_DISPLAY_FIFO, | 2196 | PINEVIEW_DISPLAY_FIFO, |
2198 | IGD_MAX_WM, | 2197 | PINEVIEW_MAX_WM, |
2199 | IGD_DFT_WM, | 2198 | PINEVIEW_DFT_WM, |
2200 | IGD_GUARD_WM, | 2199 | PINEVIEW_GUARD_WM, |
2201 | IGD_FIFO_LINE_SIZE | 2200 | PINEVIEW_FIFO_LINE_SIZE |
2202 | }; | 2201 | }; |
2203 | static struct intel_watermark_params igd_display_hplloff_wm = { | 2202 | static struct intel_watermark_params pineview_display_hplloff_wm = { |
2204 | IGD_DISPLAY_FIFO, | 2203 | PINEVIEW_DISPLAY_FIFO, |
2205 | IGD_MAX_WM, | 2204 | PINEVIEW_MAX_WM, |
2206 | IGD_DFT_HPLLOFF_WM, | 2205 | PINEVIEW_DFT_HPLLOFF_WM, |
2207 | IGD_GUARD_WM, | 2206 | PINEVIEW_GUARD_WM, |
2208 | IGD_FIFO_LINE_SIZE | 2207 | PINEVIEW_FIFO_LINE_SIZE |
2209 | }; | 2208 | }; |
2210 | static struct intel_watermark_params igd_cursor_wm = { | 2209 | static struct intel_watermark_params pineview_cursor_wm = { |
2211 | IGD_CURSOR_FIFO, | 2210 | PINEVIEW_CURSOR_FIFO, |
2212 | IGD_CURSOR_MAX_WM, | 2211 | PINEVIEW_CURSOR_MAX_WM, |
2213 | IGD_CURSOR_DFT_WM, | 2212 | PINEVIEW_CURSOR_DFT_WM, |
2214 | IGD_CURSOR_GUARD_WM, | 2213 | PINEVIEW_CURSOR_GUARD_WM, |
2215 | IGD_FIFO_LINE_SIZE, | 2214 | PINEVIEW_FIFO_LINE_SIZE, |
2216 | }; | 2215 | }; |
2217 | static struct intel_watermark_params igd_cursor_hplloff_wm = { | 2216 | static struct intel_watermark_params pineview_cursor_hplloff_wm = { |
2218 | IGD_CURSOR_FIFO, | 2217 | PINEVIEW_CURSOR_FIFO, |
2219 | IGD_CURSOR_MAX_WM, | 2218 | PINEVIEW_CURSOR_MAX_WM, |
2220 | IGD_CURSOR_DFT_WM, | 2219 | PINEVIEW_CURSOR_DFT_WM, |
2221 | IGD_CURSOR_GUARD_WM, | 2220 | PINEVIEW_CURSOR_GUARD_WM, |
2222 | IGD_FIFO_LINE_SIZE | 2221 | PINEVIEW_FIFO_LINE_SIZE |
2223 | }; | 2222 | }; |
2224 | static struct intel_watermark_params g4x_wm_info = { | 2223 | static struct intel_watermark_params g4x_wm_info = { |
2225 | G4X_FIFO_SIZE, | 2224 | G4X_FIFO_SIZE, |
@@ -2363,36 +2362,36 @@ static struct cxsr_latency *intel_get_cxsr_latency(int is_desktop, int fsb, | |||
2363 | return NULL; | 2362 | return NULL; |
2364 | } | 2363 | } |
2365 | 2364 | ||
2366 | static void igd_disable_cxsr(struct drm_device *dev) | 2365 | static void pineview_disable_cxsr(struct drm_device *dev) |
2367 | { | 2366 | { |
2368 | struct drm_i915_private *dev_priv = dev->dev_private; | 2367 | struct drm_i915_private *dev_priv = dev->dev_private; |
2369 | u32 reg; | 2368 | u32 reg; |
2370 | 2369 | ||
2371 | /* deactivate cxsr */ | 2370 | /* deactivate cxsr */ |
2372 | reg = I915_READ(DSPFW3); | 2371 | reg = I915_READ(DSPFW3); |
2373 | reg &= ~(IGD_SELF_REFRESH_EN); | 2372 | reg &= ~(PINEVIEW_SELF_REFRESH_EN); |
2374 | I915_WRITE(DSPFW3, reg); | 2373 | I915_WRITE(DSPFW3, reg); |
2375 | DRM_INFO("Big FIFO is disabled\n"); | 2374 | DRM_INFO("Big FIFO is disabled\n"); |
2376 | } | 2375 | } |
2377 | 2376 | ||
2378 | static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock, | 2377 | static void pineview_enable_cxsr(struct drm_device *dev, unsigned long clock, |
2379 | int pixel_size) | 2378 | int pixel_size) |
2380 | { | 2379 | { |
2381 | struct drm_i915_private *dev_priv = dev->dev_private; | 2380 | struct drm_i915_private *dev_priv = dev->dev_private; |
2382 | u32 reg; | 2381 | u32 reg; |
2383 | unsigned long wm; | 2382 | unsigned long wm; |
2384 | struct cxsr_latency *latency; | 2383 | struct cxsr_latency *latency; |
2385 | 2384 | ||
2386 | latency = intel_get_cxsr_latency(IS_IGDG(dev), dev_priv->fsb_freq, | 2385 | latency = intel_get_cxsr_latency(IS_PINEVIEW_G(dev), dev_priv->fsb_freq, |
2387 | dev_priv->mem_freq); | 2386 | dev_priv->mem_freq); |
2388 | if (!latency) { | 2387 | if (!latency) { |
2389 | DRM_DEBUG_KMS("Unknown FSB/MEM found, disable CxSR\n"); | 2388 | DRM_DEBUG_KMS("Unknown FSB/MEM found, disable CxSR\n"); |
2390 | igd_disable_cxsr(dev); | 2389 | pineview_disable_cxsr(dev); |
2391 | return; | 2390 | return; |
2392 | } | 2391 | } |
2393 | 2392 | ||
2394 | /* Display SR */ | 2393 | /* Display SR */ |
2395 | wm = intel_calculate_wm(clock, &igd_display_wm, pixel_size, | 2394 | wm = intel_calculate_wm(clock, &pineview_display_wm, pixel_size, |
2396 | latency->display_sr); | 2395 | latency->display_sr); |
2397 | reg = I915_READ(DSPFW1); | 2396 | reg = I915_READ(DSPFW1); |
2398 | reg &= 0x7fffff; | 2397 | reg &= 0x7fffff; |
@@ -2401,7 +2400,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock, | |||
2401 | DRM_DEBUG_KMS("DSPFW1 register is %x\n", reg); | 2400 | DRM_DEBUG_KMS("DSPFW1 register is %x\n", reg); |
2402 | 2401 | ||
2403 | /* cursor SR */ | 2402 | /* cursor SR */ |
2404 | wm = intel_calculate_wm(clock, &igd_cursor_wm, pixel_size, | 2403 | wm = intel_calculate_wm(clock, &pineview_cursor_wm, pixel_size, |
2405 | latency->cursor_sr); | 2404 | latency->cursor_sr); |
2406 | reg = I915_READ(DSPFW3); | 2405 | reg = I915_READ(DSPFW3); |
2407 | reg &= ~(0x3f << 24); | 2406 | reg &= ~(0x3f << 24); |
@@ -2409,7 +2408,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock, | |||
2409 | I915_WRITE(DSPFW3, reg); | 2408 | I915_WRITE(DSPFW3, reg); |
2410 | 2409 | ||
2411 | /* Display HPLL off SR */ | 2410 | /* Display HPLL off SR */ |
2412 | wm = intel_calculate_wm(clock, &igd_display_hplloff_wm, | 2411 | wm = intel_calculate_wm(clock, &pineview_display_hplloff_wm, |
2413 | latency->display_hpll_disable, I915_FIFO_LINE_SIZE); | 2412 | latency->display_hpll_disable, I915_FIFO_LINE_SIZE); |
2414 | reg = I915_READ(DSPFW3); | 2413 | reg = I915_READ(DSPFW3); |
2415 | reg &= 0xfffffe00; | 2414 | reg &= 0xfffffe00; |
@@ -2417,7 +2416,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock, | |||
2417 | I915_WRITE(DSPFW3, reg); | 2416 | I915_WRITE(DSPFW3, reg); |
2418 | 2417 | ||
2419 | /* cursor HPLL off SR */ | 2418 | /* cursor HPLL off SR */ |
2420 | wm = intel_calculate_wm(clock, &igd_cursor_hplloff_wm, pixel_size, | 2419 | wm = intel_calculate_wm(clock, &pineview_cursor_hplloff_wm, pixel_size, |
2421 | latency->cursor_hpll_disable); | 2420 | latency->cursor_hpll_disable); |
2422 | reg = I915_READ(DSPFW3); | 2421 | reg = I915_READ(DSPFW3); |
2423 | reg &= ~(0x3f << 16); | 2422 | reg &= ~(0x3f << 16); |
@@ -2427,7 +2426,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock, | |||
2427 | 2426 | ||
2428 | /* activate cxsr */ | 2427 | /* activate cxsr */ |
2429 | reg = I915_READ(DSPFW3); | 2428 | reg = I915_READ(DSPFW3); |
2430 | reg |= IGD_SELF_REFRESH_EN; | 2429 | reg |= PINEVIEW_SELF_REFRESH_EN; |
2431 | I915_WRITE(DSPFW3, reg); | 2430 | I915_WRITE(DSPFW3, reg); |
2432 | 2431 | ||
2433 | DRM_INFO("Big FIFO is enabled\n"); | 2432 | DRM_INFO("Big FIFO is enabled\n"); |
@@ -2786,10 +2785,10 @@ static void intel_update_watermarks(struct drm_device *dev) | |||
2786 | return; | 2785 | return; |
2787 | 2786 | ||
2788 | /* Single plane configs can enable self refresh */ | 2787 | /* Single plane configs can enable self refresh */ |
2789 | if (enabled == 1 && IS_IGD(dev)) | 2788 | if (enabled == 1 && IS_PINEVIEW(dev)) |
2790 | igd_enable_cxsr(dev, sr_clock, pixel_size); | 2789 | pineview_enable_cxsr(dev, sr_clock, pixel_size); |
2791 | else if (IS_IGD(dev)) | 2790 | else if (IS_PINEVIEW(dev)) |
2792 | igd_disable_cxsr(dev); | 2791 | pineview_disable_cxsr(dev); |
2793 | 2792 | ||
2794 | dev_priv->display.update_wm(dev, planea_clock, planeb_clock, | 2793 | dev_priv->display.update_wm(dev, planea_clock, planeb_clock, |
2795 | sr_hdisplay, pixel_size); | 2794 | sr_hdisplay, pixel_size); |
@@ -2887,7 +2886,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
2887 | refclk / 1000); | 2886 | refclk / 1000); |
2888 | } else if (IS_I9XX(dev)) { | 2887 | } else if (IS_I9XX(dev)) { |
2889 | refclk = 96000; | 2888 | refclk = 96000; |
2890 | if (IS_IGDNG(dev)) | 2889 | if (IS_IRONLAKE(dev)) |
2891 | refclk = 120000; /* 120Mhz refclk */ | 2890 | refclk = 120000; /* 120Mhz refclk */ |
2892 | } else { | 2891 | } else { |
2893 | refclk = 48000; | 2892 | refclk = 48000; |
@@ -2947,7 +2946,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
2947 | } | 2946 | } |
2948 | 2947 | ||
2949 | /* FDI link */ | 2948 | /* FDI link */ |
2950 | if (IS_IGDNG(dev)) { | 2949 | if (IS_IRONLAKE(dev)) { |
2951 | int lane, link_bw, bpp; | 2950 | int lane, link_bw, bpp; |
2952 | /* eDP doesn't require FDI link, so just set DP M/N | 2951 | /* eDP doesn't require FDI link, so just set DP M/N |
2953 | according to current link config */ | 2952 | according to current link config */ |
@@ -2989,8 +2988,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
2989 | bpp = 24; | 2988 | bpp = 24; |
2990 | } | 2989 | } |
2991 | 2990 | ||
2992 | igdng_compute_m_n(bpp, lane, target_clock, | 2991 | ironlake_compute_m_n(bpp, lane, target_clock, link_bw, &m_n); |
2993 | link_bw, &m_n); | ||
2994 | } | 2992 | } |
2995 | 2993 | ||
2996 | /* Ironlake: try to setup display ref clock before DPLL | 2994 | /* Ironlake: try to setup display ref clock before DPLL |
@@ -2998,7 +2996,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
2998 | * PCH B stepping, previous chipset stepping should be | 2996 | * PCH B stepping, previous chipset stepping should be |
2999 | * ignoring this setting. | 2997 | * ignoring this setting. |
3000 | */ | 2998 | */ |
3001 | if (IS_IGDNG(dev)) { | 2999 | if (IS_IRONLAKE(dev)) { |
3002 | temp = I915_READ(PCH_DREF_CONTROL); | 3000 | temp = I915_READ(PCH_DREF_CONTROL); |
3003 | /* Always enable nonspread source */ | 3001 | /* Always enable nonspread source */ |
3004 | temp &= ~DREF_NONSPREAD_SOURCE_MASK; | 3002 | temp &= ~DREF_NONSPREAD_SOURCE_MASK; |
@@ -3033,7 +3031,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
3033 | } | 3031 | } |
3034 | } | 3032 | } |
3035 | 3033 | ||
3036 | if (IS_IGD(dev)) { | 3034 | if (IS_PINEVIEW(dev)) { |
3037 | fp = (1 << clock.n) << 16 | clock.m1 << 8 | clock.m2; | 3035 | fp = (1 << clock.n) << 16 | clock.m1 << 8 | clock.m2; |
3038 | if (has_reduced_clock) | 3036 | if (has_reduced_clock) |
3039 | fp2 = (1 << reduced_clock.n) << 16 | | 3037 | fp2 = (1 << reduced_clock.n) << 16 | |
@@ -3045,7 +3043,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
3045 | reduced_clock.m2; | 3043 | reduced_clock.m2; |
3046 | } | 3044 | } |
3047 | 3045 | ||
3048 | if (!IS_IGDNG(dev)) | 3046 | if (!IS_IRONLAKE(dev)) |
3049 | dpll = DPLL_VGA_MODE_DIS; | 3047 | dpll = DPLL_VGA_MODE_DIS; |
3050 | 3048 | ||
3051 | if (IS_I9XX(dev)) { | 3049 | if (IS_I9XX(dev)) { |
@@ -3058,19 +3056,19 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
3058 | sdvo_pixel_multiply = adjusted_mode->clock / mode->clock; | 3056 | sdvo_pixel_multiply = adjusted_mode->clock / mode->clock; |
3059 | if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev)) | 3057 | if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev)) |
3060 | dpll |= (sdvo_pixel_multiply - 1) << SDVO_MULTIPLIER_SHIFT_HIRES; | 3058 | dpll |= (sdvo_pixel_multiply - 1) << SDVO_MULTIPLIER_SHIFT_HIRES; |
3061 | else if (IS_IGDNG(dev)) | 3059 | else if (IS_IRONLAKE(dev)) |
3062 | dpll |= (sdvo_pixel_multiply - 1) << PLL_REF_SDVO_HDMI_MULTIPLIER_SHIFT; | 3060 | dpll |= (sdvo_pixel_multiply - 1) << PLL_REF_SDVO_HDMI_MULTIPLIER_SHIFT; |
3063 | } | 3061 | } |
3064 | if (is_dp) | 3062 | if (is_dp) |
3065 | dpll |= DPLL_DVO_HIGH_SPEED; | 3063 | dpll |= DPLL_DVO_HIGH_SPEED; |
3066 | 3064 | ||
3067 | /* compute bitmask from p1 value */ | 3065 | /* compute bitmask from p1 value */ |
3068 | if (IS_IGD(dev)) | 3066 | if (IS_PINEVIEW(dev)) |
3069 | dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA01_P1_POST_DIV_SHIFT_IGD; | 3067 | dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA01_P1_POST_DIV_SHIFT_PINEVIEW; |
3070 | else { | 3068 | else { |
3071 | dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA01_P1_POST_DIV_SHIFT; | 3069 | dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA01_P1_POST_DIV_SHIFT; |
3072 | /* also FPA1 */ | 3070 | /* also FPA1 */ |
3073 | if (IS_IGDNG(dev)) | 3071 | if (IS_IRONLAKE(dev)) |
3074 | dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA1_P1_POST_DIV_SHIFT; | 3072 | dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA1_P1_POST_DIV_SHIFT; |
3075 | if (IS_G4X(dev) && has_reduced_clock) | 3073 | if (IS_G4X(dev) && has_reduced_clock) |
3076 | dpll |= (1 << (reduced_clock.p1 - 1)) << DPLL_FPA1_P1_POST_DIV_SHIFT; | 3074 | dpll |= (1 << (reduced_clock.p1 - 1)) << DPLL_FPA1_P1_POST_DIV_SHIFT; |
@@ -3089,7 +3087,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
3089 | dpll |= DPLLB_LVDS_P2_CLOCK_DIV_14; | 3087 | dpll |= DPLLB_LVDS_P2_CLOCK_DIV_14; |
3090 | break; | 3088 | break; |
3091 | } | 3089 | } |
3092 | if (IS_I965G(dev) && !IS_IGDNG(dev)) | 3090 | if (IS_I965G(dev) && !IS_IRONLAKE(dev)) |
3093 | dpll |= (6 << PLL_LOAD_PULSE_PHASE_SHIFT); | 3091 | dpll |= (6 << PLL_LOAD_PULSE_PHASE_SHIFT); |
3094 | } else { | 3092 | } else { |
3095 | if (is_lvds) { | 3093 | if (is_lvds) { |
@@ -3121,9 +3119,9 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
3121 | /* Set up the display plane register */ | 3119 | /* Set up the display plane register */ |
3122 | dspcntr = DISPPLANE_GAMMA_ENABLE; | 3120 | dspcntr = DISPPLANE_GAMMA_ENABLE; |
3123 | 3121 | ||
3124 | /* IGDNG's plane is forced to pipe, bit 24 is to | 3122 | /* Ironlake's plane is forced to pipe, bit 24 is to |
3125 | enable color space conversion */ | 3123 | enable color space conversion */ |
3126 | if (!IS_IGDNG(dev)) { | 3124 | if (!IS_IRONLAKE(dev)) { |
3127 | if (pipe == 0) | 3125 | if (pipe == 0) |
3128 | dspcntr &= ~DISPPLANE_SEL_PIPE_MASK; | 3126 | dspcntr &= ~DISPPLANE_SEL_PIPE_MASK; |
3129 | else | 3127 | else |
@@ -3150,20 +3148,20 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
3150 | 3148 | ||
3151 | 3149 | ||
3152 | /* Disable the panel fitter if it was on our pipe */ | 3150 | /* Disable the panel fitter if it was on our pipe */ |
3153 | if (!IS_IGDNG(dev) && intel_panel_fitter_pipe(dev) == pipe) | 3151 | if (!IS_IRONLAKE(dev) && intel_panel_fitter_pipe(dev) == pipe) |
3154 | I915_WRITE(PFIT_CONTROL, 0); | 3152 | I915_WRITE(PFIT_CONTROL, 0); |
3155 | 3153 | ||
3156 | DRM_DEBUG_KMS("Mode for pipe %c:\n", pipe == 0 ? 'A' : 'B'); | 3154 | DRM_DEBUG_KMS("Mode for pipe %c:\n", pipe == 0 ? 'A' : 'B'); |
3157 | drm_mode_debug_printmodeline(mode); | 3155 | drm_mode_debug_printmodeline(mode); |
3158 | 3156 | ||
3159 | /* assign to IGDNG registers */ | 3157 | /* assign to Ironlake registers */ |
3160 | if (IS_IGDNG(dev)) { | 3158 | if (IS_IRONLAKE(dev)) { |
3161 | fp_reg = pch_fp_reg; | 3159 | fp_reg = pch_fp_reg; |
3162 | dpll_reg = pch_dpll_reg; | 3160 | dpll_reg = pch_dpll_reg; |
3163 | } | 3161 | } |
3164 | 3162 | ||
3165 | if (is_edp) { | 3163 | if (is_edp) { |
3166 | igdng_disable_pll_edp(crtc); | 3164 | ironlake_disable_pll_edp(crtc); |
3167 | } else if ((dpll & DPLL_VCO_ENABLE)) { | 3165 | } else if ((dpll & DPLL_VCO_ENABLE)) { |
3168 | I915_WRITE(fp_reg, fp); | 3166 | I915_WRITE(fp_reg, fp); |
3169 | I915_WRITE(dpll_reg, dpll & ~DPLL_VCO_ENABLE); | 3167 | I915_WRITE(dpll_reg, dpll & ~DPLL_VCO_ENABLE); |
@@ -3178,7 +3176,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
3178 | if (is_lvds) { | 3176 | if (is_lvds) { |
3179 | u32 lvds; | 3177 | u32 lvds; |
3180 | 3178 | ||
3181 | if (IS_IGDNG(dev)) | 3179 | if (IS_IRONLAKE(dev)) |
3182 | lvds_reg = PCH_LVDS; | 3180 | lvds_reg = PCH_LVDS; |
3183 | 3181 | ||
3184 | lvds = I915_READ(lvds_reg); | 3182 | lvds = I915_READ(lvds_reg); |
@@ -3211,7 +3209,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
3211 | /* Wait for the clocks to stabilize. */ | 3209 | /* Wait for the clocks to stabilize. */ |
3212 | udelay(150); | 3210 | udelay(150); |
3213 | 3211 | ||
3214 | if (IS_I965G(dev) && !IS_IGDNG(dev)) { | 3212 | if (IS_I965G(dev) && !IS_IRONLAKE(dev)) { |
3215 | if (is_sdvo) { | 3213 | if (is_sdvo) { |
3216 | sdvo_pixel_multiply = adjusted_mode->clock / mode->clock; | 3214 | sdvo_pixel_multiply = adjusted_mode->clock / mode->clock; |
3217 | I915_WRITE(dpll_md_reg, (0 << DPLL_MD_UDI_DIVIDER_SHIFT) | | 3215 | I915_WRITE(dpll_md_reg, (0 << DPLL_MD_UDI_DIVIDER_SHIFT) | |
@@ -3258,21 +3256,21 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
3258 | /* pipesrc and dspsize control the size that is scaled from, which should | 3256 | /* pipesrc and dspsize control the size that is scaled from, which should |
3259 | * always be the user's requested size. | 3257 | * always be the user's requested size. |
3260 | */ | 3258 | */ |
3261 | if (!IS_IGDNG(dev)) { | 3259 | if (!IS_IRONLAKE(dev)) { |
3262 | I915_WRITE(dspsize_reg, ((mode->vdisplay - 1) << 16) | | 3260 | I915_WRITE(dspsize_reg, ((mode->vdisplay - 1) << 16) | |
3263 | (mode->hdisplay - 1)); | 3261 | (mode->hdisplay - 1)); |
3264 | I915_WRITE(dsppos_reg, 0); | 3262 | I915_WRITE(dsppos_reg, 0); |
3265 | } | 3263 | } |
3266 | I915_WRITE(pipesrc_reg, ((mode->hdisplay - 1) << 16) | (mode->vdisplay - 1)); | 3264 | I915_WRITE(pipesrc_reg, ((mode->hdisplay - 1) << 16) | (mode->vdisplay - 1)); |
3267 | 3265 | ||
3268 | if (IS_IGDNG(dev)) { | 3266 | if (IS_IRONLAKE(dev)) { |
3269 | I915_WRITE(data_m1_reg, TU_SIZE(m_n.tu) | m_n.gmch_m); | 3267 | I915_WRITE(data_m1_reg, TU_SIZE(m_n.tu) | m_n.gmch_m); |
3270 | I915_WRITE(data_n1_reg, TU_SIZE(m_n.tu) | m_n.gmch_n); | 3268 | I915_WRITE(data_n1_reg, TU_SIZE(m_n.tu) | m_n.gmch_n); |
3271 | I915_WRITE(link_m1_reg, m_n.link_m); | 3269 | I915_WRITE(link_m1_reg, m_n.link_m); |
3272 | I915_WRITE(link_n1_reg, m_n.link_n); | 3270 | I915_WRITE(link_n1_reg, m_n.link_n); |
3273 | 3271 | ||
3274 | if (is_edp) { | 3272 | if (is_edp) { |
3275 | igdng_set_pll_edp(crtc, adjusted_mode->clock); | 3273 | ironlake_set_pll_edp(crtc, adjusted_mode->clock); |
3276 | } else { | 3274 | } else { |
3277 | /* enable FDI RX PLL too */ | 3275 | /* enable FDI RX PLL too */ |
3278 | temp = I915_READ(fdi_rx_reg); | 3276 | temp = I915_READ(fdi_rx_reg); |
@@ -3286,7 +3284,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
3286 | 3284 | ||
3287 | intel_wait_for_vblank(dev); | 3285 | intel_wait_for_vblank(dev); |
3288 | 3286 | ||
3289 | if (IS_IGDNG(dev)) { | 3287 | if (IS_IRONLAKE(dev)) { |
3290 | /* enable address swizzle for tiling buffer */ | 3288 | /* enable address swizzle for tiling buffer */ |
3291 | temp = I915_READ(DISP_ARB_CTL); | 3289 | temp = I915_READ(DISP_ARB_CTL); |
3292 | I915_WRITE(DISP_ARB_CTL, temp | DISP_TILE_SURFACE_SWIZZLING); | 3290 | I915_WRITE(DISP_ARB_CTL, temp | DISP_TILE_SURFACE_SWIZZLING); |
@@ -3320,8 +3318,8 @@ void intel_crtc_load_lut(struct drm_crtc *crtc) | |||
3320 | if (!crtc->enabled) | 3318 | if (!crtc->enabled) |
3321 | return; | 3319 | return; |
3322 | 3320 | ||
3323 | /* use legacy palette for IGDNG */ | 3321 | /* use legacy palette for Ironlake */ |
3324 | if (IS_IGDNG(dev)) | 3322 | if (IS_IRONLAKE(dev)) |
3325 | palreg = (intel_crtc->pipe == 0) ? LGC_PALETTE_A : | 3323 | palreg = (intel_crtc->pipe == 0) ? LGC_PALETTE_A : |
3326 | LGC_PALETTE_B; | 3324 | LGC_PALETTE_B; |
3327 | 3325 | ||
@@ -3662,18 +3660,18 @@ static int intel_crtc_clock_get(struct drm_device *dev, struct drm_crtc *crtc) | |||
3662 | fp = I915_READ((pipe == 0) ? FPA1 : FPB1); | 3660 | fp = I915_READ((pipe == 0) ? FPA1 : FPB1); |
3663 | 3661 | ||
3664 | clock.m1 = (fp & FP_M1_DIV_MASK) >> FP_M1_DIV_SHIFT; | 3662 | clock.m1 = (fp & FP_M1_DIV_MASK) >> FP_M1_DIV_SHIFT; |
3665 | if (IS_IGD(dev)) { | 3663 | if (IS_PINEVIEW(dev)) { |
3666 | clock.n = ffs((fp & FP_N_IGD_DIV_MASK) >> FP_N_DIV_SHIFT) - 1; | 3664 | clock.n = ffs((fp & FP_N_PINEVIEW_DIV_MASK) >> FP_N_DIV_SHIFT) - 1; |
3667 | clock.m2 = (fp & FP_M2_IGD_DIV_MASK) >> FP_M2_DIV_SHIFT; | 3665 | clock.m2 = (fp & FP_M2_PINEVIEW_DIV_MASK) >> FP_M2_DIV_SHIFT; |
3668 | } else { | 3666 | } else { |
3669 | clock.n = (fp & FP_N_DIV_MASK) >> FP_N_DIV_SHIFT; | 3667 | clock.n = (fp & FP_N_DIV_MASK) >> FP_N_DIV_SHIFT; |
3670 | clock.m2 = (fp & FP_M2_DIV_MASK) >> FP_M2_DIV_SHIFT; | 3668 | clock.m2 = (fp & FP_M2_DIV_MASK) >> FP_M2_DIV_SHIFT; |
3671 | } | 3669 | } |
3672 | 3670 | ||
3673 | if (IS_I9XX(dev)) { | 3671 | if (IS_I9XX(dev)) { |
3674 | if (IS_IGD(dev)) | 3672 | if (IS_PINEVIEW(dev)) |
3675 | clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK_IGD) >> | 3673 | clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK_PINEVIEW) >> |
3676 | DPLL_FPA01_P1_POST_DIV_SHIFT_IGD); | 3674 | DPLL_FPA01_P1_POST_DIV_SHIFT_PINEVIEW); |
3677 | else | 3675 | else |
3678 | clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK) >> | 3676 | clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK) >> |
3679 | DPLL_FPA01_P1_POST_DIV_SHIFT); | 3677 | DPLL_FPA01_P1_POST_DIV_SHIFT); |
@@ -3785,7 +3783,7 @@ void intel_increase_renderclock(struct drm_device *dev, bool schedule) | |||
3785 | { | 3783 | { |
3786 | drm_i915_private_t *dev_priv = dev->dev_private; | 3784 | drm_i915_private_t *dev_priv = dev->dev_private; |
3787 | 3785 | ||
3788 | if (IS_IGDNG(dev)) | 3786 | if (IS_IRONLAKE(dev)) |
3789 | return; | 3787 | return; |
3790 | 3788 | ||
3791 | if (!dev_priv->render_reclock_avail) { | 3789 | if (!dev_priv->render_reclock_avail) { |
@@ -3810,7 +3808,7 @@ void intel_decrease_renderclock(struct drm_device *dev) | |||
3810 | { | 3808 | { |
3811 | drm_i915_private_t *dev_priv = dev->dev_private; | 3809 | drm_i915_private_t *dev_priv = dev->dev_private; |
3812 | 3810 | ||
3813 | if (IS_IGDNG(dev)) | 3811 | if (IS_IRONLAKE(dev)) |
3814 | return; | 3812 | return; |
3815 | 3813 | ||
3816 | if (!dev_priv->render_reclock_avail) { | 3814 | if (!dev_priv->render_reclock_avail) { |
@@ -3882,7 +3880,7 @@ void intel_decrease_renderclock(struct drm_device *dev) | |||
3882 | */ | 3880 | */ |
3883 | void intel_decrease_displayclock(struct drm_device *dev) | 3881 | void intel_decrease_displayclock(struct drm_device *dev) |
3884 | { | 3882 | { |
3885 | if (IS_IGDNG(dev)) | 3883 | if (IS_IRONLAKE(dev)) |
3886 | return; | 3884 | return; |
3887 | 3885 | ||
3888 | if (IS_I945G(dev) || IS_I945GM(dev) || IS_I915G(dev) || | 3886 | if (IS_I945G(dev) || IS_I945GM(dev) || IS_I915G(dev) || |
@@ -3924,7 +3922,7 @@ static void intel_increase_pllclock(struct drm_crtc *crtc, bool schedule) | |||
3924 | int dpll_reg = (pipe == 0) ? DPLL_A : DPLL_B; | 3922 | int dpll_reg = (pipe == 0) ? DPLL_A : DPLL_B; |
3925 | int dpll = I915_READ(dpll_reg); | 3923 | int dpll = I915_READ(dpll_reg); |
3926 | 3924 | ||
3927 | if (IS_IGDNG(dev)) | 3925 | if (IS_IRONLAKE(dev)) |
3928 | return; | 3926 | return; |
3929 | 3927 | ||
3930 | if (!dev_priv->lvds_downclock_avail) | 3928 | if (!dev_priv->lvds_downclock_avail) |
@@ -3963,7 +3961,7 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc) | |||
3963 | int dpll_reg = (pipe == 0) ? DPLL_A : DPLL_B; | 3961 | int dpll_reg = (pipe == 0) ? DPLL_A : DPLL_B; |
3964 | int dpll = I915_READ(dpll_reg); | 3962 | int dpll = I915_READ(dpll_reg); |
3965 | 3963 | ||
3966 | if (IS_IGDNG(dev)) | 3964 | if (IS_IRONLAKE(dev)) |
3967 | return; | 3965 | return; |
3968 | 3966 | ||
3969 | if (!dev_priv->lvds_downclock_avail) | 3967 | if (!dev_priv->lvds_downclock_avail) |
@@ -4370,7 +4368,7 @@ static void intel_setup_outputs(struct drm_device *dev) | |||
4370 | if (IS_MOBILE(dev) && !IS_I830(dev)) | 4368 | if (IS_MOBILE(dev) && !IS_I830(dev)) |
4371 | intel_lvds_init(dev); | 4369 | intel_lvds_init(dev); |
4372 | 4370 | ||
4373 | if (IS_IGDNG(dev)) { | 4371 | if (IS_IRONLAKE(dev)) { |
4374 | int found; | 4372 | int found; |
4375 | 4373 | ||
4376 | if (IS_MOBILE(dev) && (I915_READ(DP_A) & DP_DETECTED)) | 4374 | if (IS_MOBILE(dev) && (I915_READ(DP_A) & DP_DETECTED)) |
@@ -4537,7 +4535,7 @@ void intel_init_clock_gating(struct drm_device *dev) | |||
4537 | * Disable clock gating reported to work incorrectly according to the | 4535 | * Disable clock gating reported to work incorrectly according to the |
4538 | * specs, but enable as much else as we can. | 4536 | * specs, but enable as much else as we can. |
4539 | */ | 4537 | */ |
4540 | if (IS_IGDNG(dev)) { | 4538 | if (IS_IRONLAKE(dev)) { |
4541 | return; | 4539 | return; |
4542 | } else if (IS_G4X(dev)) { | 4540 | } else if (IS_G4X(dev)) { |
4543 | uint32_t dspclk_gate; | 4541 | uint32_t dspclk_gate; |
@@ -4620,8 +4618,8 @@ static void intel_init_display(struct drm_device *dev) | |||
4620 | struct drm_i915_private *dev_priv = dev->dev_private; | 4618 | struct drm_i915_private *dev_priv = dev->dev_private; |
4621 | 4619 | ||
4622 | /* We always want a DPMS function */ | 4620 | /* We always want a DPMS function */ |
4623 | if (IS_IGDNG(dev)) | 4621 | if (IS_IRONLAKE(dev)) |
4624 | dev_priv->display.dpms = igdng_crtc_dpms; | 4622 | dev_priv->display.dpms = ironlake_crtc_dpms; |
4625 | else | 4623 | else |
4626 | dev_priv->display.dpms = i9xx_crtc_dpms; | 4624 | dev_priv->display.dpms = i9xx_crtc_dpms; |
4627 | 4625 | ||
@@ -4640,13 +4638,13 @@ static void intel_init_display(struct drm_device *dev) | |||
4640 | } | 4638 | } |
4641 | 4639 | ||
4642 | /* Returns the core display clock speed */ | 4640 | /* Returns the core display clock speed */ |
4643 | if (IS_I945G(dev) || (IS_G33(dev) && ! IS_IGDGM(dev))) | 4641 | if (IS_I945G(dev) || (IS_G33(dev) && ! IS_PINEVIEW_M(dev))) |
4644 | dev_priv->display.get_display_clock_speed = | 4642 | dev_priv->display.get_display_clock_speed = |
4645 | i945_get_display_clock_speed; | 4643 | i945_get_display_clock_speed; |
4646 | else if (IS_I915G(dev)) | 4644 | else if (IS_I915G(dev)) |
4647 | dev_priv->display.get_display_clock_speed = | 4645 | dev_priv->display.get_display_clock_speed = |
4648 | i915_get_display_clock_speed; | 4646 | i915_get_display_clock_speed; |
4649 | else if (IS_I945GM(dev) || IS_845G(dev) || IS_IGDGM(dev)) | 4647 | else if (IS_I945GM(dev) || IS_845G(dev) || IS_PINEVIEW_M(dev)) |
4650 | dev_priv->display.get_display_clock_speed = | 4648 | dev_priv->display.get_display_clock_speed = |
4651 | i9xx_misc_get_display_clock_speed; | 4649 | i9xx_misc_get_display_clock_speed; |
4652 | else if (IS_I915GM(dev)) | 4650 | else if (IS_I915GM(dev)) |
@@ -4663,7 +4661,7 @@ static void intel_init_display(struct drm_device *dev) | |||
4663 | i830_get_display_clock_speed; | 4661 | i830_get_display_clock_speed; |
4664 | 4662 | ||
4665 | /* For FIFO watermark updates */ | 4663 | /* For FIFO watermark updates */ |
4666 | if (IS_IGDNG(dev)) | 4664 | if (IS_IRONLAKE(dev)) |
4667 | dev_priv->display.update_wm = NULL; | 4665 | dev_priv->display.update_wm = NULL; |
4668 | else if (IS_G4X(dev)) | 4666 | else if (IS_G4X(dev)) |
4669 | dev_priv->display.update_wm = g4x_update_wm; | 4667 | dev_priv->display.update_wm = g4x_update_wm; |
@@ -4741,9 +4739,9 @@ void intel_modeset_init(struct drm_device *dev) | |||
4741 | 4739 | ||
4742 | intel_setup_overlay(dev); | 4740 | intel_setup_overlay(dev); |
4743 | 4741 | ||
4744 | if (IS_IGD(dev) && !intel_get_cxsr_latency(IS_IGDG(dev), | 4742 | if (IS_PINEVIEW(dev) && !intel_get_cxsr_latency(IS_PINEVIEW_G(dev), |
4745 | dev_priv->fsb_freq, | 4743 | dev_priv->fsb_freq, |
4746 | dev_priv->mem_freq)) | 4744 | dev_priv->mem_freq)) |
4747 | DRM_INFO("failed to find known CxSR latency " | 4745 | DRM_INFO("failed to find known CxSR latency " |
4748 | "(found fsb freq %d, mem freq %d), disabling CxSR\n", | 4746 | "(found fsb freq %d, mem freq %d), disabling CxSR\n", |
4749 | dev_priv->fsb_freq, dev_priv->mem_freq); | 4747 | dev_priv->fsb_freq, dev_priv->mem_freq); |