summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-02 15:28:42 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-02 15:28:42 +0100
commit676b42a27d707186df5bc3738d6de8fa4e18cde7 (patch)
tree96b5c085ff8b326f330fe2d73af75934c9247089
parent0faf5bead4f50a75ac6454b8e9f09bfc10b0ce2e (diff)
horrible hacks to whack 256x256 cursors into submission on my snbfor-ville
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 7dcb5b60600b..6e065b8d8385 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -1447,11 +1447,17 @@ static uint32_t ilk_compute_spr_wm(const struct ilk_pipe_wm_parameters *params,
* mem_value must be in 0.1us units.
*/
static uint32_t ilk_compute_cur_wm(const struct ilk_pipe_wm_parameters *params,
- uint32_t mem_value)
+ uint32_t mem_value, int level)
{
if (!params->active || !params->cur.enabled)
return 0;
+ if (params->cur.horiz_pixels > 128)
+ mem_value *= 5;
+
+ if (level > 0)
+ return 0xfff;
+
return ilk_wm_method2(params->pixel_rate,
params->pipe_htotal,
params->cur.horiz_pixels,
@@ -1650,7 +1656,7 @@ static void ilk_compute_wm_level(const struct drm_i915_private *dev_priv,
result->pri_val = ilk_compute_pri_wm(p, pri_latency, level);
result->spr_val = ilk_compute_spr_wm(p, spr_latency);
- result->cur_val = ilk_compute_cur_wm(p, cur_latency);
+ result->cur_val = ilk_compute_cur_wm(p, cur_latency, level);
result->fbc_val = ilk_compute_fbc_wm(p, result->pri_val);
result->enable = true;
}