mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
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: Jouni Högander <jouni.hogander@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Tested-by: Shawn Lee <shawn.c.lee@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231220103609.1384523-3-jouni.hogander@intel.com
This commit is contained in:
@@ -1701,7 +1701,6 @@ struct intel_psr {
|
||||
unsigned int busy_frontbuffer_bits;
|
||||
bool sink_psr2_support;
|
||||
bool link_standby;
|
||||
bool colorimetry_support;
|
||||
bool psr2_enabled;
|
||||
bool psr2_sel_fetch_enabled;
|
||||
bool psr2_sel_fetch_cff_enabled;
|
||||
@@ -1832,6 +1831,8 @@ struct intel_dp {
|
||||
|
||||
/* When we last wrote the OUI for eDP */
|
||||
unsigned long last_oui_write;
|
||||
|
||||
bool colorimetry_support;
|
||||
};
|
||||
|
||||
enum lspcon_vendor {
|
||||
|
||||
@@ -2622,7 +2622,8 @@ static void intel_dp_compute_vsc_sdp(struct intel_dp *intel_dp,
|
||||
if (crtc_state->has_psr)
|
||||
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;
|
||||
|
||||
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,
|
||||
vsc->sdp_type = DP_SDP_VSC;
|
||||
|
||||
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)) {
|
||||
/* [PSR2, +Colorimetry] */
|
||||
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,
|
||||
vsc->length = 0xe;
|
||||
}
|
||||
} 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)) {
|
||||
/* [Panel Replay with colorimetry info] */
|
||||
intel_dp_compute_vsc_colorimetry(crtc_state, conn_state,
|
||||
@@ -6536,6 +6537,9 @@ intel_dp_init_connector(struct intel_digital_port *dig_port,
|
||||
"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.trained_rate_gbps = 0;
|
||||
|
||||
|
||||
@@ -560,11 +560,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp)
|
||||
if (intel_dp->psr_dpcd[0])
|
||||
_psr_init_dpcd(intel_dp);
|
||||
|
||||
if (intel_dp->psr.sink_psr2_support) {
|
||||
intel_dp->psr.colorimetry_support =
|
||||
intel_dp_get_colorimetry_status(intel_dp);
|
||||
if (intel_dp->psr.sink_psr2_support)
|
||||
intel_dp_get_su_granularity(intel_dp);
|
||||
}
|
||||
}
|
||||
|
||||
static void hsw_psr_setup_aux(struct intel_dp *intel_dp)
|
||||
|
||||
Reference in New Issue
Block a user