drm/amd/display: Look at firmware version to determine using dmub on dcn21
Subsystems (3)
PATCH v2 1/1 drm/amd/display: Look at firmware version to determine using dmub on dcn21
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.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -0
@@ -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 ;break ;case IP_VERSION (1 ,0 ,0 ):case IP_VERSION (1 ,0 ,1 ):
Signature · 1 line
2.25.1
Quoted 6 lines · Mario Limonciello
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.
Quoted 8 lines
Since
sw_initruns beforehw_init, there is an opportunity to determine whether or not the firmware version is new to adjust the behavior.Fixes b1c61212d8dc ("drm/amd/display: Fully switch to dmub for all dcn21 asics")Signed-off-by Mario Limonciello <[email protected]>
Quoted 22 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3
-1@@ -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 ;break ;case IP_VERSION (1 ,0 ,0 ):case IP_VERSION (1 ,0 ,1 ): --2.25.1
[Public]
Quoted 66 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, October 29, 2021 4:34 PM
To: Limonciello, Mario <[email protected]>
Cc: amd-gfx list <[email protected]>; Li, Roman <[email protected]>
Subject: Re: [PATCH v2] drm/amd/display: Look at firmware version to determine using dmub on dcn21Quoted 7 lines · Mario Limonciello
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.Quoted 7 lines
Since
sw_initruns beforehw_init, there is an opportunity to determine whether or not the firmware version is new to adjust the behavior.Cc: [email protected]
BugLink:
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitl
ab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1772&data=04%7C01%7C
Quoted 1 line
Roman.Li%40amd.com%7C4e27c983112e4ffdd36008d99b1b860a%7C3dd8961f e4884e
Quoted 1 line
608e11a82d994e183d%7C0%7C0%7C637711364793611804%7CUnknown%7CT WFpbGZsb3
Quoted 1 line
d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3 D%7
Quoted 1 line
C1000&sdata=cFwunb4aAJbFkCe6lIFMY4oWfbkCVWAGshe8lB0rg0U%3D& amp;res
Quoted 4 lines
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
Quoted 1 line
Roman.Li%40amd.com%7C4e27c983112e4ffdd36008d99b1b860a%7C3dd8961f e4884e
Quoted 1 line
608e11a82d994e183d%7C0%7C0%7C637711364793611804%7CUnknown%7CT WFpbGZsb3
Quoted 1 line
d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3 D%7
Quoted 1 line
C1000&sdata=%2F9sfVD5PN2tsl0bXkctPzkrHpJKQoZDex8xCDt1bVPg%3D& amp;r
Quoted 4 lines
eserved=0
Fixes b1c61212d8dc ("drm/amd/display: Fully switch to dmub for alldcn21 asics")
Signed-off-by Mario Limonciello <[email protected]>Acked-by Alex Deucher <[email protected]>Quoted 4 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+)
Quoted 16 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_init(struct amdgpu_device
Quoted 6 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-0@@ -1410,7 +1410,10 @@ static int amdgpu_dm_init(struct amdgpu_device*adev)
Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5
-0switch (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.
Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-1break ;case IP_VERSION (1 ,0 ,0 ):case IP_VERSION (1 ,0 ,1 ): --2.25.1
[Public]
Quoted 103 lines
-----Original Message-----
From: Li, Roman <[email protected]>
Sent: Friday, October 29, 2021 18:12
To: Alex Deucher <[email protected]>; Limonciello, Mario <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: RE: [PATCH v2] drm/amd/display: Look at firmware version to determine using dmub on dcn21[Public]
Quoted 9 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, October 29, 2021 4:34 PM
To: Limonciello, Mario <[email protected]>
Cc: amd-gfx list <[email protected]>; Li, Roman <[email protected]>
Subject: Re: [PATCH v2] drm/amd/display: Look at firmware version to determine using dmub on dcn21Quoted 11 lines
Quoted 9 lines · Mario Limonciello
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_initruns beforehw_init, there is an opportunity to determine whether or not the firmware version is new to adjust thebehavior.
Quoted 8 lines
Quoted 5 lines
Cc: [email protected]
BugLink:
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitl
ab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1772&data=04%7C01%7C
Quoted 1 line
Roman.Li%40amd.com%7C4e27c983112e4ffdd36008d99b1b860a%7C3dd8961f
Quoted 3 lines
e4884e
Quoted 1 line
608e11a82d994e183d%7C0%7C0%7C637711364793611804%7CUnknown%7CT
Quoted 3 lines
WFpbGZsb3
Quoted 1 line
d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3
Quoted 3 lines
D%7
Quoted 1 line
C1000&sdata=cFwunb4aAJbFkCe6lIFMY4oWfbkCVWAGshe8lB0rg0U%3D&
Quoted 8 lines
amp;res
Quoted 4 lines
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
Quoted 1 line
Roman.Li%40amd.com%7C4e27c983112e4ffdd36008d99b1b860a%7C3dd8961f
Quoted 3 lines
e4884e
Quoted 1 line
608e11a82d994e183d%7C0%7C0%7C637711364793611804%7CUnknown%7CT
Quoted 3 lines
WFpbGZsb3
Quoted 1 line
d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3
Quoted 3 lines
D%7
Quoted 1 line
C1000&sdata=%2F9sfVD5PN2tsl0bXkctPzkrHpJKQoZDex8xCDt1bVPg%3D&
Quoted 12 lines
amp;r
Quoted 4 lines
eserved=0
Fixes b1c61212d8dc ("drm/amd/display: Fully switch to dmub for alldcn21 asics")
Signed-off-by Mario Limonciello <[email protected]>Acked-by Alex Deucher <[email protected]>Quoted 4 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+)Quoted 16 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_init(struct amdgpu_device
Quoted 6 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-0@@ -1410,7 +1410,10 @@ static int amdgpu_dm_init(struct amdgpu_device*adev)
Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5
-0switch (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 ;
Quoted 2 lines
Since this is the only fw version that needs dmcu, it's safer to use equal condition here.
Are you sure nothing older needs it? Or are you just thinking because this is the "first firmware" that is released?
I seem to recall seeing this in a log that worked with it set to "false":
[drm] Loading DMUB firmware via PSP: version=0x00000001
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0
-1break ;case IP_VERSION (1 ,0 ,0 ):case IP_VERSION (1 ,0 ,1 ): --2.25.1