diff mbox series

[4/8] drm/i915: Use intel_dbuf_slice_size()

Message ID 20210416171011.19012-5-ville.syrjala@linux.intel.com (mailing list archive)
State New
Headers show
Series drm/i915: dbuf cleanups | expand

Commit Message

Ville Syrjälä April 16, 2021, 5:10 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Use intel_dbuf_slice_size() instead of hand rolling it.
Also clean up some of the types.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 88eb54241b9f..38e2ba45bfd8 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4066,12 +4066,9 @@  skl_ddb_entry_for_slices(struct drm_i915_private *dev_priv, u8 slice_mask,
 u32 skl_ddb_dbuf_slice_mask(struct drm_i915_private *dev_priv,
 			    const struct skl_ddb_entry *entry)
 {
-	u32 slice_mask = 0;
-	u16 ddb_size = intel_dbuf_size(dev_priv);
-	int num_slices = intel_dbuf_num_slices(dev_priv);
-	u16 slice_size = ddb_size / num_slices;
-	u16 start_slice;
-	u16 end_slice;
+	int slice_size = intel_dbuf_slice_size(dev_priv);
+	enum dbuf_slice start_slice, end_slice;
+	u8 slice_mask = 0;
 
 	if (!skl_ddb_entry_size(entry))
 		return 0;