[PATCH 28/32] drm/i915/display/vdsc: Add ultrajoiner support with DSC
Ankit Nautiyal
ankit.k.nautiyal at intel.com
Wed Sep 4 08:45:39 UTC 2024
From: Stanislav Lisovskiy <stanislav.lisovskiy at intel.com>
Add changes to DSC which are required for Ultrajoiner.
v2:
-Use correct helper for setting bits for bigjoiner secondary. (Ankit)
-Use enum for joiner pipe count instead magic numbers. (Suraj)
Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy at intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
---
drivers/gpu/drm/i915/display/intel_dss.c | 19 +++++++++++++++++++
drivers/gpu/drm/i915/display/intel_vdsc.c | 8 ++++++--
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dss.c b/drivers/gpu/drm/i915/display/intel_dss.c
index 7feddbf99af0..c7df50b8263d 100644
--- a/drivers/gpu/drm/i915/display/intel_dss.c
+++ b/drivers/gpu/drm/i915/display/intel_dss.c
@@ -178,6 +178,14 @@ void intel_dss_enable_uncompressed_joiner(const struct intel_crtc_state *crtc_st
}
}
+static bool intel_dss_ultrajoiner_enable_needed(const struct intel_crtc_state *crtc_state)
+{
+ struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+
+ return intel_joiner_get_num_pipes(crtc_state) == INTEL_JOINER_ULTRA_JOINER_PIPES &&
+ crtc->pipe != PIPE_D;
+}
+
void intel_dss_enable_compressed_joiner(const struct intel_crtc_state *crtc_state,
int vdsc_instances_per_pipe)
{
@@ -192,6 +200,17 @@ void intel_dss_enable_compressed_joiner(const struct intel_crtc_state *crtc_stat
dss_ctl1_val |= JOINER_ENABLE;
}
if (crtc_state->joiner_pipes) {
+ /*
+ * This bit doesn't seem to follow master/slave logic or
+ * any other logic, so lets just add helper function to
+ * at least hide this hassle..
+ */
+ if (intel_dss_ultrajoiner_enable_needed(crtc_state))
+ dss_ctl1_val |= ULTRA_JOINER_ENABLE;
+
+ if (intel_joiner_is_ultrajoiner_primary(crtc_state))
+ dss_ctl1_val |= PRIMARY_ULTRA_JOINER_ENABLE;
+
dss_ctl1_val |= BIG_JOINER_ENABLE;
if (!intel_joiner_crtc_is_joiner_secondary(crtc_state))
dss_ctl1_val |= PRIMARY_BIG_JOINER_ENABLE;
diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i915/display/intel_vdsc.c
index 7e7c7694e56f..62ab9dd4599f 100644
--- a/drivers/gpu/drm/i915/display/intel_vdsc.c
+++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
@@ -16,6 +16,7 @@
#include "intel_display_types.h"
#include "intel_dsi.h"
#include "intel_dss.h"
+#include "intel_joiner.h"
#include "intel_qp_tables.h"
#include "intel_vdsc.h"
#include "intel_vdsc_regs.h"
@@ -380,9 +381,12 @@ static int intel_dsc_get_vdsc_per_pipe(const struct intel_crtc_state *crtc_state
int intel_dsc_get_num_vdsc_instances(const struct intel_crtc_state *crtc_state)
{
int num_vdsc_instances = intel_dsc_get_vdsc_per_pipe(crtc_state);
+ int joined_pipes = intel_joiner_get_num_pipes(crtc_state);
- if (crtc_state->joiner_pipes)
- num_vdsc_instances *= 2;
+ if (joined_pipes == INTEL_JOINER_ULTRA_JOINER_PIPES)
+ num_vdsc_instances *= INTEL_JOINER_ULTRA_JOINER_PIPES;
+ else if (joined_pipes == INTEL_JOINER_BIG_JOINER_PIPES)
+ num_vdsc_instances *= INTEL_JOINER_BIG_JOINER_PIPES;
return num_vdsc_instances;
}
--
2.45.2
More information about the Intel-gfx-trybot
mailing list