mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-22 10:55:07 -04:00
drm/i915/dp: Refactor intel_dp_in_hdr_mode() for broader reuse
The intel_dp_in_hdr_mode() helper was previously defined in intel_dp_aux_backlight.c but is generally useful beyond that context. Move the function to intel_dp.c and declare it in intel_dp.h to make it accessible to other DP-related code paths that need to check HDR metadata state. This is a pure refactor with no functional change and prepares for a follow-up patch that uses this helper. Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://lore.kernel.org/r/20250730055523.2214966-2-chaitanya.kumar.borah@intel.com
This commit is contained in:
committed by
Suraj Kandpal
parent
63e0b17ae7
commit
2e9da93d60
@@ -2917,6 +2917,19 @@ static void intel_dp_compute_vsc_sdp(struct intel_dp *intel_dp,
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
intel_dp_in_hdr_mode(const struct drm_connector_state *conn_state)
|
||||
{
|
||||
struct hdr_output_metadata *hdr_metadata;
|
||||
|
||||
if (!conn_state->hdr_output_metadata)
|
||||
return false;
|
||||
|
||||
hdr_metadata = conn_state->hdr_output_metadata->data;
|
||||
|
||||
return hdr_metadata->hdmi_metadata_type1.eotf == HDMI_EOTF_SMPTE_ST2084;
|
||||
}
|
||||
|
||||
static void
|
||||
intel_dp_compute_hdr_metadata_infoframe_sdp(struct intel_dp *intel_dp,
|
||||
struct intel_crtc_state *crtc_state,
|
||||
|
||||
@@ -214,5 +214,6 @@ int intel_dp_compute_min_hblank(struct intel_crtc_state *crtc_state,
|
||||
|
||||
int intel_dp_dsc_bpp_step_x16(const struct intel_connector *connector);
|
||||
void intel_dp_dpcd_set_probe(struct intel_dp *intel_dp, bool force_on_external);
|
||||
bool intel_dp_in_hdr_mode(const struct drm_connector_state *conn_state);
|
||||
|
||||
#endif /* __INTEL_DP_H__ */
|
||||
|
||||
@@ -225,19 +225,6 @@ intel_dp_aux_hdr_set_aux_backlight(const struct drm_connector_state *conn_state,
|
||||
connector->base.base.id, connector->base.name);
|
||||
}
|
||||
|
||||
static bool
|
||||
intel_dp_in_hdr_mode(const struct drm_connector_state *conn_state)
|
||||
{
|
||||
struct hdr_output_metadata *hdr_metadata;
|
||||
|
||||
if (!conn_state->hdr_output_metadata)
|
||||
return false;
|
||||
|
||||
hdr_metadata = conn_state->hdr_output_metadata->data;
|
||||
|
||||
return hdr_metadata->hdmi_metadata_type1.eotf == HDMI_EOTF_SMPTE_ST2084;
|
||||
}
|
||||
|
||||
static void
|
||||
intel_dp_aux_hdr_set_backlight(const struct drm_connector_state *conn_state, u32 level)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user