[Intel-gfx] [PATCH 2/5] drm/i915: Add checking a specific Video DIP is enabled or not
Gwan-gyeong Mun
gwan-gyeong.mun at intel.com
Thu Oct 24 18:24:20 UTC 2019
Because DP ports don't use intel_hdmi_infoframes_enabled() machanism,
DP ports requires a way to check a specific infoframe (aka. Video DIP )
is enabled or not.
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
---
drivers/gpu/drm/i915/display/intel_hdmi.c | 21 +++++++++++++++++++++
drivers/gpu/drm/i915/display/intel_hdmi.h | 3 +++
2 files changed, 24 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 3c2aea93ae02..aed06a5da489 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -620,6 +620,27 @@ void intel_enable_infoframe(struct intel_encoder *encoder,
}
}
+bool intel_infoframe_enabled(struct intel_encoder *encoder,
+ const struct intel_crtc_state *crtc_state,
+ unsigned int type)
+{
+ struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+ struct intel_digital_port *dig_port = enc_to_dig_port(&encoder->base);
+ u32 val = 0;
+
+ val = dig_port->infoframes_enabled(encoder, crtc_state);
+
+ if (HAS_DDI(dev_priv)) {
+ if (val & hsw_infoframe_enable(type))
+ return true;
+ } else {
+ if (val & g4x_infoframe_enable(type))
+ return true;
+ }
+
+ return false;
+}
+
u32 intel_hdmi_infoframe_enable(unsigned int type)
{
int i;
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.h b/drivers/gpu/drm/i915/display/intel_hdmi.h
index 86f925526514..96d50f591b69 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.h
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.h
@@ -51,5 +51,8 @@ void intel_read_infoframe(struct intel_encoder *encoder,
void intel_enable_infoframe(struct intel_encoder *encoder, bool enable,
const struct intel_crtc_state *crtc_state,
unsigned int type);
+bool intel_infoframe_enabled(struct intel_encoder *encoder,
+ const struct intel_crtc_state *crtc_state,
+ unsigned int type);
#endif /* __INTEL_HDMI_H__ */
--
2.23.0
More information about the Intel-gfx
mailing list