[PATCH 13/17] drm/i915/dp: Modify compressed bpp limitations for ultrajoiner
Ankit Nautiyal
ankit.k.nautiyal at intel.com
Fri Sep 27 15:22:37 UTC 2024
Add compressed bpp limitations for ultrajoiner.
v2: Fix the case for 1 pipe. (Ankit)
v3: Refactor existing helper separately and add only ultrajoiner
limitation. (Ville)
v4: Separate out function for ultrajoiner_ram_bits.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index a85527a55dc0..8a32d38d21bf 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -896,6 +896,16 @@ static u32 small_joiner_ram_max_bpp(struct intel_display *display,
return max_bpp;
}
+static int ultrajoiner_ram_bits(void)
+{
+ return 4 * 72 * 512;
+}
+
+static u32 ultrajoiner_ram_max_bpp(u32 mode_hdisplay)
+{
+ return ultrajoiner_ram_bits() / mode_hdisplay;
+}
+
static
u32 get_max_compressed_bpp_with_joiner(struct drm_i915_private *i915,
u32 mode_clock, u32 mode_hdisplay,
@@ -907,11 +917,18 @@ u32 get_max_compressed_bpp_with_joiner(struct drm_i915_private *i915,
max_bpp_small_joiner_ram = small_joiner_ram_max_bpp(display, mode_hdisplay,
num_joined_pipes);
- if (num_joined_pipes == 2) {
+ if (num_joined_pipes > 1) {
+ u32 max_bpp;
u32 max_bpp_bigjoiner = bigjoiner_bw_max_bpp(display, mode_clock,
num_joined_pipes);
- return min(max_bpp_small_joiner_ram, max_bpp_bigjoiner);
+ max_bpp = min(max_bpp_small_joiner_ram, max_bpp_bigjoiner);
+
+ if (num_joined_pipes == 2)
+ return max_bpp;
+
+ if (num_joined_pipes == 4)
+ return min(max_bpp, ultrajoiner_ram_max_bpp(mode_hdisplay));
}
return max_bpp_small_joiner_ram;
--
2.45.2
More information about the Intel-gfx
mailing list