[Intel-gfx] [PATCH v2 1/6] drm/i915: Export intel_hdmi_compute_avi_infoframe()
Nautiyal, Ankit K
ankit.k.nautiyal at intel.com
Mon Aug 16 10:48:08 UTC 2021
On 8/16/2021 12:37 PM, Jani Nikula wrote:
> 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.
Thanks Jani for the comments. Yes you are right, non-static would be
enough for making this visible in intel_dp.
I will fix this in the next version of the patch.
Regards,
Ankit
>>
>> 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__ */
More information about the Intel-gfx
mailing list