From: Ryan Lin <tsung-hua.lin@amd.com>
To: unlisted-recipients:; (no To-header on input)
Cc: leon.li@amd.com, praful.swarnakar@amd.com, shirish.s@amd.com,
ching-shih.li@amd.com, "Alex Deucher" <alexander.deucher@amd.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Nicholas Kazlauskas" <nicholas.kazlauskas@amd.com>,
stable@vger.kernel.org, "Harry Wentland" <harry.wentland@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David (ChunMing) Zhou" <David1.Zhou@amd.com>,
"David Airlie" <airlied@linux.ie>,
"Bas Nieuwenhuizen" <bas@basnieuwenhuizen.nl>,
"Sean Paul" <seanpaul@chromium.org>,
"Sasha Levin" <sashal@kernel.org>,
"Mark Yacoub" <markyacoub@google.com>,
"Roman Li" <Roman.Li@amd.com>,
"Ikshwaku Chauhan" <ikshwaku.chauhan@amd.corp-partner.google.com>,
"Simon Ser" <contact@emersion.fr>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] BACKPORT: drm/amdgpu/disply: set num_crtc earlier
Date: Mon, 30 May 2022 17:29:02 +0800 [thread overview]
Message-ID: <20220530092902.810336-1-tsung-hua.lin@amd.com> (raw)
From: Alex Deucher <alexander.deucher@amd.com>
To avoid a recently added warning:
Bogus possible_crtcs: [ENCODER:65:TMDS-65] possible_crtcs=0xf (full crtc mask=0x7)
WARNING: CPU: 3 PID: 439 at drivers/gpu/drm/drm_mode_config.c:617 drm_mode_config_validate+0x178/0x200 [drm]
In this case the warning is harmless, but confusing to users.
Fixes: 0df108237433 ("drm: Validate encoder->possible_crtcs")
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=209123
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Conflicts:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
[Ryan Lin: Fixed the conflict, remove the non-main changed part
of this patch]
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index fb918b7890ac..5ef88a2d2161 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -766,9 +766,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
goto error;
}
- /* Update the actual used number of crtc */
- adev->mode_info.num_crtc = adev->dm.display_indexes_num;
-
/* TODO: Add_display_info? */
/* TODO use dynamic cursor width */
@@ -2448,6 +2445,10 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
enum dc_connection_type new_connection_type = dc_connection_none;
const struct dc_plane_cap *plane;
+ dm->display_indexes_num = dm->dc->caps.max_streams;
+ /* Update the actual used number of crtc */
+ adev->mode_info.num_crtc = adev->dm.display_indexes_num;
+
link_cnt = dm->dc->caps.max_links;
if (amdgpu_dm_mode_config_init(dm->adev)) {
DRM_ERROR("DM: Failed to initialize mode config\n");
@@ -2509,8 +2510,6 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
goto fail;
}
- dm->display_indexes_num = dm->dc->caps.max_streams;
-
/* loops over all connectors on the board */
for (i = 0; i < link_cnt; i++) {
struct dc_link *link = NULL;
--
2.25.1
next reply other threads:[~2022-05-30 11:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 9:29 Ryan Lin [this message]
2022-05-30 13:05 ` Greg KH
2022-06-01 4:04 ` Lin, Tsung-hua (Ryan)
2022-06-03 14:44 ` Greg KH
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=20220530092902.810336-1-tsung-hua.lin@amd.com \
--to=tsung-hua.lin@amd.com \
--cc=David1.Zhou@amd.com \
--cc=Roman.Li@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bas@basnieuwenhuizen.nl \
--cc=ching-shih.li@amd.com \
--cc=christian.koenig@amd.com \
--cc=contact@emersion.fr \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=ikshwaku.chauhan@amd.corp-partner.google.com \
--cc=leon.li@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markyacoub@google.com \
--cc=nicholas.kazlauskas@amd.com \
--cc=praful.swarnakar@amd.com \
--cc=sashal@kernel.org \
--cc=seanpaul@chromium.org \
--cc=shirish.s@amd.com \
--cc=stable@vger.kernel.org \
--cc=sunpeng.li@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
all inboxes | Powered by JetHome®