All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 1/4] drm/i915: Don't check uv_wm in skl_plane_wm_equals()
@ 2020-02-28 20:35 Ville Syrjala
  2020-02-28 20:35 ` [Intel-gfx] [PATCH 2/4] drm/i915: Don't check for wm changes until we've compute the wms fully Ville Syrjala
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Ville Syrjala @ 2020-02-28 20:35 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The hardware never sees the uv_wm values (apart from
uv_wm.min_ddb_alloc affecting the ddb allocation). Thus there
is no point in comparing uv_wm to determine if we need to
reprogram the watermark registers. So let's check only the
rgb/y watermark in skl_plane_wm_equals(). But let's leave
a comment behind so that the next person reading this doesn't
get as confused as I did when I added this check.

If the ddb allocation ends up changing due to uv_wm
skl_ddb_add_affected_planes() takes care of adding the plane
to the state.

TODO: we should perhaps just eliminate uv_wm from the state
and simply track the min_ddb_alloc for uv instead.

Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 345429e5ad45..39299811b650 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5400,8 +5400,12 @@ static bool skl_plane_wm_equals(struct drm_i915_private *dev_priv,
 	int level, max_level = ilk_wm_max_level(dev_priv);
 
 	for (level = 0; level <= max_level; level++) {
-		if (!skl_wm_level_equals(&wm1->wm[level], &wm2->wm[level]) ||
-		    !skl_wm_level_equals(&wm1->uv_wm[level], &wm2->uv_wm[level]))
+		/*
+		 * We don't check uv_wm as the hardware doesn't actually
+		 * use it. It only gets used for calculating the required
+		 * ddb allocation.
+		 */
+		if (!skl_wm_level_equals(&wm1->wm[level], &wm2->wm[level]))
 			return false;
 	}
 
-- 
2.24.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-03-05 13:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-28 20:35 [Intel-gfx] [PATCH 1/4] drm/i915: Don't check uv_wm in skl_plane_wm_equals() Ville Syrjala
2020-02-28 20:35 ` [Intel-gfx] [PATCH 2/4] drm/i915: Don't check for wm changes until we've compute the wms fully Ville Syrjala
2020-03-04  0:21   ` Souza, Jose
2020-03-04 11:46     ` Ville Syrjälä
2020-03-04 23:25       ` Souza, Jose
2020-03-05 13:55         ` Ville Syrjälä
2020-02-28 20:35 ` [Intel-gfx] [PATCH 3/4] drm/i915: Enable transition watermarks for glk Ville Syrjala
2020-02-28 20:35 ` [Intel-gfx] [PATCH 4/4] drm/i915: Implement display w/a 1140 for glk/cnl Ville Syrjala
2020-02-28 21:27 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915: Don't check uv_wm in skl_plane_wm_equals() Patchwork
2020-03-01 18:23 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-03-04  0:14 ` [Intel-gfx] [PATCH 1/4] " Souza, Jose

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.