[Intel-gfx] [PATCH 12/12] drm/i915: Remove the remnants of the ilk+ LP0 wm hack
Ville Syrjala
ville.syrjala at linux.intel.com
Wed Oct 10 13:04:54 UTC 2018
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
In the past we couldn't properly reject the operation if the level 0
watermarks exceeded the limits, thus we had a hack to clamp the values.
commit 86c8bbbeb8d1 ("drm/i915: Calculate ILK-style watermarks during
atomic check (v3)") changed the behaviour to fail the operation
instead, but neglected to remove all the code for the hack.
Remove the leftovers.
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/i915/intel_pm.c | 28 +---------------------------
1 file changed, 1 insertion(+), 27 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index dd5edd984fb5..0dce22fcda2d 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2746,8 +2746,6 @@ static bool ilk_validate_wm_level(int level,
const struct ilk_wm_maximums *max,
struct intel_wm_level *result)
{
- bool ret;
-
/* already determined to be invalid? */
if (!result->enable)
return false;
@@ -2756,31 +2754,7 @@ static bool ilk_validate_wm_level(int level,
result->spr_val <= max->spr &&
result->cur_val <= max->cur;
- ret = result->enable;
-
- /*
- * HACK until we can pre-compute everything,
- * and thus fail gracefully if LP0 watermarks
- * are exceeded...
- */
- if (level == 0 && !result->enable) {
- if (result->pri_val > max->pri)
- DRM_DEBUG_KMS("Primary WM%d too large %u (max %u)\n",
- level, result->pri_val, max->pri);
- if (result->spr_val > max->spr)
- DRM_DEBUG_KMS("Sprite WM%d too large %u (max %u)\n",
- level, result->spr_val, max->spr);
- if (result->cur_val > max->cur)
- DRM_DEBUG_KMS("Cursor WM%d too large %u (max %u)\n",
- level, result->cur_val, max->cur);
-
- result->pri_val = min_t(uint32_t, result->pri_val, max->pri);
- result->spr_val = min_t(uint32_t, result->spr_val, max->spr);
- result->cur_val = min_t(uint32_t, result->cur_val, max->cur);
- result->enable = true;
- }
-
- return ret;
+ return result->enable;
}
static void ilk_compute_wm_level(const struct drm_i915_private *dev_priv,
--
2.18.1
More information about the Intel-gfx
mailing list