mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 05:52:38 -04:00
drm/i915/dp: Use check link state work in the detect handler
Simplify things by retraining a DP link if a bad link is detected in the
connector detect handler from the encoder's check link state work,
similarly to how this is done after a modeset link training failure.
v2: Add TODO: comment to remove the detect-time link state check.
(Ville)
Cc: Ville Syrjälä <ville.syrjala@linux.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/20240610164933.2947366-13-imre.deak@intel.com
This commit is contained in:
@@ -5169,8 +5169,8 @@ static bool intel_dp_is_connected(struct intel_dp *intel_dp)
|
||||
intel_dp->is_mst;
|
||||
}
|
||||
|
||||
int intel_dp_retrain_link(struct intel_encoder *encoder,
|
||||
struct drm_modeset_acquire_ctx *ctx)
|
||||
static int intel_dp_retrain_link(struct intel_encoder *encoder,
|
||||
struct drm_modeset_acquire_ctx *ctx)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
|
||||
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
|
||||
@@ -5904,12 +5904,13 @@ intel_dp_detect(struct drm_connector *connector,
|
||||
/*
|
||||
* Some external monitors do not signal loss of link synchronization
|
||||
* with an IRQ_HPD, so force a link status check.
|
||||
*
|
||||
* TODO: this probably became redundant, so remove it: the link state
|
||||
* is rechecked/recovered now after modesets, where the loss of
|
||||
* synchronization tends to occur.
|
||||
*/
|
||||
if (!intel_dp_is_edp(intel_dp)) {
|
||||
ret = intel_dp_retrain_link(encoder, ctx);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
if (!intel_dp_is_edp(intel_dp))
|
||||
intel_dp_check_link_state(intel_dp);
|
||||
|
||||
/*
|
||||
* Clearing NACK and defer counts to get their exact values
|
||||
|
||||
@@ -57,8 +57,6 @@ void intel_dp_set_link_params(struct intel_dp *intel_dp,
|
||||
int intel_dp_get_active_pipes(struct intel_dp *intel_dp,
|
||||
struct drm_modeset_acquire_ctx *ctx,
|
||||
u8 *pipe_mask);
|
||||
int intel_dp_retrain_link(struct intel_encoder *encoder,
|
||||
struct drm_modeset_acquire_ctx *ctx);
|
||||
void intel_dp_link_check(struct intel_encoder *encoder);
|
||||
void intel_dp_check_link_state(struct intel_dp *intel_dp);
|
||||
void intel_dp_set_power(struct intel_dp *intel_dp, u8 mode);
|
||||
|
||||
Reference in New Issue
Block a user