[Intel-gfx] [PATCH v2 1/6] drm/i915: Export intel_hdmi_compute_avi_infoframe()

Jani Nikula jani.nikula at linux.intel.com
Mon Aug 16 07:07:05 UTC 2021


On Fri, 13 Aug 2021, Ankit Nautiyal <ankit.k.nautiyal at intel.com> wrote:
> 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 b04685bb6439..0fbcdddb7ad5 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -702,10 +702,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 =
> @@ -758,6 +757,7 @@ intel_hdmi_compute_avi_infoframe(struct intel_encoder *encoder,
>  
>  	return true;
>  }
> +EXPORT_SYMBOL(intel_hdmi_compute_avi_infoframe);

This makes the function visible from other kernel modules; I don't think
you need or want that. Non-static is probably enough.

BR,
Jani.

>  
>  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 b43a180d007e..2bdfd0838753 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__ */

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list