Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Wayne Lin <Wayne.Lin@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>
Cc: <lyude@redhat.com>, <jani.nikula@intel.com>,
	<imre.deak@intel.com>, <daniel@ffwll.ch>,
	<Harry.Wentland@amd.com>, <jerry.zuo@amd.com>,
	Wayne Lin <Wayne.Lin@amd.com>, Harry Wentland <hwentlan@amd.com>,
	<stable@vger.kernel.org>
Subject: [PATCH 1/3] drm/dp_mst: Fix all mstb marked as not probed after suspend/resume
Date: Wed, 26 Jun 2024 16:48:23 +0800	[thread overview]
Message-ID: <20240626084825.878565-2-Wayne.Lin@amd.com> (raw)
In-Reply-To: <20240626084825.878565-1-Wayne.Lin@amd.com>

[Why]
After supend/resume, with topology unchanged, observe that
link_address_sent of all mstb are marked as false even the topology probing
is done without any error.

It is caused by wrongly also include "ret == 0" case as a probing failure
case.

[How]
Remove inappropriate checking conditions.

Cc: Lyude Paul <lyude@redhat.com>
Cc: Harry Wentland <hwentlan@amd.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: stable@vger.kernel.org
Fixes: 37dfdc55ffeb ("drm/dp_mst: Cleanup drm_dp_send_link_address() a bit")
Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
---
 drivers/gpu/drm/display/drm_dp_mst_topology.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
index 7f8e1cfbe19d..68831f4e502a 100644
--- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
@@ -2929,7 +2929,7 @@ static int drm_dp_send_link_address(struct drm_dp_mst_topology_mgr *mgr,
 
 	/* FIXME: Actually do some real error handling here */
 	ret = drm_dp_mst_wait_tx_reply(mstb, txmsg);
-	if (ret <= 0) {
+	if (ret < 0) {
 		drm_err(mgr->dev, "Sending link address failed with %d\n", ret);
 		goto out;
 	}
@@ -2981,7 +2981,7 @@ static int drm_dp_send_link_address(struct drm_dp_mst_topology_mgr *mgr,
 	mutex_unlock(&mgr->lock);
 
 out:
-	if (ret <= 0)
+	if (ret < 0)
 		mstb->link_address_sent = false;
 	kfree(txmsg);
 	return ret < 0 ? ret : changed;
-- 
2.37.3


       reply	other threads:[~2024-06-26  8:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240626084825.878565-1-Wayne.Lin@amd.com>
2024-06-26  8:48 ` Wayne Lin [this message]
2024-06-26 16:22   ` [PATCH 1/3] drm/dp_mst: Fix all mstb marked as not probed after suspend/resume Lyude Paul
2024-06-26  8:48 ` [PATCH 2/3] drm/dp_mst: Skip CSN if topology probing is not done yet Wayne Lin
2024-06-26 16:20   ` Lyude Paul
2024-06-27  9:04     ` Lin, Wayne
2024-06-28 17:40       ` Lyude Paul
2024-07-03  8:13         ` Lin, Wayne
2024-07-03 13:51           ` Lyude Paul

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=20240626084825.878565-2-Wayne.Lin@amd.com \
    --to=wayne.lin@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hwentlan@amd.com \
    --cc=imre.deak@intel.com \
    --cc=jani.nikula@intel.com \
    --cc=jerry.zuo@amd.com \
    --cc=lyude@redhat.com \
    --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