Commit 00076671 authored by Jouni Högander's avatar Jouni Högander

drm/i915/display: Move colorimetry_support from intel_psr to intel_dp

Colorimetry support is not really a PSR specific thing. Move it to intel_dp
struct and use it also when preparing vsc sdp for non-PSR case.
Signed-off-by: default avatarJouni Högander <jouni.hogander@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Tested-by: default avatarShawn Lee <shawn.c.lee@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231220103609.1384523-3-jouni.hogander@intel.com
parent e11300a1
...@@ -1701,7 +1701,6 @@ struct intel_psr { ...@@ -1701,7 +1701,6 @@ struct intel_psr {
unsigned int busy_frontbuffer_bits; unsigned int busy_frontbuffer_bits;
bool sink_psr2_support; bool sink_psr2_support;
bool link_standby; bool link_standby;
bool colorimetry_support;
bool psr2_enabled; bool psr2_enabled;
bool psr2_sel_fetch_enabled; bool psr2_sel_fetch_enabled;
bool psr2_sel_fetch_cff_enabled; bool psr2_sel_fetch_cff_enabled;
...@@ -1832,6 +1831,8 @@ struct intel_dp { ...@@ -1832,6 +1831,8 @@ struct intel_dp {
/* When we last wrote the OUI for eDP */ /* When we last wrote the OUI for eDP */
unsigned long last_oui_write; unsigned long last_oui_write;
bool colorimetry_support;
}; };
enum lspcon_vendor { enum lspcon_vendor {
......
...@@ -2622,7 +2622,8 @@ static void intel_dp_compute_vsc_sdp(struct intel_dp *intel_dp, ...@@ -2622,7 +2622,8 @@ static void intel_dp_compute_vsc_sdp(struct intel_dp *intel_dp,
if (crtc_state->has_psr) if (crtc_state->has_psr)
return; return;
if (!intel_dp_needs_vsc_sdp(crtc_state, conn_state)) if (!intel_dp->colorimetry_support ||
!intel_dp_needs_vsc_sdp(crtc_state, conn_state))
return; return;
crtc_state->infoframes.enable |= intel_hdmi_infoframe_enable(DP_SDP_VSC); crtc_state->infoframes.enable |= intel_hdmi_infoframe_enable(DP_SDP_VSC);
...@@ -2639,7 +2640,7 @@ void intel_dp_compute_psr_vsc_sdp(struct intel_dp *intel_dp, ...@@ -2639,7 +2640,7 @@ void intel_dp_compute_psr_vsc_sdp(struct intel_dp *intel_dp,
vsc->sdp_type = DP_SDP_VSC; vsc->sdp_type = DP_SDP_VSC;
if (crtc_state->has_psr2) { if (crtc_state->has_psr2) {
if (intel_dp->psr.colorimetry_support && if (intel_dp->colorimetry_support &&
intel_dp_needs_vsc_sdp(crtc_state, conn_state)) { intel_dp_needs_vsc_sdp(crtc_state, conn_state)) {
/* [PSR2, +Colorimetry] */ /* [PSR2, +Colorimetry] */
intel_dp_compute_vsc_colorimetry(crtc_state, conn_state, intel_dp_compute_vsc_colorimetry(crtc_state, conn_state,
...@@ -2654,7 +2655,7 @@ void intel_dp_compute_psr_vsc_sdp(struct intel_dp *intel_dp, ...@@ -2654,7 +2655,7 @@ void intel_dp_compute_psr_vsc_sdp(struct intel_dp *intel_dp,
vsc->length = 0xe; vsc->length = 0xe;
} }
} else if (crtc_state->has_panel_replay) { } else if (crtc_state->has_panel_replay) {
if (intel_dp->psr.colorimetry_support && if (intel_dp->colorimetry_support &&
intel_dp_needs_vsc_sdp(crtc_state, conn_state)) { intel_dp_needs_vsc_sdp(crtc_state, conn_state)) {
/* [Panel Replay with colorimetry info] */ /* [Panel Replay with colorimetry info] */
intel_dp_compute_vsc_colorimetry(crtc_state, conn_state, intel_dp_compute_vsc_colorimetry(crtc_state, conn_state,
...@@ -6536,6 +6537,9 @@ intel_dp_init_connector(struct intel_digital_port *dig_port, ...@@ -6536,6 +6537,9 @@ intel_dp_init_connector(struct intel_digital_port *dig_port,
"HDCP init failed, skipping.\n"); "HDCP init failed, skipping.\n");
} }
intel_dp->colorimetry_support =
intel_dp_get_colorimetry_status(intel_dp);
intel_dp->frl.is_trained = false; intel_dp->frl.is_trained = false;
intel_dp->frl.trained_rate_gbps = 0; intel_dp->frl.trained_rate_gbps = 0;
......
...@@ -560,11 +560,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) ...@@ -560,11 +560,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp)
if (intel_dp->psr_dpcd[0]) if (intel_dp->psr_dpcd[0])
_psr_init_dpcd(intel_dp); _psr_init_dpcd(intel_dp);
if (intel_dp->psr.sink_psr2_support) { if (intel_dp->psr.sink_psr2_support)
intel_dp->psr.colorimetry_support =
intel_dp_get_colorimetry_status(intel_dp);
intel_dp_get_su_granularity(intel_dp); intel_dp_get_su_granularity(intel_dp);
}
} }
static void hsw_psr_setup_aux(struct intel_dp *intel_dp) static void hsw_psr_setup_aux(struct intel_dp *intel_dp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment