@@ -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;
@@ -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__ */
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@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(+)