AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jasdeep Dhillon <jdhillon@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: stylon.wang@amd.com, Sunpeng.Li@amd.com, Harry.Wentland@amd.com,
	qingqing.zhuo@amd.com, Jasdeep Dhillon <jdhillon@amd.com>,
	Rodrigo.Siqueira@amd.com, roman.li@amd.com, solomon.chiu@amd.com,
	Aurabindo.Pillai@amd.com, wayne.lin@amd.com,
	Jimmy Kizito <Jimmy.Kizito@amd.com>,
	Bhawanpreet.Lakha@amd.com,
	Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>,
	agustin.gutierrez@amd.com, pavle.kotarac@amd.com
Subject: [PATCH 02/13] drm/amd/display: Fix stream->link_enc unassigned during stream removal
Date: Fri, 4 Feb 2022 23:32:59 -0500	[thread overview]
Message-ID: <20220205043310.165991-3-jdhillon@amd.com> (raw)
In-Reply-To: <20220205043310.165991-1-jdhillon@amd.com>

From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

[Why]
Found when running igt@kms_atomic.

Userspace attempts to do a TEST_COMMIT when 0 streams which calls
dc_remove_stream_from_ctx. This in turn calls link_enc_unassign
which ends up modifying stream->link = NULL directly, causing the
global link_enc to be removed preventing further link activity
and future link validation from passing.

[How]
We take care of link_enc unassignment at the start of
link_enc_cfg_link_encs_assign so this call is no longer necessary.

Fixes global state from being modified while unlocked.

Reviewed-by: Jimmy Kizito <Jimmy.Kizito@amd.com>
Acked-by: Jasdeep Dhillon <jdhillon@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index e82aa0559bdf..9df66501a453 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -1965,10 +1965,6 @@ enum dc_status dc_remove_stream_from_ctx(
 				dc->res_pool,
 			del_pipe->stream_res.stream_enc,
 			false);
-	/* Release link encoder from stream in new dc_state. */
-	if (dc->res_pool->funcs->link_enc_unassign)
-		dc->res_pool->funcs->link_enc_unassign(new_ctx, del_pipe->stream);
-
 	if (is_dp_128b_132b_signal(del_pipe)) {
 		update_hpo_dp_stream_engine_usage(
 			&new_ctx->res_ctx, dc->res_pool,
-- 
2.25.1


  parent reply	other threads:[~2022-02-05  4:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-05  4:32 [PATCH 00/13] DC Patchset, Feb 7 2022 v3 Jasdeep Dhillon
2022-02-05  4:32 ` [PATCH 01/13] drm/amd/display: Fix for variable may be used uninitialized error Jasdeep Dhillon
2022-02-05  4:32 ` Jasdeep Dhillon [this message]
2022-02-05  4:33 ` [PATCH 03/13] drm/amd/display: limit unbounded requesting to 5k Jasdeep Dhillon
2022-02-05  4:33 ` [PATCH 04/13] drm/amd/display: remove static from optc31_set_drr Jasdeep Dhillon
2022-02-05  4:33 ` [PATCH 05/13] dc: do blocked MST topology discovery at resume from S3/S4 Jasdeep Dhillon
2022-02-05  4:33 ` [PATCH 06/13] drm/amd/display: fix yellow carp wm clamping Jasdeep Dhillon
2022-02-05  4:33 ` [PATCH 07/13] drm/amd/display: change fastboot timing validation Jasdeep Dhillon
2022-02-05  4:33 ` [PATCH 08/13] drm/amd/display: keep eDP Vdd on when eDP stream is already enabled Jasdeep Dhillon
2022-02-05  4:33 ` [PATCH 09/13] drm/amd/display: Fix DP LT sequence on EQ fail Jasdeep Dhillon
2022-02-05  4:33 ` [PATCH 10/13] drm/amd/display: [FW Promotion] Release 0.0.103.0 Jasdeep Dhillon
2022-02-05  4:33 ` [PATCH 11/13] drm/amd/display: 3.2.172 Jasdeep Dhillon
2022-02-05  4:33 ` [PATCH 12/13] drm/amd/display: handle null link encoder Jasdeep Dhillon
2022-02-05  4:33 ` [PATCH 13/13] drm/amd/display: Basic support with device ID Jasdeep Dhillon
2022-02-07 15:58   ` Alex Deucher
2022-02-07 16:24     ` Dhillon, Jasdeep
  -- strict thread matches above, loose matches on Subject: below --
2022-02-04 19:03 [PATCH 00/13] DC Patches Feburary 7, 2022 Jasdeep Dhillon
2022-02-04 19:03 ` [PATCH 02/13] drm/amd/display: Fix stream->link_enc unassigned during stream removal Jasdeep Dhillon
2022-02-04 18:43 [PATCH 00/13] DC Patches Feb 7, 2022 Jasdeep Dhillon
2022-02-04 18:43 ` [PATCH 02/13] drm/amd/display: Fix stream->link_enc unassigned during stream removal Jasdeep Dhillon

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=20220205043310.165991-3-jdhillon@amd.com \
    --to=jdhillon@amd.com \
    --cc=Aurabindo.Pillai@amd.com \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Jimmy.Kizito@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=agustin.gutierrez@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=pavle.kotarac@amd.com \
    --cc=qingqing.zhuo@amd.com \
    --cc=roman.li@amd.com \
    --cc=solomon.chiu@amd.com \
    --cc=stylon.wang@amd.com \
    --cc=wayne.lin@amd.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