linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Lin <tsung-hua.lin@amd.com>
To: unlisted-recipients:; (no To-header on input)
Cc: leon.li@amd.com, "Ryan Lin" <tsung-hua.lin@amd.com>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David (ChunMing) Zhou" <David1.Zhou@amd.com>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Sean Paul" <seanpaul@chromium.org>,
	"Bas Nieuwenhuizen" <bas@basnieuwenhuizen.nl>,
	"Nicholas Kazlauskas" <nicholas.kazlauskas@amd.com>,
	"Stéphane Marchesin" <marcheu@chromium.org>,
	"Mark Yacoub" <markyacoub@google.com>,
	"Louis Li" <ching-shih.li@amd.corp-partner.google.com>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	"Drew Davenport" <ddavenport@chromium.org>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2] drm/amdgpu: fix that issue that the number of the crtc of the 3250c is not correct
Date: Wed, 30 Mar 2022 10:46:43 +0800	[thread overview]
Message-ID: <20220330024643.162230-1-tsung-hua.lin@amd.com> (raw)
In-Reply-To: <20220127081237.13903-1-Tsung-Hua.Lin@amd.com>

[Why]
External displays take priority over internal display when there are fewer
display controllers than displays.

[How]
The root cause is because of that number of the crtc is not correct.
The number of the crtc on the 3250c is 3, but on the 3500c is 4.
On the source code, we can see that number of the crtc has been fixed at 4.
Needs to set the num_crtc to 3 for 3250c platform.

v2:
   - remove unnecessary comments and Id

Signed-off-by: Ryan Lin <tsung-hua.lin@amd.com>

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 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 40c91b448f7da..455a2c45e8cda 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2738,9 +2738,15 @@ static int dm_early_init(void *handle)
 		break;
 #if defined(CONFIG_DRM_AMD_DC_DCN1_0)
 	case CHIP_RAVEN:
-		adev->mode_info.num_crtc = 4;
-		adev->mode_info.num_hpd = 4;
-		adev->mode_info.num_dig = 4;
+		if (adev->rev_id >= 8) {
+			adev->mode_info.num_crtc = 3;
+			adev->mode_info.num_hpd = 3;
+			adev->mode_info.num_dig = 3;
+		} else {
+			adev->mode_info.num_crtc = 4;
+			adev->mode_info.num_hpd = 4;
+			adev->mode_info.num_dig = 4;
+		}
 		break;
 #endif
 #if defined(CONFIG_DRM_AMD_DC_DCN2_0)
-- 
2.25.1


  parent reply	other threads:[~2022-03-30  2:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27  8:12 [PATCH] drm/amdgpu: fix that issue that the number of the crtc of the 3250c is not correct RyanLin
2022-01-27 14:14 ` Alex Deucher
2022-01-27 15:33 ` Mark Yacoub
2022-03-30  2:46 ` Ryan Lin [this message]
2022-03-30  3:01   ` [PATCH v2] " Alex Deucher
2022-03-30  4:29   ` VURDIGERENATARAJ, CHANDAN
2022-03-30  5:50     ` Lin, Tsung-hua (Ryan)
2022-03-30  8:15       ` VURDIGERENATARAJ, CHANDAN
2022-03-30  6:34   ` Paul Menzel
2022-03-30  6:36     ` Paul Menzel

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=20220330024643.162230-1-tsung-hua.lin@amd.com \
    --to=tsung-hua.lin@amd.com \
    --cc=David1.Zhou@amd.com \
    --cc=Rodrigo.Siqueira@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.corp-partner.google.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=ddavenport@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=leon.li@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcheu@chromium.org \
    --cc=markyacoub@google.com \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=seanpaul@chromium.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;
as well as URLs for NNTP newsgroup(s).