From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C20C6C61CE7 for ; Wed, 11 Jun 2025 13:06:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 75B1310E65C; Wed, 11 Jun 2025 13:06:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="lin4t3r3"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7BB3710E65C; Wed, 11 Jun 2025 13:06:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1749647184; x=1781183184; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=+3SsH5RlAXxF2ByurNd2y6VfoEUbQMA/ii+Zwls1D8g=; b=lin4t3r3YTiOaNTHPqdA8Hyl4IrVWlf+O+SbDuP87pDAbABMDyOsfWR9 yeZpQFsQNoTqm6jsmpqaE0gxcO44WZj0977i0lIJ+GUqKerh7ovrCUsBu WRBVNHaeXepwK4tJ0S0oKrv4SrEvE1UNwHShLtVJZ+mfGseHI2UIWO9YZ 7UDutjGaxNgQeXOZr3TTl8kMVN73kPtBoC9lN/eJM9Srvqy1y7YoW8awi MAeXiGCXddJSCufwzwFeyemONWhAl8YkS6Qz8Zm9UkUJhN4z0QFFVkgYB pvOjjZ2uQfVC40XO/VfJM2ySaB1jH5biWKJ5gRmkNWkHqS5Odb4r3UzTj Q==; X-CSE-ConnectionGUID: YOTxJw6ER5q/DwJUSL2KgQ== X-CSE-MsgGUID: WXMRl4s7Qr+Z79ScsSG39g== X-IronPort-AV: E=McAfee;i="6800,10657,11461"; a="51653456" X-IronPort-AV: E=Sophos;i="6.16,227,1744095600"; d="scan'208";a="51653456" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2025 06:06:17 -0700 X-CSE-ConnectionGUID: bn+mofJ6REmpWpuKG8Swfg== X-CSE-MsgGUID: eL25yZGJTRGd1pq2ArQhPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,227,1744095600"; d="scan'208";a="151978345" Received: from mjarzebo-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.246.209]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2025 06:06:14 -0700 From: Jani Nikula To: "Kahola, Mika" , "Deak, Imre" , "intel-gfx@lists.freedesktop.org" , "intel-xe@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" Cc: Ville =?utf-8?B?U3lyasOkbMOk?= Subject: RE: [PATCH v4 5/5] drm/i915/dp: Disable the AUX DPCD probe quirk if it's not required In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20250605082850.65136-6-imre.deak@intel.com> <20250609125556.109538-2-imre.deak@intel.com> Date: Wed, 11 Jun 2025 16:06:11 +0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Tue, 10 Jun 2025, "Kahola, Mika" wrote: >> -----Original Message----- >> From: Intel-gfx On Behalf Of I= mre Deak >> Sent: Monday, 9 June 2025 15.56 >> To: intel-gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org; dri= -devel@lists.freedesktop.org >> Cc: Ville Syrj=C3=A4l=C3=A4 ; Jani Nikula= >> Subject: [PATCH v4 5/5] drm/i915/dp: Disable the AUX DPCD probe quirk if= it's not required >>=20 >> Reading DPCD registers has side-effects and some of these can cause a pr= oblem for instance during link training. Based on this it's >> better to avoid the probing quirk done before each DPCD register read, l= imiting this to the monitor which requires it. The only >> known problematic monitor is an external SST sink, so keep the quirk dis= abled always for eDP and MST sinks. Reenable the quirk >> after a hotplug event and after resuming from a power state without hotp= lug support, until the subsequent EDID based detection. >>=20 >> v2: Add a helper for determining the need/setting the probing. (Jani) >>=20 >> Cc: Ville Syrj=C3=A4l=C3=A4 >> Cc: Jani Nikula > > Jani has already reviewed most of the patch and now that this check for d= pcd probe requirement is in place, the patch looks ok to me. > > Reviewed-by: Mika Kahola Acked-by: Jani Nikula > >> Signed-off-by: Imre Deak >> --- >> drivers/gpu/drm/i915/display/intel_dp.c | 31 ++++++++++++++++++-- >> drivers/gpu/drm/i915/display/intel_dp.h | 1 + >> drivers/gpu/drm/i915/display/intel_dp_aux.c | 2 ++ drivers/gpu/drm/i= 915/display/intel_hotplug.c | 6 ++++ >> 4 files changed, 38 insertions(+), 2 deletions(-) >>=20 >> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i= 915/display/intel_dp.c >> index 208a953b04a2f..c089036a745fd 100644 >> --- a/drivers/gpu/drm/i915/display/intel_dp.c >> +++ b/drivers/gpu/drm/i915/display/intel_dp.c >> @@ -5791,6 +5791,28 @@ intel_dp_detect_sdp_caps(struct intel_dp *intel_d= p) >> drm_dp_as_sdp_supported(&intel_dp->aux, intel_dp->dpcd); } >>=20 >> +static bool intel_dp_needs_dpcd_probe(struct intel_dp *intel_dp, bool >> +force_on_external) { >> + struct intel_connector *connector =3D intel_dp->attached_connector; >> + >> + if (intel_dp_is_edp(intel_dp)) >> + return false; >> + >> + if (force_on_external) >> + return true; >> + >> + if (intel_dp->is_mst) >> + return false; >> + >> + return drm_edid_has_quirk(&connector->base, >> +DRM_EDID_QUIRK_DP_DPCD_PROBE); } >> + >> +void intel_dp_dpcd_set_probe(struct intel_dp *intel_dp, bool >> +force_on_external) { >> + drm_dp_dpcd_set_probe(&intel_dp->aux, >> + intel_dp_needs_dpcd_probe(intel_dp, force_on_external)); } >> + >> static int >> intel_dp_detect(struct drm_connector *_connector, >> struct drm_modeset_acquire_ctx *ctx, >> @@ -5919,6 +5941,8 @@ intel_dp_detect(struct drm_connector *_connector, >> if (status !=3D connector_status_connected && !intel_dp->is_mst) >> intel_dp_unset_edid(intel_dp); >>=20 >> + intel_dp_dpcd_set_probe(intel_dp, false); >> + >> if (!intel_dp_is_edp(intel_dp)) >> drm_dp_set_subconnector_property(&connector->base, >> status, >> @@ -5949,6 +5973,8 @@ intel_dp_force(struct drm_connector *_connector) >> return; >>=20 >> intel_dp_set_edid(intel_dp); >> + >> + intel_dp_dpcd_set_probe(intel_dp, false); >> } >>=20 >> static int intel_dp_get_modes(struct drm_connector *_connector) @@ -632= 1,10 +6347,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) { >> + intel_dp_dpcd_set_probe(intel_dp, true); >> + >> intel_dp_read_dprx_caps(intel_dp, dpcd); >>=20 >> - if (long_hpd) { >> intel_dp->reset_link_params =3D true; >> intel_dp_invalidate_source_oui(intel_dp); >>=20 >> diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i= 915/display/intel_dp.h >> index eff3414c05dbf..0657f56811966 100644 >> --- a/drivers/gpu/drm/i915/display/intel_dp.h >> +++ b/drivers/gpu/drm/i915/display/intel_dp.h >> @@ -213,5 +213,6 @@ int intel_dp_compute_min_hblank(struct intel_crtc_st= ate *crtc_state, >> const struct drm_connector_state *conn_state); >>=20 >> int intel_dp_dsc_bpp_step_x16(const struct intel_connector *connector); >> +void intel_dp_dpcd_set_probe(struct intel_dp *intel_dp, bool >> +force_on_external); >>=20 >> #endif /* __INTEL_DP_H__ */ >> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux.c b/drivers/gpu/d= rm/i915/display/intel_dp_aux.c >> index bf8e8e0cc19c9..7bec964c0496f 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) >>=20 >> intel_dp->aux.transfer =3D intel_dp_aux_transfer; >> cpu_latency_qos_add_request(&intel_dp->pm_qos, PM_QOS_DEFAULT_VALUE); >> + >> + intel_dp_dpcd_set_probe(intel_dp, true); >> } >>=20 >> 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..901fda434af12 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,14 @@ void intel_hpd_poll_enable(struct intel_display *di= splay) >> */ >> void intel_hpd_poll_disable(struct intel_display *display) { >> + struct intel_encoder *encoder; >> + >> if (!HAS_DISPLAY(display)) >> return; >>=20 >> + for_each_intel_dp(display->drm, encoder) >> + intel_dp_dpcd_set_probe(enc_to_intel_dp(encoder), true); >> + >> WRITE_ONCE(display->hotplug.poll_enabled, false); >>=20 >> spin_lock_irq(&display->irq.lock); >> -- >> 2.44.2 > --=20 Jani Nikula, Intel