mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 20:01:35 +07:00
drm/i915/dp: Add compute routine for DP HDR Metadata Infoframe SDP
It stores computed dp hdr metadata infoframe sdp to infoframes.drm of crtc state. It referenced intel_hdmi_compute_drm_infoframe(). While computing, we'll also fill out the infoframes.enable bitmask appropriately. v2: Wrap a long line. v4: Use struct drm_device logging macros v5: Fix typo [Uma] Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200211074657.231405-4-gwan-gyeong.mun@intel.com
This commit is contained in:
parent
9799c4c3b7
commit
d1eed96dcb
@ -2494,6 +2494,29 @@ static void intel_dp_compute_vsc_sdp(struct intel_dp *intel_dp,
|
||||
&crtc_state->infoframes.vsc);
|
||||
}
|
||||
|
||||
static void
|
||||
intel_dp_compute_hdr_metadata_infoframe_sdp(struct intel_dp *intel_dp,
|
||||
struct intel_crtc_state *crtc_state,
|
||||
const struct drm_connector_state *conn_state)
|
||||
{
|
||||
int ret;
|
||||
struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
|
||||
struct hdmi_drm_infoframe *drm_infoframe = &crtc_state->infoframes.drm.drm;
|
||||
|
||||
if (!conn_state->hdr_output_metadata)
|
||||
return;
|
||||
|
||||
ret = drm_hdmi_infoframe_set_hdr_metadata(drm_infoframe, conn_state);
|
||||
|
||||
if (ret) {
|
||||
drm_dbg_kms(&dev_priv->drm, "couldn't set HDR metadata in infoframe\n");
|
||||
return;
|
||||
}
|
||||
|
||||
crtc_state->infoframes.enable |=
|
||||
intel_hdmi_infoframe_enable(HDMI_PACKET_TYPE_GAMUT_METADATA);
|
||||
}
|
||||
|
||||
int
|
||||
intel_dp_compute_config(struct intel_encoder *encoder,
|
||||
struct intel_crtc_state *pipe_config,
|
||||
@ -2600,6 +2623,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
|
||||
|
||||
intel_psr_compute_config(intel_dp, pipe_config);
|
||||
intel_dp_compute_vsc_sdp(intel_dp, pipe_config, conn_state);
|
||||
intel_dp_compute_hdr_metadata_infoframe_sdp(intel_dp, pipe_config, conn_state);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user