Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1497621

[PATCH 08/10] drm/i915/gen9: Add skl_wm_level_equals()

From Lyude <cpaul@redhat.com>
Newsgroups linux.kernel
Subject [PATCH 08/10] drm/i915/gen9: Add skl_wm_level_equals()
Date 2016-10-08 02:20 +0200
Message-ID <spNwR-85q-7@gated-at.bofh.it> (permalink)
References <spNwR-85q-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Helper we're going to be using for implementing verification of the wm
levels in skl_verify_wm_level().

Signed-off-by: Lyude <cpaul@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/intel_drv.h |  2 ++
 drivers/gpu/drm/i915/intel_pm.c  | 14 ++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 73a2d16d..3e6e9af 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1761,6 +1761,8 @@ void skl_pipe_wm_get_hw_state(struct drm_crtc *crtc,
 bool intel_can_enable_sagv(struct drm_atomic_state *state);
 int intel_enable_sagv(struct drm_i915_private *dev_priv);
 int intel_disable_sagv(struct drm_i915_private *dev_priv);
+bool skl_wm_level_equals(const struct skl_wm_level *l1,
+			 const struct skl_wm_level *l2);
 bool skl_ddb_allocation_equals(const struct skl_ddb_allocation *old,
 			       const struct skl_ddb_allocation *new,
 			       enum pipe pipe);
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 27a520ce..6af1587 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3853,6 +3853,20 @@ void skl_write_cursor_wm(struct intel_crtc *intel_crtc,
 			    &ddb->plane[pipe][PLANE_CURSOR]);
 }
 
+bool skl_wm_level_equals(const struct skl_wm_level *l1,
+			 const struct skl_wm_level *l2)
+{
+	if (l1->plane_en != l2->plane_en)
+		return false;
+
+	/* If both planes aren't enabled, the rest shouldn't matter */
+	if (!l1->plane_en)
+		return true;
+
+	return (l1->plane_res_l == l2->plane_res_l &&
+		l1->plane_res_b == l2->plane_res_b);
+}
+
 static inline bool skl_ddb_entries_overlap(const struct skl_ddb_entry *a,
 					   const struct skl_ddb_entry *b)
 {
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/10] Start of skl watermark cleanup Lyude <cpaul@redhat.com> - 2016-10-08 02:20 +0200
  [PATCH v2 02/10] drm/i915/skl: Remove linetime from skl_wm_values Lyude <cpaul@redhat.com> - 2016-10-08 02:20 +0200
  [PATCH 08/10] drm/i915/gen9: Add skl_wm_level_equals() Lyude <cpaul@redhat.com> - 2016-10-08 02:20 +0200
  [PATCH v2 01/10] drm/i915/skl: Move per-pipe ddb allocations into crtc states Lyude <cpaul@redhat.com> - 2016-10-08 02:20 +0200
    Re: [Intel-gfx] [PATCH v2 01/10] drm/i915/skl: Move per-pipe ddb  allocations into crtc states Paulo Zanoni <paulo.r.zanoni@intel.com> - 2016-10-11 21:40 +0200
  [PATCH 10/10] drm/i915/gen9: Don't wrap strings in verify_wm_state() Lyude <cpaul@redhat.com> - 2016-10-08 02:20 +0200
  [PATCH v2 05/10] drm/i915/gen9: Get rid of redundant watermark values Lyude <cpaul@redhat.com> - 2016-10-08 02:20 +0200
  [PATCH v2 03/10] drm/i915/gen9: Make skl_wm_level per-plane Lyude <cpaul@redhat.com> - 2016-10-08 02:20 +0200
    Re: [PATCH v2 03/10] drm/i915/gen9: Make skl_wm_level per-plane Paulo Zanoni <paulo.r.zanoni@intel.com> - 2016-10-11 21:40 +0200
  [PATCH 07/10] drm/i915/gen9: Make skl_pipe_wm_get_hw_state() reusable Lyude <cpaul@redhat.com> - 2016-10-08 02:20 +0200
  [PATCH 04/10] drm/i915/gen9: Cleanup skl_pipe_wm_active_state Lyude <cpaul@redhat.com> - 2016-10-08 02:20 +0200
    Re: [Intel-gfx] [PATCH 04/10] drm/i915/gen9: Cleanup  skl_pipe_wm_active_state Paulo Zanoni <paulo.r.zanoni@intel.com> - 2016-10-11 21:50 +0200

csiph-web