* [PATCH] drm/amdgpu: fix that issue that the number of the crtc of the 3250c is not correct @ 2022-01-27 8:12 RyanLin 2022-01-27 14:14 ` Alex Deucher ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: RyanLin @ 2022-01-27 8:12 UTC (permalink / raw) To: harry.wentland, sunpeng.li, alexander.deucher, christian.koenig, David1.Zhou, airlied, daniel, seanpaul, bas, nicholas.kazlauskas, sashal, markyacoub, victorchengchi.lu, ching-shih.li, Rodrigo.Siqueira, ddavenport, amd-gfx, dri-devel, linux-kernel Cc: RyanLin [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. Signed-off-by: RyanLin <Tsung-Hua.Lin@amd.com> Change-Id: I837df7101cc4849d2c3021fd529b4061edab4bb1 --- 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 40c91b448f7d..dbeef7b57a9b 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) { //chip_name = "raven2"; + 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 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/amdgpu: fix that issue that the number of the crtc of the 3250c is not correct 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 ` [PATCH v2] " Ryan Lin 2 siblings, 0 replies; 10+ messages in thread From: Alex Deucher @ 2022-01-27 14:14 UTC (permalink / raw) To: RyanLin Cc: Wentland, Harry, Leo (Sunpeng) Li, Deucher, Alexander, Christian Koenig, Chunming Zhou, Dave Airlie, Daniel Vetter, Sean Paul, Bas Nieuwenhuizen, Kazlauskas, Nicholas, Sasha Levin, Mark Yacoub, Victor Lu, ching-shih.li, Siqueira, Rodrigo, ddavenport, amd-gfx list, Maling list - DRI developers, LKML Please use C style comments /* */. WIth that fixed: Reviewed-by: Alex Deucher <alexander.deucher@amd.com> On Thu, Jan 27, 2022 at 3:12 AM RyanLin <Tsung-Hua.Lin@amd.com> wrote: > > [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. > > Signed-off-by: RyanLin <Tsung-Hua.Lin@amd.com> > Change-Id: I837df7101cc4849d2c3021fd529b4061edab4bb1 > --- > 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 40c91b448f7d..dbeef7b57a9b 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) { //chip_name = "raven2"; > + 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 > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/amdgpu: fix that issue that the number of the crtc of the 3250c is not correct 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 ` [PATCH v2] " Ryan Lin 2 siblings, 0 replies; 10+ messages in thread From: Mark Yacoub @ 2022-01-27 15:33 UTC (permalink / raw) To: RyanLin Cc: harry.wentland, sunpeng.li, alexander.deucher, christian.koenig, David1.Zhou, airlied, daniel, seanpaul, bas, nicholas.kazlauskas, sashal, VictorChengChi.Lu, ching-shih.li, Rodrigo.Siqueira, ddavenport, amd-gfx, dri-devel, linux-kernel On Thu, Jan 27, 2022 at 3:12 AM RyanLin <Tsung-Hua.Lin@amd.com> wrote: > > [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. > > Signed-off-by: RyanLin <Tsung-Hua.Lin@amd.com> > Change-Id: I837df7101cc4849d2c3021fd529b4061edab4bb1 Please drop the gerrit ID. > --- > 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 40c91b448f7d..dbeef7b57a9b 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) { //chip_name = "raven2"; > + 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 > ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] drm/amdgpu: fix that issue that the number of the crtc of the 3250c is not correct 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 2022-03-30 3:01 ` Alex Deucher ` (2 more replies) 2 siblings, 3 replies; 10+ messages in thread From: Ryan Lin @ 2022-03-30 2:46 UTC (permalink / raw) Cc: leon.li, Ryan Lin, Harry Wentland, Leo Li, Alex Deucher, Christian König, David (ChunMing) Zhou, David Airlie, Daniel Vetter, Sean Paul, Bas Nieuwenhuizen, Nicholas Kazlauskas, Stéphane Marchesin, Mark Yacoub, Louis Li, Rodrigo Siqueira, Drew Davenport, amd-gfx, dri-devel, linux-kernel [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 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2] drm/amdgpu: fix that issue that the number of the crtc of the 3250c is not correct 2022-03-30 2:46 ` [PATCH v2] " Ryan Lin @ 2022-03-30 3:01 ` Alex Deucher 2022-03-30 4:29 ` VURDIGERENATARAJ, CHANDAN 2022-03-30 6:34 ` Paul Menzel 2 siblings, 0 replies; 10+ messages in thread From: Alex Deucher @ 2022-03-30 3:01 UTC (permalink / raw) To: Ryan Lin Cc: David (ChunMing) Zhou, Drew Davenport, Leo Li, leon.li, Maling list - DRI developers, Rodrigo Siqueira, LKML, amd-gfx list, Christian König, David Airlie, Sean Paul, Louis Li, Daniel Vetter, Bas Nieuwenhuizen, Alex Deucher, Stéphane Marchesin, Nicholas Kazlauskas, Harry Wentland, Mark Yacoub On Tue, Mar 29, 2022 at 10:57 PM Ryan Lin <tsung-hua.lin@amd.com> wrote: > > [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> Reviewed-by: Alex Deucher <alexander.deucher@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 > ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v2] drm/amdgpu: fix that issue that the number of the crtc of the 3250c is not correct 2022-03-30 2:46 ` [PATCH v2] " Ryan Lin 2022-03-30 3:01 ` Alex Deucher @ 2022-03-30 4:29 ` VURDIGERENATARAJ, CHANDAN 2022-03-30 5:50 ` Lin, Tsung-hua (Ryan) 2022-03-30 6:34 ` Paul Menzel 2 siblings, 1 reply; 10+ messages in thread From: VURDIGERENATARAJ, CHANDAN @ 2022-03-30 4:29 UTC (permalink / raw) To: Lin, Tsung-hua (Ryan) Cc: David (ChunMing) Zhou, Drew Davenport, Li, Sun peng (Leo), Li, Leon, dri-devel, Siqueira, Rodrigo, linux-kernel, amd-gfx, Koenig, Christian, David Airlie, Sean Paul, Louis Li, Daniel Vetter, Bas Nieuwenhuizen, Deucher, Alexander, Stéphane Marchesin, Kazlauskas, Nicholas, Wentland, Harry, Lin, Tsung-hua (Ryan), Mark Yacoub Hi Ryan, Is this change applicable on a specific kernel version? On latest I see IP DISCOVERY based impl for CHIP_RAVEN. >[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) { May I know what this ">=8" indicate? Also, should it be external_rev_id if its based on old version? >+ 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 > BR, Chandan V N ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v2] drm/amdgpu: fix that issue that the number of the crtc of the 3250c is not correct 2022-03-30 4:29 ` VURDIGERENATARAJ, CHANDAN @ 2022-03-30 5:50 ` Lin, Tsung-hua (Ryan) 2022-03-30 8:15 ` VURDIGERENATARAJ, CHANDAN 0 siblings, 1 reply; 10+ messages in thread From: Lin, Tsung-hua (Ryan) @ 2022-03-30 5:50 UTC (permalink / raw) To: VURDIGERENATARAJ, CHANDAN Cc: Drew Davenport, Li, Sun peng (Leo), Li, Leon, dri-devel, Siqueira, Rodrigo, linux-kernel, amd-gfx, Koenig, Christian, David Airlie, Sean Paul, Louis Li, Daniel Vetter, Bas Nieuwenhuizen, Deucher, Alexander, Stéphane Marchesin, Kazlauskas, Nicholas, Wentland, Harry, Mark Yacoub [AMD Official Use Only] Hi Chandan, This issue we found on the Zork project which uses the kernel 5.4 on. So I just implemented it on kernel 5.4. For finding out which is 3250c, I referenced the function which is implemented from another function. Below is the part where I found it. drivers/gpu/drm/amd/amdgpu/amdgpu_device.c- case CHIP_RAVEN: if (adev->rev_id >= 8) chip_name = "raven2"; else if (adev->pdev->device == 0x15d8) chip_name = "picasso"; else chip_name = "raven"; break; BR, Ryan Lin. -----Original Message----- From: VURDIGERENATARAJ, CHANDAN <CHANDAN.VURDIGERENATARAJ@amd.com> Sent: Wednesday, March 30, 2022 12:30 PM To: Lin, Tsung-hua (Ryan) <Tsung-hua.Lin@amd.com> Cc: David (ChunMing) Zhou <David1.Zhou@amd.com>; Drew Davenport <ddavenport@chromium.org>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Li, Leon <Leon.Li@amd.com>; dri-devel@lists.freedesktop.org; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; linux-kernel@vger.kernel.org; amd-gfx@lists.freedesktop.org; Koenig, Christian <Christian.Koenig@amd.com>; David Airlie <airlied@linux.ie>; Sean Paul <seanpaul@chromium.org>; Louis Li <ching-shih.li@amd.corp-partner.google.com>; Daniel Vetter <daniel@ffwll.ch>; Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>; Deucher, Alexander <Alexander.Deucher@amd.com>; Stéphane Marchesin <marcheu@chromium.org>; Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Lin, Tsung-hua (Ryan) <Tsung-hua.Lin@amd.com>; Mark Yacoub <markyacoub@google.com> Subject: RE: [PATCH v2] drm/amdgpu: fix that issue that the number of the crtc of the 3250c is not correct Hi Ryan, Is this change applicable on a specific kernel version? On latest I see IP DISCOVERY based impl for CHIP_RAVEN. >[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) { May I know what this ">=8" indicate? Also, should it be external_rev_id if its based on old version? >+ 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 > BR, Chandan V N ^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH v2] drm/amdgpu: fix that issue that the number of the crtc of the 3250c is not correct 2022-03-30 5:50 ` Lin, Tsung-hua (Ryan) @ 2022-03-30 8:15 ` VURDIGERENATARAJ, CHANDAN 0 siblings, 0 replies; 10+ messages in thread From: VURDIGERENATARAJ, CHANDAN @ 2022-03-30 8:15 UTC (permalink / raw) To: Lin, Tsung-hua (Ryan) Cc: Drew Davenport, Li, Sun peng (Leo), Li, Leon, dri-devel, Siqueira, Rodrigo, linux-kernel, amd-gfx, Koenig, Christian, David Airlie, Sean Paul, Louis Li, Daniel Vetter, Bas Nieuwenhuizen, Deucher, Alexander, Stéphane Marchesin, Kazlauskas, Nicholas, Wentland, Harry, Mark Yacoub >Hi Chandan, > >This issue we found on the Zork project which uses the kernel 5.4 on. So I just implemented it on kernel 5.4. >For finding out which is 3250c, I referenced the function which is implemented from another function. >Below is the part where I found it. > >drivers/gpu/drm/amd/amdgpu/amdgpu_device.c- > case CHIP_RAVEN: > if (adev->rev_id >= 8) > chip_name = "raven2"; > else if (adev->pdev->device == 0x15d8) > chip_name = "picasso"; > else > chip_name = "raven"; > break; > >BR, >Ryan Lin. Suggest you to rebase to amd-staging-drm-next tip and update your changes accordingly and re-submit. > >Hi Ryan, > >Is this change applicable on a specific kernel version? >On latest I see IP DISCOVERY based impl for CHIP_RAVEN. > >>[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) { > >May I know what this ">=8" indicate? Also, should it be external_rev_id if its based on old version? > >>+ 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 >> > >BR, >Chandan V N ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] drm/amdgpu: fix that issue that the number of the crtc of the 3250c is not correct 2022-03-30 2:46 ` [PATCH v2] " Ryan Lin 2022-03-30 3:01 ` Alex Deucher 2022-03-30 4:29 ` VURDIGERENATARAJ, CHANDAN @ 2022-03-30 6:34 ` Paul Menzel 2022-03-30 6:36 ` Paul Menzel 2 siblings, 1 reply; 10+ messages in thread From: Paul Menzel @ 2022-03-30 6:34 UTC (permalink / raw) To: Ryan Lin Cc: Chun Ming Zhou, Drew Davenport, Leo Li, leon.li, dri-devel, Rodrigo Siqueira, linux-kernel, amd-gfx, Christian König, David Airlie, Sean Paul, Louis Li, Daniel Vetter, Bas Nieuwenhuizen, Alex Deucher, Stéphane Marchesin, Nicholas Kazlauskas, Harry Wentland, Mark Yacoub Dear Tsung-Hua, Thank you for your patch. Am 30.03.22 um 04:46 schrieb Ryan Lin: The commit message summary is quite long and confusing. Maybe: Use 3 CRTC for 3250c to get internal display working > [Why] > External displays take priority over internal display when there are fewer > display controllers than displays. This causes the internal display to not work on the Chromebook google/zork. > [How] > The root cause is because of that number of the crtc is not correct. The root cause is the incorrect number of four configured CRTCs. > 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. Please do not wrap lines after each sentence, and use a text width of 75 characters. > 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) { Is there some define for that number? Maybe add a comment, that it’s for 3250c? Kind regards, Paul > + 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) ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] drm/amdgpu: fix that issue that the number of the crtc of the 3250c is not correct 2022-03-30 6:34 ` Paul Menzel @ 2022-03-30 6:36 ` Paul Menzel 0 siblings, 0 replies; 10+ messages in thread From: Paul Menzel @ 2022-03-30 6:36 UTC (permalink / raw) To: Ryan Lin Cc: Stéphane Marchesin, Leo Li, leon.li, Rodrigo Siqueira, linux-kernel, dri-devel, Nicholas Kazlauskas, David Airlie, Sean Paul, amd-gfx, Daniel Vetter, Bas Nieuwenhuizen, Drew Davenport, Alex Deucher, Mark Yacoub, Harry Wentland, Christian König, Louis Li [Cc: Remove undeliverable Chun Ming Zhou <mailto:David1.Zhou@amd.com>] Am 30.03.22 um 08:34 schrieb Paul Menzel: > Dear Tsung-Hua, > > > Thank you for your patch. > > Am 30.03.22 um 04:46 schrieb Ryan Lin: > > The commit message summary is quite long and confusing. Maybe: > > Use 3 CRTC for 3250c to get internal display working > >> [Why] >> External displays take priority over internal display when there are >> fewer >> display controllers than displays. > > This causes the internal display to not work on the Chromebook google/zork. > >> [How] >> The root cause is because of that number of the crtc is not correct. > > The root cause is the incorrect number of four configured CRTCs. > >> 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. > > Please do not wrap lines after each sentence, and use a text width of 75 > characters. > >> 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) { > > Is there some define for that number? Maybe add a comment, that it’s for > 3250c? > > > Kind regards, > > Paul > > >> + 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) ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-03-30 8:15 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 ` [PATCH v2] " Ryan Lin 2022-03-30 3:01 ` 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
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).