[PATCH 09/14] drm/i915/display: Add helpers to check for ultrajoiner primary
Ankit Nautiyal
ankit.k.nautiyal at intel.com
Fri Sep 6 12:58:02 UTC 2024
Add helpers to check if ultrajoiner is used and to check for ultrajoiner
primary.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy at intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 13 +++++++++++++
drivers/gpu/drm/i915/display/intel_display.h | 2 ++
drivers/gpu/drm/i915/display/intel_display_types.h | 1 +
3 files changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 1243e4b24acc..212163b1c73e 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -298,6 +298,19 @@ bool intel_crtc_is_bigjoiner_secondary(const struct intel_crtc_state *crtc_state
return !intel_crtc_is_bigjoiner_primary(crtc_state);
}
+bool intel_crtc_is_ultrajoiner(const struct intel_crtc_state *crtc_state)
+{
+ return intel_joiner_num_pipes(crtc_state) == INTEL_ULTRA_JOINER_PIPES;
+}
+
+bool intel_crtc_is_ultrajoiner_primary(const struct intel_crtc_state *crtc_state)
+{
+ struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+
+ return intel_crtc_is_ultrajoiner(crtc_state) &&
+ (crtc->pipe == joiner_primary_pipe(crtc_state));
+}
+
u8 intel_crtc_joiner_secondary_pipes(const struct intel_crtc_state *crtc_state)
{
if (crtc_state->joiner_pipes)
diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
index 840a98947de8..e0de2715a4a6 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -428,6 +428,8 @@ bool intel_crtc_is_joiner_primary(const struct intel_crtc_state *crtc_state);
bool intel_crtc_is_joiner_secondary(const struct intel_crtc_state *crtc_state);
bool intel_crtc_is_bigjoiner_primary(const struct intel_crtc_state *crtc_state);
bool intel_crtc_is_bigjoiner_secondary(const struct intel_crtc_state *crtc_state);
+bool intel_crtc_is_ultrajoiner(const struct intel_crtc_state *crtc_state);
+bool intel_crtc_is_ultrajoiner_primary(const struct intel_crtc_state *crtc_state);
u8 intel_crtc_joiner_secondary_pipes(const struct intel_crtc_state *crtc_state);
struct intel_crtc *intel_joiner_primary_crtc(const struct intel_crtc_state *crtc_state);
bool intel_crtc_get_pipe_config(struct intel_crtc_state *crtc_state);
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index c213fb61ceb7..6c8ba9760f1a 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -489,6 +489,7 @@ struct intel_hdcp {
enum intel_joiner_pipe_count {
INTEL_NONE_JOINER_PIPES = 0,
INTEL_BIG_JOINER_PIPES = 2,
+ INTEL_ULTRA_JOINER_PIPES = 4,
INTEL_INVALID_JOINER_PIPES,
};
--
2.45.2
More information about the Intel-gfx
mailing list