public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Lyude Paul <lyude@redhat.com>, Dave Airlie <airlied@redhat.com>,
	Sasha Levin <sashal@kernel.org>,
	kherbst@redhat.com, dakr@redhat.com, airlied@gmail.com,
	daniel@ffwll.ch, dri-devel@lists.freedesktop.org,
	nouveau@lists.freedesktop.org
Subject: [PATCH AUTOSEL 6.6 11/16] drm/nouveau/dp: Don't probe eDP ports twice harder
Date: Tue, 23 Apr 2024 07:01:44 -0400	[thread overview]
Message-ID: <20240423110151.1658546-11-sashal@kernel.org> (raw)
In-Reply-To: <20240423110151.1658546-1-sashal@kernel.org>

From: Lyude Paul <lyude@redhat.com>

[ Upstream commit bf52d7f9b2067f02efe7e32697479097aba4a055 ]

I didn't pay close enough attention the last time I tried to fix this
problem - while we currently do correctly take care to make sure we don't
probe a connected eDP port more then once, we don't do the same thing for
eDP ports we found to be disconnected.

So, fix this and make sure we only ever probe eDP ports once and then leave
them at that connector state forever (since without HPD, it's not going to
change on its own anyway). This should get rid of the last few GSP errors
getting spit out during runtime suspend and resume on some machines, as we
tried to reprobe eDP ports in response to ACPI hotplug probe events.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240404233736.7946-3-lyude@redhat.com
(cherry picked from commit fe6660b661c3397af0867d5d098f5b26581f1290)
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/nouveau/nouveau_dp.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c
index 6a4980b2d4d4e..bf2ae67b03d94 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dp.c
+++ b/drivers/gpu/drm/nouveau/nouveau_dp.c
@@ -108,12 +108,15 @@ nouveau_dp_detect(struct nouveau_connector *nv_connector,
 	u8 *dpcd = nv_encoder->dp.dpcd;
 	int ret = NOUVEAU_DP_NONE, hpd;
 
-	/* If we've already read the DPCD on an eDP device, we don't need to
-	 * reread it as it won't change
+	/* eDP ports don't support hotplugging - so there's no point in probing eDP ports unless we
+	 * haven't probed them once before.
 	 */
-	if (connector->connector_type == DRM_MODE_CONNECTOR_eDP &&
-	    dpcd[DP_DPCD_REV] != 0)
-		return NOUVEAU_DP_SST;
+	if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
+		if (connector->status == connector_status_connected)
+			return NOUVEAU_DP_SST;
+		else if (connector->status == connector_status_disconnected)
+			return NOUVEAU_DP_NONE;
+	}
 
 	mutex_lock(&nv_encoder->dp.hpd_irq_lock);
 	if (mstm) {
-- 
2.43.0


  parent reply	other threads:[~2024-04-23 11:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 11:01 [PATCH AUTOSEL 6.6 01/16] fs/9p: only translate RWX permissions for plain 9P2000 Sasha Levin
2024-04-23 11:01 ` [PATCH AUTOSEL 6.6 02/16] fs/9p: translate O_TRUNC into OTRUNC Sasha Levin
2024-04-23 11:01 ` [PATCH AUTOSEL 6.6 03/16] fs/9p: fix the cache always being enabled on files with qid flags Sasha Levin
2024-04-23 11:01 ` [PATCH AUTOSEL 6.6 04/16] 9p: explicitly deny setlease attempts Sasha Levin
2024-04-23 11:01 ` [PATCH AUTOSEL 6.6 05/16] powerpc/crypto/chacha-p10: Fix failure on non Power10 Sasha Levin
2024-04-23 11:01 ` [PATCH AUTOSEL 6.6 06/16] gpio: wcove: Use -ENOTSUPP consistently Sasha Levin
2024-04-23 11:01 ` [PATCH AUTOSEL 6.6 07/16] gpio: crystalcove: " Sasha Levin
2024-04-23 11:01 ` [PATCH AUTOSEL 6.6 08/16] clk: Don't hold prepare_lock when calling kref_put() Sasha Levin
2024-04-23 11:01 ` [PATCH AUTOSEL 6.6 09/16] fs/9p: drop inodes immediately on non-.L too Sasha Levin
2024-04-23 11:01 ` [PATCH AUTOSEL 6.6 10/16] gpio: lpc32xx: fix module autoloading Sasha Levin
2024-04-23 11:01 ` Sasha Levin [this message]
2024-04-23 11:01 ` [PATCH AUTOSEL 6.6 12/16] platform/x86: ISST: Add Granite Rapids-D to HPM CPU list Sasha Levin
2024-04-23 11:01 ` [PATCH AUTOSEL 6.6 13/16] platform/x86/amd/pmc: Extend Framework 13 quirk to more BIOSes Sasha Levin
2024-04-23 11:01 ` [PATCH AUTOSEL 6.6 14/16] drm/radeon: silence UBSAN warning (v3) Sasha Levin
2024-04-23 11:01 ` [PATCH AUTOSEL 6.6 15/16] net:usb:qmi_wwan: support Rolling modules Sasha Levin
2024-04-23 11:01 ` [PATCH AUTOSEL 6.6 16/16] blk-iocost: do not WARN if iocg was already offlined Sasha Levin

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=20240423110151.1658546-11-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=dakr@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kherbst@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    /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