aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_pm.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-09-03 06:56:07 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-09-03 09:10:58 -0400
commit5aef600321caee7f950842b87f878780f693ca3a (patch)
tree3cf2e2bad145f2e7b3ecf535e32236d4444829c6 /drivers/gpu/drm/i915/intel_pm.c
parentfd34f90c6071bbc124572dae83b67044b1c663cc (diff)
drm/i915: Rename global latency_ns variable
We use the variable name latency_ns in both the local lowlevel wm calculation routines and at the global level. Rename the global value to reduce shadow warnings and future confusion. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 8541feb893f3..49af81f6b4ad 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -872,7 +872,7 @@ void intel_set_memory_cxsr(struct drm_i915_private *dev_priv, bool enable)
872 * A value of 5us seems to be a good balance; safe for very low end 872 * A value of 5us seems to be a good balance; safe for very low end
873 * platforms but not overly aggressive on lower latency configs. 873 * platforms but not overly aggressive on lower latency configs.
874 */ 874 */
875static const int latency_ns = 5000; 875static const int pessimal_latency_ns = 5000;
876 876
877static int i9xx_get_fifo_size(struct drm_device *dev, int plane) 877static int i9xx_get_fifo_size(struct drm_device *dev, int plane)
878{ 878{
@@ -1387,14 +1387,14 @@ static void valleyview_update_wm(struct drm_crtc *crtc)
1387 vlv_update_drain_latency(crtc); 1387 vlv_update_drain_latency(crtc);
1388 1388
1389 if (g4x_compute_wm0(dev, PIPE_A, 1389 if (g4x_compute_wm0(dev, PIPE_A,
1390 &valleyview_wm_info, latency_ns, 1390 &valleyview_wm_info, pessimal_latency_ns,
1391 &valleyview_cursor_wm_info, latency_ns, 1391 &valleyview_cursor_wm_info, pessimal_latency_ns,
1392 &planea_wm, &cursora_wm)) 1392 &planea_wm, &cursora_wm))
1393 enabled |= 1 << PIPE_A; 1393 enabled |= 1 << PIPE_A;
1394 1394
1395 if (g4x_compute_wm0(dev, PIPE_B, 1395 if (g4x_compute_wm0(dev, PIPE_B,
1396 &valleyview_wm_info, latency_ns, 1396 &valleyview_wm_info, pessimal_latency_ns,
1397 &valleyview_cursor_wm_info, latency_ns, 1397 &valleyview_cursor_wm_info, pessimal_latency_ns,
1398 &planeb_wm, &cursorb_wm)) 1398 &planeb_wm, &cursorb_wm))
1399 enabled |= 1 << PIPE_B; 1399 enabled |= 1 << PIPE_B;
1400 1400
@@ -1453,20 +1453,20 @@ static void cherryview_update_wm(struct drm_crtc *crtc)
1453 vlv_update_drain_latency(crtc); 1453 vlv_update_drain_latency(crtc);
1454 1454
1455 if (g4x_compute_wm0(dev, PIPE_A, 1455 if (g4x_compute_wm0(dev, PIPE_A,
1456 &valleyview_wm_info, latency_ns, 1456 &valleyview_wm_info, pessimal_latency_ns,
1457 &valleyview_cursor_wm_info, latency_ns, 1457 &valleyview_cursor_wm_info, pessimal_latency_ns,
1458 &planea_wm, &cursora_wm)) 1458 &planea_wm, &cursora_wm))
1459 enabled |= 1 << PIPE_A; 1459 enabled |= 1 << PIPE_A;
1460 1460
1461 if (g4x_compute_wm0(dev, PIPE_B, 1461 if (g4x_compute_wm0(dev, PIPE_B,
1462 &valleyview_wm_info, latency_ns, 1462 &valleyview_wm_info, pessimal_latency_ns,
1463 &valleyview_cursor_wm_info, latency_ns, 1463 &valleyview_cursor_wm_info, pessimal_latency_ns,
1464 &planeb_wm, &cursorb_wm)) 1464 &planeb_wm, &cursorb_wm))
1465 enabled |= 1 << PIPE_B; 1465 enabled |= 1 << PIPE_B;
1466 1466
1467 if (g4x_compute_wm0(dev, PIPE_C, 1467 if (g4x_compute_wm0(dev, PIPE_C,
1468 &valleyview_wm_info, latency_ns, 1468 &valleyview_wm_info, pessimal_latency_ns,
1469 &valleyview_cursor_wm_info, latency_ns, 1469 &valleyview_cursor_wm_info, pessimal_latency_ns,
1470 &planec_wm, &cursorc_wm)) 1470 &planec_wm, &cursorc_wm))
1471 enabled |= 1 << PIPE_C; 1471 enabled |= 1 << PIPE_C;
1472 1472
@@ -1559,14 +1559,14 @@ static void g4x_update_wm(struct drm_crtc *crtc)
1559 bool cxsr_enabled; 1559 bool cxsr_enabled;
1560 1560
1561 if (g4x_compute_wm0(dev, PIPE_A, 1561 if (g4x_compute_wm0(dev, PIPE_A,
1562 &g4x_wm_info, latency_ns, 1562 &g4x_wm_info, pessimal_latency_ns,
1563 &g4x_cursor_wm_info, latency_ns, 1563 &g4x_cursor_wm_info, pessimal_latency_ns,
1564 &planea_wm, &cursora_wm)) 1564 &planea_wm, &cursora_wm))
1565 enabled |= 1 << PIPE_A; 1565 enabled |= 1 << PIPE_A;
1566 1566
1567 if (g4x_compute_wm0(dev, PIPE_B, 1567 if (g4x_compute_wm0(dev, PIPE_B,
1568 &g4x_wm_info, latency_ns, 1568 &g4x_wm_info, pessimal_latency_ns,
1569 &g4x_cursor_wm_info, latency_ns, 1569 &g4x_cursor_wm_info, pessimal_latency_ns,
1570 &planeb_wm, &cursorb_wm)) 1570 &planeb_wm, &cursorb_wm))
1571 enabled |= 1 << PIPE_B; 1571 enabled |= 1 << PIPE_B;
1572 1572
@@ -1709,7 +1709,7 @@ static void i9xx_update_wm(struct drm_crtc *unused_crtc)
1709 adjusted_mode = &to_intel_crtc(crtc)->config.adjusted_mode; 1709 adjusted_mode = &to_intel_crtc(crtc)->config.adjusted_mode;
1710 planea_wm = intel_calculate_wm(adjusted_mode->crtc_clock, 1710 planea_wm = intel_calculate_wm(adjusted_mode->crtc_clock,
1711 wm_info, fifo_size, cpp, 1711 wm_info, fifo_size, cpp,
1712 latency_ns); 1712 pessimal_latency_ns);
1713 enabled = crtc; 1713 enabled = crtc;
1714 } else { 1714 } else {
1715 planea_wm = fifo_size - wm_info->guard_size; 1715 planea_wm = fifo_size - wm_info->guard_size;
@@ -1731,7 +1731,7 @@ static void i9xx_update_wm(struct drm_crtc *unused_crtc)
1731 adjusted_mode = &to_intel_crtc(crtc)->config.adjusted_mode; 1731 adjusted_mode = &to_intel_crtc(crtc)->config.adjusted_mode;
1732 planeb_wm = intel_calculate_wm(adjusted_mode->crtc_clock, 1732 planeb_wm = intel_calculate_wm(adjusted_mode->crtc_clock,
1733 wm_info, fifo_size, cpp, 1733 wm_info, fifo_size, cpp,
1734 latency_ns); 1734 pessimal_latency_ns);
1735 if (enabled == NULL) 1735 if (enabled == NULL)
1736 enabled = crtc; 1736 enabled = crtc;
1737 else 1737 else
@@ -1827,7 +1827,7 @@ static void i845_update_wm(struct drm_crtc *unused_crtc)
1827 planea_wm = intel_calculate_wm(adjusted_mode->crtc_clock, 1827 planea_wm = intel_calculate_wm(adjusted_mode->crtc_clock,
1828 &i845_wm_info, 1828 &i845_wm_info,
1829 dev_priv->display.get_fifo_size(dev, 0), 1829 dev_priv->display.get_fifo_size(dev, 0),
1830 4, latency_ns); 1830 4, pessimal_latency_ns);
1831 fwater_lo = I915_READ(FW_BLC) & ~0xfff; 1831 fwater_lo = I915_READ(FW_BLC) & ~0xfff;
1832 fwater_lo |= (3<<8) | planea_wm; 1832 fwater_lo |= (3<<8) | planea_wm;
1833 1833