aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c41
1 files changed, 19 insertions, 22 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index c3bb925b2e65..40c12295c0bd 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -1287,15 +1287,14 @@ static bool vlv_compute_drain_latency(struct drm_device *dev,
1287 pixel_size = crtc->primary->fb->bits_per_pixel / 8; /* BPP */ 1287 pixel_size = crtc->primary->fb->bits_per_pixel / 8; /* BPP */
1288 1288
1289 entries = (clock / 1000) * pixel_size; 1289 entries = (clock / 1000) * pixel_size;
1290 *plane_prec_mult = (entries > 256) ? 1290 *plane_prec_mult = (entries > 128) ?
1291 DRAIN_LATENCY_PRECISION_32 : DRAIN_LATENCY_PRECISION_16; 1291 DRAIN_LATENCY_PRECISION_64 : DRAIN_LATENCY_PRECISION_32;
1292 *plane_dl = (64 * (*plane_prec_mult) * 4) / ((clock / 1000) * 1292 *plane_dl = (64 * (*plane_prec_mult) * 4) / entries;
1293 pixel_size);
1294 1293
1295 entries = (clock / 1000) * 4; /* BPP is always 4 for cursor */ 1294 entries = (clock / 1000) * 4; /* BPP is always 4 for cursor */
1296 *cursor_prec_mult = (entries > 256) ? 1295 *cursor_prec_mult = (entries > 128) ?
1297 DRAIN_LATENCY_PRECISION_32 : DRAIN_LATENCY_PRECISION_16; 1296 DRAIN_LATENCY_PRECISION_64 : DRAIN_LATENCY_PRECISION_32;
1298 *cursor_dl = (64 * (*cursor_prec_mult) * 4) / ((clock / 1000) * 4); 1297 *cursor_dl = (64 * (*cursor_prec_mult) * 4) / entries;
1299 1298
1300 return true; 1299 return true;
1301} 1300}
@@ -1320,9 +1319,9 @@ static void vlv_update_drain_latency(struct drm_device *dev)
1320 if (vlv_compute_drain_latency(dev, 0, &plane_prec_mult, &planea_dl, 1319 if (vlv_compute_drain_latency(dev, 0, &plane_prec_mult, &planea_dl,
1321 &cursor_prec_mult, &cursora_dl)) { 1320 &cursor_prec_mult, &cursora_dl)) {
1322 cursora_prec = (cursor_prec_mult == DRAIN_LATENCY_PRECISION_32) ? 1321 cursora_prec = (cursor_prec_mult == DRAIN_LATENCY_PRECISION_32) ?
1323 DDL_CURSORA_PRECISION_32 : DDL_CURSORA_PRECISION_16; 1322 DDL_CURSORA_PRECISION_32 : DDL_CURSORA_PRECISION_64;
1324 planea_prec = (plane_prec_mult == DRAIN_LATENCY_PRECISION_32) ? 1323 planea_prec = (plane_prec_mult == DRAIN_LATENCY_PRECISION_32) ?
1325 DDL_PLANEA_PRECISION_32 : DDL_PLANEA_PRECISION_16; 1324 DDL_PLANEA_PRECISION_32 : DDL_PLANEA_PRECISION_64;
1326 1325
1327 I915_WRITE(VLV_DDL1, cursora_prec | 1326 I915_WRITE(VLV_DDL1, cursora_prec |
1328 (cursora_dl << DDL_CURSORA_SHIFT) | 1327 (cursora_dl << DDL_CURSORA_SHIFT) |
@@ -1333,9 +1332,9 @@ static void vlv_update_drain_latency(struct drm_device *dev)
1333 if (vlv_compute_drain_latency(dev, 1, &plane_prec_mult, &planeb_dl, 1332 if (vlv_compute_drain_latency(dev, 1, &plane_prec_mult, &planeb_dl,
1334 &cursor_prec_mult, &cursorb_dl)) { 1333 &cursor_prec_mult, &cursorb_dl)) {
1335 cursorb_prec = (cursor_prec_mult == DRAIN_LATENCY_PRECISION_32) ? 1334 cursorb_prec = (cursor_prec_mult == DRAIN_LATENCY_PRECISION_32) ?
1336 DDL_CURSORB_PRECISION_32 : DDL_CURSORB_PRECISION_16; 1335 DDL_CURSORB_PRECISION_32 : DDL_CURSORB_PRECISION_64;
1337 planeb_prec = (plane_prec_mult == DRAIN_LATENCY_PRECISION_32) ? 1336 planeb_prec = (plane_prec_mult == DRAIN_LATENCY_PRECISION_32) ?
1338 DDL_PLANEB_PRECISION_32 : DDL_PLANEB_PRECISION_16; 1337 DDL_PLANEB_PRECISION_32 : DDL_PLANEB_PRECISION_64;
1339 1338
1340 I915_WRITE(VLV_DDL2, cursorb_prec | 1339 I915_WRITE(VLV_DDL2, cursorb_prec |
1341 (cursorb_dl << DDL_CURSORB_SHIFT) | 1340 (cursorb_dl << DDL_CURSORB_SHIFT) |
@@ -3420,10 +3419,10 @@ static void intel_print_rc6_info(struct drm_device *dev, u32 mode)
3420 else 3419 else
3421 mode = 0; 3420 mode = 0;
3422 } 3421 }
3423 DRM_INFO("Enabling RC6 states: RC6 %s, RC6p %s, RC6pp %s\n", 3422 DRM_DEBUG_KMS("Enabling RC6 states: RC6 %s, RC6p %s, RC6pp %s\n",
3424 (mode & GEN6_RC_CTL_RC6_ENABLE) ? "on" : "off", 3423 (mode & GEN6_RC_CTL_RC6_ENABLE) ? "on" : "off",
3425 (mode & GEN6_RC_CTL_RC6p_ENABLE) ? "on" : "off", 3424 (mode & GEN6_RC_CTL_RC6p_ENABLE) ? "on" : "off",
3426 (mode & GEN6_RC_CTL_RC6pp_ENABLE) ? "on" : "off"); 3425 (mode & GEN6_RC_CTL_RC6pp_ENABLE) ? "on" : "off");
3427} 3426}
3428 3427
3429static int sanitize_rc6_option(const struct drm_device *dev, int enable_rc6) 3428static int sanitize_rc6_option(const struct drm_device *dev, int enable_rc6)
@@ -3447,8 +3446,8 @@ static int sanitize_rc6_option(const struct drm_device *dev, int enable_rc6)
3447 mask = INTEL_RC6_ENABLE; 3446 mask = INTEL_RC6_ENABLE;
3448 3447
3449 if ((enable_rc6 & mask) != enable_rc6) 3448 if ((enable_rc6 & mask) != enable_rc6)
3450 DRM_INFO("Adjusting RC6 mask to %d (requested %d, valid %d)\n", 3449 DRM_DEBUG_KMS("Adjusting RC6 mask to %d (requested %d, valid %d)\n",
3451 enable_rc6 & mask, enable_rc6, mask); 3450 enable_rc6 & mask, enable_rc6, mask);
3452 3451
3453 return enable_rc6 & mask; 3452 return enable_rc6 & mask;
3454 } 3453 }
@@ -5228,11 +5227,9 @@ static void gen6_check_mch_setup(struct drm_device *dev)
5228 uint32_t tmp; 5227 uint32_t tmp;
5229 5228
5230 tmp = I915_READ(MCH_SSKPD); 5229 tmp = I915_READ(MCH_SSKPD);
5231 if ((tmp & MCH_SSKPD_WM0_MASK) != MCH_SSKPD_WM0_VAL) { 5230 if ((tmp & MCH_SSKPD_WM0_MASK) != MCH_SSKPD_WM0_VAL)
5232 DRM_INFO("Wrong MCH_SSKPD value: 0x%08x\n", tmp); 5231 DRM_DEBUG_KMS("Wrong MCH_SSKPD value: 0x%08x This can cause underruns.\n",
5233 DRM_INFO("This can cause pipe underruns and display issues.\n"); 5232 tmp);
5234 DRM_INFO("Please upgrade your BIOS to fix this.\n");
5235 }
5236} 5233}
5237 5234
5238static void gen6_init_clock_gating(struct drm_device *dev) 5235static void gen6_init_clock_gating(struct drm_device *dev)