All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/skl: Correct other-pipe watermark update condition check
@ 2015-09-21 18:02 Kumar, Mahesh
  2015-10-16 16:45 ` Ville Syrjälä
  2015-10-19  9:29 ` Daniel Vetter
  0 siblings, 2 replies; 9+ messages in thread
From: Kumar, Mahesh @ 2015-09-21 18:02 UTC (permalink / raw)
  To: intel-gfx

If ddb allocation for planes in current CRTC is changed, that doesn't
lead to ddb allocation change for other CRTCs, because our DDB allocation
is not dynamic according to plane parameters, ddb is allocated according
to number of CRTC enabled, & divided equally among CTRC's.

In current condition check during Watermark calculation, if number of
plane/ddb allocation changes for current CRTC, Watermark for other pipes
are recalculated. But there is no change in DDB allocation of other pipe
so watermark is also not changed, This leads to warning messages.
WARN_ON(!wm_changed)

This patch corrects this and check if DDB allocation for pipes is changed,
then only recalculate watermarks.

Signed-off-by: Kumar, Mahesh <mahesh1.kumar@intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 62de97e..a1ed920 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3127,14 +3127,12 @@ static bool skl_ddb_allocation_changed(const struct skl_ddb_allocation *new_ddb,
 	struct drm_device *dev = intel_crtc->base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	const struct skl_ddb_allocation *cur_ddb = &dev_priv->wm.skl_hw.ddb;
-	enum pipe pipe = intel_crtc->pipe;
-
-	if (memcmp(new_ddb->plane[pipe], cur_ddb->plane[pipe],
-		   sizeof(new_ddb->plane[pipe])))
-		return true;
 
-	if (memcmp(&new_ddb->cursor[pipe], &cur_ddb->cursor[pipe],
-		    sizeof(new_ddb->cursor[pipe])))
+	/*
+	 * If ddb allocation of pipes chenged, it may require recalculation of
+	 * watermarks
+	 */
+	if (memcmp(new_ddb->pipe, cur_ddb->pipe, sizeof(new_ddb->pipe)))
 		return true;
 
 	return false;
-- 
1.9.1

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

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

end of thread, other threads:[~2016-02-22 16:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-21 18:02 [PATCH] drm/i915/skl: Correct other-pipe watermark update condition check Kumar, Mahesh
2015-10-16 16:45 ` Ville Syrjälä
2015-10-19  9:29 ` Daniel Vetter
2015-10-19 13:00   ` Ville Syrjälä
2015-10-19 13:22     ` Daniel Vetter
2015-10-23 16:41       ` [PATCH] drm/i915/skl: Correct other-pipe watermark update condition check (v2) Matt Roper
2015-10-27  6:16         ` Kumar, Mahesh
2015-11-17 14:16         ` Daniel Vetter
2016-02-22 16:42         ` Lyude

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.