drm/i915/dp: Check if guardband can accommodate sdp latencies

Check if guardband is sufficient for all DP SDP latencies.
If its not, fail .compute_config_late().

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://lore.kernel.org/r/20251017123504.2247954-4-ankit.k.nautiyal@intel.com
This commit is contained in:
Ankit Nautiyal
2025-10-17 18:05:02 +05:30
parent 52ecd48b8d
commit 69d640edc2

View File

@@ -93,6 +93,7 @@
#include "intel_psr.h"
#include "intel_quirks.h"
#include "intel_tc.h"
#include "intel_vblank.h"
#include "intel_vdsc.h"
#include "intel_vrr.h"
@@ -6992,14 +6993,35 @@ void intel_dp_mst_resume(struct intel_display *display)
}
}
static
int intel_dp_sdp_compute_config_late(struct intel_crtc_state *crtc_state)
{
struct intel_display *display = to_intel_display(crtc_state);
int guardband = intel_crtc_vblank_length(crtc_state);
int min_sdp_guardband = intel_dp_sdp_min_guardband(crtc_state, false);
if (guardband < min_sdp_guardband) {
drm_dbg_kms(display->drm, "guardband %d < min sdp guardband %d\n",
guardband, min_sdp_guardband);
return -EINVAL;
}
return 0;
}
int intel_dp_compute_config_late(struct intel_encoder *encoder,
struct intel_crtc_state *crtc_state,
struct drm_connector_state *conn_state)
{
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
int ret;
intel_psr_compute_config_late(intel_dp, crtc_state);
ret = intel_dp_sdp_compute_config_late(crtc_state);
if (ret)
return ret;
return 0;
}