Skip to content

Commit fb68790

Browse files
committed
drm/i915/dp: Suspend/resume DP tunnels
Suspend and resume DP tunnels during system suspend/resume, disabling the BW allocation mode during suspend, re-enabling it after resume. This reflects the link's BW management component (Thunderbolt CM) disabling BWA during suspend. Before any BW requests the driver must read the sink's DPRX capabilities (since the BW manager requires this information, so snoops for it on AUX), so ensure this read takes place. Reviewed-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240220211841.448846-20-imre.deak@intel.com
1 parent 7605d0e commit fb68790

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <asm/byteorder.h>
3737

3838
#include <drm/display/drm_dp_helper.h>
39+
#include <drm/display/drm_dp_tunnel.h>
3940
#include <drm/display/drm_dsc_helper.h>
4041
#include <drm/display/drm_hdmi_helper.h>
4142
#include <drm/drm_atomic_helper.h>
@@ -3313,18 +3314,21 @@ void intel_dp_sync_state(struct intel_encoder *encoder,
33133314
const struct intel_crtc_state *crtc_state)
33143315
{
33153316
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
3316-
3317-
if (!crtc_state)
3318-
return;
3317+
bool dpcd_updated = false;
33193318

33203319
/*
33213320
* Don't clobber DPCD if it's been already read out during output
33223321
* setup (eDP) or detect.
33233322
*/
3324-
if (intel_dp->dpcd[DP_DPCD_REV] == 0)
3323+
if (crtc_state && intel_dp->dpcd[DP_DPCD_REV] == 0) {
33253324
intel_dp_get_dpcd(intel_dp);
3325+
dpcd_updated = true;
3326+
}
33263327

3327-
intel_dp_reset_max_link_params(intel_dp);
3328+
intel_dp_tunnel_resume(intel_dp, crtc_state, dpcd_updated);
3329+
3330+
if (crtc_state)
3331+
intel_dp_reset_max_link_params(intel_dp);
33283332
}
33293333

33303334
bool intel_dp_initial_fastset_check(struct intel_encoder *encoder,
@@ -5950,6 +5954,8 @@ void intel_dp_encoder_suspend(struct intel_encoder *intel_encoder)
59505954
struct intel_dp *intel_dp = enc_to_intel_dp(intel_encoder);
59515955

59525956
intel_pps_vdd_off_sync(intel_dp);
5957+
5958+
intel_dp_tunnel_suspend(intel_dp);
59535959
}
59545960

59555961
void intel_dp_encoder_shutdown(struct intel_encoder *intel_encoder)

0 commit comments

Comments
 (0)