From: Jani Nikula <jani.nikula@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: Re: [PATCH 4/4] drm/i915/dp: Disable the AUX DPCD probe quirk if it's not required
Date: Wed, 04 Jun 2025 13:13:44 +0300 [thread overview]
Message-ID: <ffe402bd1afd50b2e3d7ebf72c26de149e6b2258@intel.com> (raw)
In-Reply-To: <20250603121543.17842-5-imre.deak@intel.com>
On Tue, 03 Jun 2025, Imre Deak <imre.deak@intel.com> wrote:
> Reading DPCD registers has side-effects and some of these can cause a
> problem for instance during link training. Based on this it's better to
> avoid the probing quirk done before each DPCD register read, limiting
> this to the monitor which requires it. The only known problematic
> monitor is an external SST sink, so keep the quirk disabled always for
> eDP and MST sinks. Reenable the quirk after a hotplug event and after
> resuming from a power state without hotplug support, until the
> subsequent EDID based detection.
It's a bummer we have to do this in so many places. :(
>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 11 +++++++++--
> drivers/gpu/drm/i915/display/intel_dp_aux.c | 2 ++
> drivers/gpu/drm/i915/display/intel_hotplug.c | 10 ++++++++++
> 3 files changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 208a953b04a2f..d65a18fc1aeb9 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -5747,6 +5747,11 @@ intel_dp_set_edid(struct intel_dp *intel_dp)
> /* Below we depend on display info having been updated */
> drm_edid_connector_update(&connector->base, drm_edid);
>
> + if (!intel_dp_is_edp(intel_dp))
> + drm_dp_dpcd_set_probe_quirk(&intel_dp->aux,
> + drm_edid_has_quirk(&connector->base,
> + DRM_EDID_QUIRK_DP_DPCD_PROBE));
> +
> vrr_capable = intel_vrr_is_capable(connector);
> drm_dbg_kms(display->drm, "[CONNECTOR:%d:%s] VRR capable: %s\n",
> connector->base.base.id, connector->base.name, str_yes_no(vrr_capable));
> @@ -5881,6 +5886,7 @@ intel_dp_detect(struct drm_connector *_connector,
> intel_dp_print_rates(intel_dp);
>
> if (intel_dp->is_mst) {
> + drm_dp_dpcd_set_probe_quirk(&intel_dp->aux, false);
> /*
> * If we are in MST mode then this connector
> * won't appear connected or have anything
> @@ -6321,10 +6327,11 @@ intel_dp_hpd_pulse(struct intel_digital_port *dig_port, bool long_hpd)
> * complete the DP tunnel BW request for the latter connector/encoder
> * waiting for this encoder's DPRX read, perform a dummy read here.
> */
> - if (long_hpd)
> + if (long_hpd) {
> + drm_dp_dpcd_set_probe_quirk(&intel_dp->aux, true);
> +
> intel_dp_read_dprx_caps(intel_dp, dpcd);
>
> - if (long_hpd) {
> intel_dp->reset_link_params = true;
> intel_dp_invalidate_source_oui(intel_dp);
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux.c b/drivers/gpu/drm/i915/display/intel_dp_aux.c
> index bf8e8e0cc19c9..410252ba6fd16 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux.c
> @@ -835,6 +835,8 @@ void intel_dp_aux_init(struct intel_dp *intel_dp)
>
> intel_dp->aux.transfer = intel_dp_aux_transfer;
> cpu_latency_qos_add_request(&intel_dp->pm_qos, PM_QOS_DEFAULT_VALUE);
> +
> + drm_dp_dpcd_set_probe_quirk(&intel_dp->aux, !intel_dp_is_edp(intel_dp));
> }
>
> static enum aux_ch default_aux_ch(struct intel_encoder *encoder)
> diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c
> index 74fe398663d63..1093c6c3714c0 100644
> --- a/drivers/gpu/drm/i915/display/intel_hotplug.c
> +++ b/drivers/gpu/drm/i915/display/intel_hotplug.c
> @@ -33,6 +33,7 @@
> #include "intel_display_core.h"
> #include "intel_display_rpm.h"
> #include "intel_display_types.h"
> +#include "intel_dp.h"
> #include "intel_hdcp.h"
> #include "intel_hotplug.h"
> #include "intel_hotplug_irq.h"
> @@ -906,9 +907,18 @@ void intel_hpd_poll_enable(struct intel_display *display)
> */
> void intel_hpd_poll_disable(struct intel_display *display)
> {
> + struct intel_encoder *encoder;
> +
> if (!HAS_DISPLAY(display))
> return;
>
> + for_each_intel_dp(display->drm, encoder) {
> + struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
> +
> + if (!intel_dp_is_edp(intel_dp))
> + drm_dp_dpcd_set_probe_quirk(&intel_dp->aux, true);
> + }
> +
> WRITE_ONCE(display->hotplug.poll_enabled, false);
>
> spin_lock_irq(&display->irq.lock);
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-06-04 10:13 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 12:15 [PATCH 0/4] drm/dp: Limit the DPCD probe quirk to the affected monitor Imre Deak
2025-06-03 12:15 ` [PATCH 1/4] drm/dp: Change AUX DPCD probe address from DPCD_REV to LANE0_1_STATUS Imre Deak
2025-06-04 9:53 ` Jani Nikula
2025-06-03 12:15 ` [PATCH 2/4] drm/edid: Add support for quirks visible to DRM core and drivers Imre Deak
2025-06-04 9:13 ` [PATCH v2 " Imre Deak
2025-06-04 10:02 ` Jani Nikula
2025-06-04 16:27 ` Imre Deak
2025-06-03 12:15 ` [PATCH 3/4] drm/dp: Add an EDID quirk for the DPCD register access probe Imre Deak
2025-06-03 15:36 ` [PATCH v2 " Imre Deak
2025-06-04 10:11 ` Jani Nikula
2025-06-04 16:34 ` Imre Deak
2025-06-03 12:15 ` [PATCH 4/4] drm/i915/dp: Disable the AUX DPCD probe quirk if it's not required Imre Deak
2025-06-04 10:13 ` Jani Nikula [this message]
2025-06-03 12:44 ` ✓ CI.Patch_applied: success for drm/dp: Limit the DPCD probe quirk to the affected monitor Patchwork
2025-06-03 12:44 ` ✗ CI.checkpatch: warning " Patchwork
2025-06-03 12:45 ` ✓ CI.KUnit: success " Patchwork
2025-06-03 12:56 ` ✓ CI.Build: " Patchwork
2025-06-03 12:58 ` ✓ CI.Hooks: " Patchwork
2025-06-03 13:00 ` ✗ CI.checksparse: warning " Patchwork
2025-06-03 13:48 ` ✓ Xe.CI.BAT: success " Patchwork
2025-06-03 15:42 ` ✓ CI.Patch_applied: success for drm/dp: Limit the DPCD probe quirk to the affected monitor (rev2) Patchwork
2025-06-03 15:42 ` ✗ CI.checkpatch: warning " Patchwork
2025-06-03 15:43 ` ✗ CI.KUnit: failure " Patchwork
2025-06-04 10:13 ` ✓ CI.Patch_applied: success for drm/dp: Limit the DPCD probe quirk to the affected monitor (rev3) Patchwork
2025-06-04 10:13 ` ✗ CI.checkpatch: warning " Patchwork
2025-06-04 10:14 ` ✓ CI.KUnit: success " Patchwork
2025-06-04 10:33 ` ✓ CI.Hooks: " Patchwork
2025-06-04 10:33 ` ✗ CI.checksparse: warning " Patchwork
2025-06-04 11:21 ` ✓ Xe.CI.BAT: success " Patchwork
2025-06-04 13:58 ` ✗ Xe.CI.Full: failure for drm/dp: Limit the DPCD probe quirk to the affected monitor Patchwork
2025-06-05 3:45 ` ✗ Xe.CI.Full: failure for drm/dp: Limit the DPCD probe quirk to the affected monitor (rev3) Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ffe402bd1afd50b2e3d7ebf72c26de149e6b2258@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox