* [PATCH v3] drm/amd/display: Look at firmware version to determine using dmub on dcn21
@ 2021-11-02 15:04 Mario Limonciello
2021-11-02 15:57 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Mario Limonciello @ 2021-11-02 15:04 UTC (permalink / raw)
To: amd-gfx; +Cc: Mario Limonciello, Roman.Li
commit b1c61212d8dc ("drm/amd/display: Fully switch to dmub for all dcn21
asics") switched over to using dmub on Renoir to fix Gitlab 1735, but this
implied a new dependency on newer firmware which might not be met on older
kernel versions.
Since sw_init runs before hw_init, there is an opportunity to determine
whether or not the firmware version is new to adjust the behavior.
Cc: Roman.Li@amd.com
BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1772
BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1735
Fixes: b1c61212d8dc ("drm/amd/display: Fully switch to dmub for all dcn21 asics")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
Changes from v2->v3:
* Don't special case Green Sardine / Renoir anymore
* Special case the two Renoir firmware that have this problem
(that weren't released for green sardine)
* Special case development version of ucode version
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++++
1 file changed, 8 insertions(+)
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 b48f3cb5ddeb..dcc97ef28c50 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1410,7 +1410,15 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
switch (adev->ip_versions[DCE_HWIP][0]) {
case IP_VERSION(2, 1, 0):
init_data.flags.gpu_vm_support = true;
+ switch (adev->dm.dmcub_fw_version) {
+ case 0: /* development */
+ case 0x1: /* linux-firmware.git hash 6d9f399 */
+ case 0x01000000: /* linux-firmware.git hash 9a0b0f4 */
+ init_data.flags.disable_dmcu = false;
+ break;
+ default:
init_data.flags.disable_dmcu = true;
+ }
break;
case IP_VERSION(1, 0, 0):
case IP_VERSION(1, 0, 1):
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] drm/amd/display: Look at firmware version to determine using dmub on dcn21
2021-11-02 15:04 [PATCH v3] drm/amd/display: Look at firmware version to determine using dmub on dcn21 Mario Limonciello
@ 2021-11-02 15:57 ` Alex Deucher
2021-11-02 16:09 ` Li, Roman
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2021-11-02 15:57 UTC (permalink / raw)
To: Mario Limonciello; +Cc: Roman Li, amd-gfx list
On Tue, Nov 2, 2021 at 11:04 AM Mario Limonciello
<mario.limonciello@amd.com> wrote:
>
> commit b1c61212d8dc ("drm/amd/display: Fully switch to dmub for all dcn21
> asics") switched over to using dmub on Renoir to fix Gitlab 1735, but this
> implied a new dependency on newer firmware which might not be met on older
> kernel versions.
>
> Since sw_init runs before hw_init, there is an opportunity to determine
> whether or not the firmware version is new to adjust the behavior.
>
> Cc: Roman.Li@amd.com
> BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1772
> BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1735
> Fixes: b1c61212d8dc ("drm/amd/display: Fully switch to dmub for all dcn21 asics")
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> Changes from v2->v3:
> * Don't special case Green Sardine / Renoir anymore
> * Special case the two Renoir firmware that have this problem
> (that weren't released for green sardine)
> * Special case development version of ucode version
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> 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 b48f3cb5ddeb..dcc97ef28c50 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -1410,7 +1410,15 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
> switch (adev->ip_versions[DCE_HWIP][0]) {
> case IP_VERSION(2, 1, 0):
> init_data.flags.gpu_vm_support = true;
> + switch (adev->dm.dmcub_fw_version) {
> + case 0: /* development */
> + case 0x1: /* linux-firmware.git hash 6d9f399 */
> + case 0x01000000: /* linux-firmware.git hash 9a0b0f4 */
> + init_data.flags.disable_dmcu = false;
> + break;
> + default:
> init_data.flags.disable_dmcu = true;
> + }
> break;
> case IP_VERSION(1, 0, 0):
> case IP_VERSION(1, 0, 1):
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH v3] drm/amd/display: Look at firmware version to determine using dmub on dcn21
2021-11-02 15:57 ` Alex Deucher
@ 2021-11-02 16:09 ` Li, Roman
0 siblings, 0 replies; 3+ messages in thread
From: Li, Roman @ 2021-11-02 16:09 UTC (permalink / raw)
To: Alex Deucher, Limonciello, Mario; +Cc: amd-gfx list
[Public]
Reviewed-by: Roman Li <Roman.Li@amd.com>
> -----Original Message-----
> From: Alex Deucher <alexdeucher@gmail.com>
> Sent: Tuesday, November 2, 2021 11:58 AM
> To: Limonciello, Mario <Mario.Limonciello@amd.com>
> Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>; Li, Roman
> <Roman.Li@amd.com>
> Subject: Re: [PATCH v3] drm/amd/display: Look at firmware version to
> determine using dmub on dcn21
>
> On Tue, Nov 2, 2021 at 11:04 AM Mario Limonciello
> <mario.limonciello@amd.com> wrote:
> >
> > commit b1c61212d8dc ("drm/amd/display: Fully switch to dmub for all
> > dcn21
> > asics") switched over to using dmub on Renoir to fix Gitlab 1735, but
> > this implied a new dependency on newer firmware which might not be met
> > on older kernel versions.
> >
> > Since sw_init runs before hw_init, there is an opportunity to
> > determine whether or not the firmware version is new to adjust the behavior.
> >
> > Cc: Roman.Li@amd.com
> > BugLink:
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitl
> > ab.freedesktop.org%2Fdrm%2Famd%2F-
> %2Fissues%2F1772&data=04%7C01%7C
> >
> Roman.Li%40amd.com%7C29e4fd818a2446e0cf5208d99e198897%7C3dd8961f
> e4884e
> >
> 608e11a82d994e183d%7C0%7C0%7C637714654774196023%7CUnknown%7CT
> WFpbGZsb3
> >
> d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3
> D%7
> >
> C1000&sdata=NrV1aszBAZkJ%2FQELpzxx7NCKXjWKPEvgk6rEAwfhWYk%3D
> &r
> > eserved=0
> > BugLink:
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitl
> > ab.freedesktop.org%2Fdrm%2Famd%2F-
> %2Fissues%2F1735&data=04%7C01%7C
> >
> Roman.Li%40amd.com%7C29e4fd818a2446e0cf5208d99e198897%7C3dd8961f
> e4884e
> >
> 608e11a82d994e183d%7C0%7C0%7C637714654774196023%7CUnknown%7CT
> WFpbGZsb3
> >
> d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3
> D%7
> >
> C1000&sdata=EqjhSIwtkgo%2BtJFwUkf%2FDTY4RiSNVSh8DjXLu7LAszM%3
> D&
> > ;reserved=0
> > Fixes: b1c61212d8dc ("drm/amd/display: Fully switch to dmub for all
> > dcn21 asics")
> > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>
> Acked-by: Alex Deucher <alexander.deucher@amd.com>
>
> > ---
> > Changes from v2->v3:
> > * Don't special case Green Sardine / Renoir anymore
> > * Special case the two Renoir firmware that have this problem
> > (that weren't released for green sardine)
> > * Special case development version of ucode version
> > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > 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 b48f3cb5ddeb..dcc97ef28c50 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > @@ -1410,7 +1410,15 @@ static int amdgpu_dm_init(struct amdgpu_device
> *adev)
> > switch (adev->ip_versions[DCE_HWIP][0]) {
> > case IP_VERSION(2, 1, 0):
> > init_data.flags.gpu_vm_support = true;
> > + switch (adev->dm.dmcub_fw_version) {
> > + case 0: /* development */
> > + case 0x1: /* linux-firmware.git hash 6d9f399 */
> > + case 0x01000000: /* linux-firmware.git hash 9a0b0f4 */
> > + init_data.flags.disable_dmcu = false;
> > + break;
> > + default:
> > init_data.flags.disable_dmcu = true;
> > + }
> > break;
> > case IP_VERSION(1, 0, 0):
> > case IP_VERSION(1, 0, 1):
> > --
> > 2.25.1
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-02 16:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 15:04 [PATCH v3] drm/amd/display: Look at firmware version to determine using dmub on dcn21 Mario Limonciello
2021-11-02 15:57 ` Alex Deucher
2021-11-02 16:09 ` Li, Roman
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.