All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Wentland <harry.wentland@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>
Cc: stable@vger.kernel.org, stanislav.lisovskiy@intel.com,
	jerry.zuo@amd.com, bskeggs@redhat.com, Wayne.Lin@amd.com,
	Harry Wentland <harry.wentland@amd.com>,
	ville.syrjala@linux.intel.com, mario.limonciello@amd.com
Subject: [PATCH 7/7] drm/amdgpu/display/mst: adjust the logic in 2nd phase of updating payload
Date: Thu, 19 Jan 2023 18:52:00 -0500	[thread overview]
Message-ID: <20230119235200.441386-8-harry.wentland@amd.com> (raw)
In-Reply-To: <20230119235200.441386-1-harry.wentland@amd.com>

From: Wayne Lin <Wayne.Lin@amd.com>

[why & how]
adjust the coding in dm_helpers_dp_mst_send_payload_allocation()
for reading easily.

Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 7aff7eb13ea2..fba6a57158cf 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -274,6 +274,7 @@ bool dm_helpers_dp_mst_send_payload_allocation(
 	struct drm_dp_mst_atomic_payload *payload;
 	enum mst_progress_status set_flag = MST_ALLOCATE_NEW_PAYLOAD;
 	enum mst_progress_status clr_flag = MST_CLEAR_ALLOCATED_PAYLOAD;
+	int ret = 0;
 
 	aconnector = (struct amdgpu_dm_connector *)stream->dm_stream_context;
 
@@ -290,7 +291,10 @@ bool dm_helpers_dp_mst_send_payload_allocation(
 		clr_flag = MST_ALLOCATE_NEW_PAYLOAD;
 	}
 
-	if (enable && drm_dp_add_payload_part2(mst_mgr, mst_state->base.state, payload)) {
+	if (enable)
+		ret = drm_dp_add_payload_part2(mst_mgr, mst_state->base.state, payload);
+
+	if (ret) {
 		amdgpu_dm_set_mst_status(&aconnector->mst_status,
 			set_flag, false);
 	} else {
-- 
2.39.0


WARNING: multiple messages have this Message-ID (diff)
From: Harry Wentland <harry.wentland@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>
Cc: <ville.syrjala@linux.intel.com>, <stanislav.lisovskiy@intel.com>,
	<bskeggs@redhat.com>, <jerry.zuo@amd.com>,
	<mario.limonciello@amd.com>, <lyude@redhat.com>,
	<stable@vger.kernel.org>, <Wayne.Lin@amd.com>,
	"Harry Wentland" <harry.wentland@amd.com>
Subject: [PATCH 7/7] drm/amdgpu/display/mst: adjust the logic in 2nd phase of updating payload
Date: Thu, 19 Jan 2023 18:52:00 -0500	[thread overview]
Message-ID: <20230119235200.441386-8-harry.wentland@amd.com> (raw)
In-Reply-To: <20230119235200.441386-1-harry.wentland@amd.com>

From: Wayne Lin <Wayne.Lin@amd.com>

[why & how]
adjust the coding in dm_helpers_dp_mst_send_payload_allocation()
for reading easily.

Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 7aff7eb13ea2..fba6a57158cf 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -274,6 +274,7 @@ bool dm_helpers_dp_mst_send_payload_allocation(
 	struct drm_dp_mst_atomic_payload *payload;
 	enum mst_progress_status set_flag = MST_ALLOCATE_NEW_PAYLOAD;
 	enum mst_progress_status clr_flag = MST_CLEAR_ALLOCATED_PAYLOAD;
+	int ret = 0;
 
 	aconnector = (struct amdgpu_dm_connector *)stream->dm_stream_context;
 
@@ -290,7 +291,10 @@ bool dm_helpers_dp_mst_send_payload_allocation(
 		clr_flag = MST_ALLOCATE_NEW_PAYLOAD;
 	}
 
-	if (enable && drm_dp_add_payload_part2(mst_mgr, mst_state->base.state, payload)) {
+	if (enable)
+		ret = drm_dp_add_payload_part2(mst_mgr, mst_state->base.state, payload);
+
+	if (ret) {
 		amdgpu_dm_set_mst_status(&aconnector->mst_status,
 			set_flag, false);
 	} else {
-- 
2.39.0


WARNING: multiple messages have this Message-ID (diff)
From: Harry Wentland <harry.wentland@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>
Cc: stable@vger.kernel.org, stanislav.lisovskiy@intel.com,
	jerry.zuo@amd.com, bskeggs@redhat.com, Wayne.Lin@amd.com,
	mario.limonciello@amd.com
Subject: [PATCH 7/7] drm/amdgpu/display/mst: adjust the logic in 2nd phase of updating payload
Date: Thu, 19 Jan 2023 18:52:00 -0500	[thread overview]
Message-ID: <20230119235200.441386-8-harry.wentland@amd.com> (raw)
In-Reply-To: <20230119235200.441386-1-harry.wentland@amd.com>

From: Wayne Lin <Wayne.Lin@amd.com>

[why & how]
adjust the coding in dm_helpers_dp_mst_send_payload_allocation()
for reading easily.

Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 7aff7eb13ea2..fba6a57158cf 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -274,6 +274,7 @@ bool dm_helpers_dp_mst_send_payload_allocation(
 	struct drm_dp_mst_atomic_payload *payload;
 	enum mst_progress_status set_flag = MST_ALLOCATE_NEW_PAYLOAD;
 	enum mst_progress_status clr_flag = MST_CLEAR_ALLOCATED_PAYLOAD;
+	int ret = 0;
 
 	aconnector = (struct amdgpu_dm_connector *)stream->dm_stream_context;
 
@@ -290,7 +291,10 @@ bool dm_helpers_dp_mst_send_payload_allocation(
 		clr_flag = MST_ALLOCATE_NEW_PAYLOAD;
 	}
 
-	if (enable && drm_dp_add_payload_part2(mst_mgr, mst_state->base.state, payload)) {
+	if (enable)
+		ret = drm_dp_add_payload_part2(mst_mgr, mst_state->base.state, payload);
+
+	if (ret) {
 		amdgpu_dm_set_mst_status(&aconnector->mst_status,
 			set_flag, false);
 	} else {
-- 
2.39.0


  parent reply	other threads:[~2023-01-19 23:52 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 23:51 [PATCH 0/7] Fix MST on amdgpu Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:51 ` Harry Wentland
2023-01-19 23:51 ` [PATCH 1/7] drm/amdgpu/display/mst: Fix mst_state->pbn_div and slot count assignments Harry Wentland
2023-01-19 23:51   ` Harry Wentland
2023-01-19 23:51   ` Harry Wentland
2023-01-19 23:51 ` [PATCH 2/7] drm/amdgpu/display/mst: limit payload to be updated one by one Harry Wentland
2023-01-19 23:51   ` Harry Wentland
2023-01-19 23:51   ` Harry Wentland
2023-01-19 23:51 ` [PATCH 3/7] drm/amdgpu/display/mst: update mst_mgr relevant variable when long HPD Harry Wentland
2023-01-19 23:51   ` Harry Wentland
2023-01-19 23:51   ` Harry Wentland
2023-01-19 23:51 ` [PATCH 4/7] drm/drm_print: correct format problem Harry Wentland
2023-01-19 23:51   ` Harry Wentland
2023-01-19 23:51   ` Harry Wentland
2023-01-19 23:54   ` kernel test robot
2023-01-19 23:51 ` [PATCH 5/7] drm/display/dp_mst: Correct the kref of port Harry Wentland
2023-01-19 23:51   ` Harry Wentland
2023-01-19 23:51   ` Harry Wentland
2023-01-19 23:51 ` [PATCH 6/7] drm/amdgpu/display/mst: adjust the naming of mst_port and port of aconnector Harry Wentland
2023-01-19 23:51   ` Harry Wentland
2023-01-19 23:51   ` Harry Wentland
2023-01-19 23:52 ` Harry Wentland [this message]
2023-01-19 23:52   ` [PATCH 7/7] drm/amdgpu/display/mst: adjust the logic in 2nd phase of updating payload Harry Wentland
2023-01-19 23:52   ` Harry Wentland
2023-01-20 23:15 ` [PATCH 0/7] Fix MST on amdgpu Lyude Paul
2023-01-20 23:15   ` Lyude Paul
2023-01-20 23:15   ` Lyude Paul
2023-01-23 17:03   ` Harry Wentland
2023-01-23 17:03     ` Harry Wentland
2023-01-23 17:03     ` Harry Wentland
2023-01-22 19:12 ` Didier 'OdyX' Raboud
2023-01-22 19:12   ` Didier 'OdyX' Raboud
2023-01-22 19:12   ` Didier 'OdyX' Raboud
2023-01-23 17:03   ` Harry Wentland
2023-01-23 17:03     ` Harry Wentland
2023-01-23 17:03     ` Harry Wentland

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=20230119235200.441386-8-harry.wentland@amd.com \
    --to=harry.wentland@amd.com \
    --cc=Wayne.Lin@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jerry.zuo@amd.com \
    --cc=mario.limonciello@amd.com \
    --cc=stable@vger.kernel.org \
    --cc=stanislav.lisovskiy@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.