[PATCH v2] drm/amd/display: Look at firmware version to determine using dmub on dcn21

Li, Roman Roman.Li at amd.com
Fri Oct 29 23:11:30 UTC 2021


[Public]

> -----Original Message-----
> From: Alex Deucher <alexdeucher at gmail.com>
> Sent: Friday, October 29, 2021 4:34 PM
> To: Limonciello, Mario <Mario.Limonciello at amd.com>
> Cc: amd-gfx list <amd-gfx at lists.freedesktop.org>; Li, Roman
> <Roman.Li at amd.com>
> Subject: Re: [PATCH v2] drm/amd/display: Look at firmware version to
> determine using dmub on dcn21
>
> On Fri, Oct 29, 2021 at 4:33 PM Mario Limonciello
> <mario.limonciello at 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 at 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%7C4e27c983112e4ffdd36008d99b1b860a%7C3dd8961f
> e4884e
> >
> 608e11a82d994e183d%7C0%7C0%7C637711364793611804%7CUnknown%7CT
> WFpbGZsb3
> >
> d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3
> D%7
> >
> C1000&sdata=cFwunb4aAJbFkCe6lIFMY4oWfbkCVWAGshe8lB0rg0U%3D&
> amp;res
> > erved=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%7C4e27c983112e4ffdd36008d99b1b860a%7C3dd8961f
> e4884e
> >
> 608e11a82d994e183d%7C0%7C0%7C637711364793611804%7CUnknown%7CT
> WFpbGZsb3
> >
> d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3
> D%7
> >
> C1000&sdata=%2F9sfVD5PN2tsl0bXkctPzkrHpJKQoZDex8xCDt1bVPg%3D&
> amp;r
> > eserved=0
> > Fixes: b1c61212d8dc ("drm/amd/display: Fully switch to dmub for all
> > dcn21 asics")
> > Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
>
> Acked-by: Alex Deucher <alexander.deucher at amd.com>
>
> > ---
> >  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++
> >  1 file changed, 3 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 6dd6262f2769..e7ff8ad4c5a7 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,10 @@ 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;
> > +                       if
> > + (ASICREV_IS_GREEN_SARDINE(adev->external_rev_id))
> >                                 init_data.flags.disable_dmcu = true;
> > +                       else
> > +                               init_data.flags.disable_dmcu =
> > + adev->dm.dmcub_fw_version > 0x01000000;

Since this is the only fw version that needs dmcu, it's safer to use equal condition here.

> >                         break;
> >                 case IP_VERSION(1, 0, 0):
> >                 case IP_VERSION(1, 0, 1):
> > --
> > 2.25.1
> >


More information about the amd-gfx mailing list