[PATCH 1/6] drm/i915: Export intel_hdmi_compute_avi_infoframe()

Nautiyal, Ankit K ankit.k.nautiyal at intel.com
Tue Aug 3 11:06:43 UTC 2021


From: Swati Sharma <swati2.sharma at intel.com>

Instead of re-writing the avi_infoframe_compute func in intel_dp;
exporting hdmi_compute_avi_infoframe func so that it can be called
directly while encapsulating AVI infoframes in GMP dip.

This is required when HDMI 2.1 PCON (dp to hdmi) is used and we need
to send AVI infoframes to PCON in source control mode.

Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 8 ++++----
 drivers/gpu/drm/i915/display/intel_hdmi.h | 3 +++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 852af2b..d7fb236 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -701,10 +701,9 @@ void intel_read_infoframe(struct intel_encoder *encoder,
 			    frame->any.type, type);
 }
 
-static bool
-intel_hdmi_compute_avi_infoframe(struct intel_encoder *encoder,
-				 struct intel_crtc_state *crtc_state,
-				 struct drm_connector_state *conn_state)
+bool intel_hdmi_compute_avi_infoframe(struct intel_encoder *encoder,
+				      struct intel_crtc_state *crtc_state,
+				      struct drm_connector_state *conn_state)
 {
 	struct hdmi_avi_infoframe *frame = &crtc_state->infoframes.avi.avi;
 	const struct drm_display_mode *adjusted_mode =
@@ -757,6 +756,7 @@ intel_hdmi_compute_avi_infoframe(struct intel_encoder *encoder,
 
 	return true;
 }
+EXPORT_SYMBOL(intel_hdmi_compute_avi_infoframe);
 
 static bool
 intel_hdmi_compute_spd_infoframe(struct intel_encoder *encoder,
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.h b/drivers/gpu/drm/i915/display/intel_hdmi.h
index b43a180..6464b14 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.h
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.h
@@ -54,5 +54,8 @@ int intel_hdmi_dsc_get_num_slices(const struct intel_crtc_state *crtc_state,
 				  int src_max_slices, int src_max_slice_width,
 				  int hdmi_max_slices, int hdmi_throughput);
 int intel_hdmi_dsc_get_slice_height(int vactive);
+bool intel_hdmi_compute_avi_infoframe(struct intel_encoder *encoder,
+                                      struct intel_crtc_state *crtc_state,
+                                      struct drm_connector_state *conn_state);
 
 #endif /* __INTEL_HDMI_H__ */
-- 
2.8.1



More information about the Intel-gfx-trybot mailing list