Skip to contentSkip to conversation

drm/amd/display: Look at firmware version to determine using dmub on dcn21

PATCH Superseded Mario Limonciello 2 participants 4 messages Oct 29, 2021

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 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.

Fixes b1c61212d8dc ("drm/amd/display: Fully switch to dmub for all dcn21 asics")
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index 6dd6262f2769..85b3de97f870 100644
@@ -1410,7 +1410,7 @@ 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;
-			init_data.flags.disable_dmcu = true;
+			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
Acked-by on v1 1/1
#1 lore raw
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_init runs before hw_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")
Quoted 20 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -2
index 6dd6262f2769..85b3de97f870 100644
@@ -1410,7 +1410,7 @@ 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;
-                       init_data.flags.disable_dmcu = true;
+                       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

#2 lore raw
Quoted 12 lines · Alex Deucher
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_init runs before hw_init, there is an opportunity to determine whether or not the firmware version is new to adjust the behavior.

Quoted 7 lines
Quoted 5 lines
Fixes b1c61212d8dc ("drm/amd/display: Fully switch to dmub for all dcn21 asics")

Actually if there are version differences between renoir and green sardine, maybe we need to bring back the old logic. E.g., 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;

Alex

Quoted 21 lines
Quoted 21 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -2
index 6dd6262f2769..85b3de97f870 100644
@@ -1410,7 +1410,7 @@ 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;
-                       init_data.flags.disable_dmcu = true;
+                       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

#3 lore raw

[Public]

Quoted 46 lines

-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, October 29, 2021 15:24
To: Limonciello, Mario <[email protected]>
Cc: amd-gfx list <[email protected]>; Li, Roman <[email protected]>
Subject: Re: [PATCH] drm/amd/display: Look at firmware version to determine using dmub on dcn21

Quoted 7 lines · Alex Deucher
Quoted 4 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

Quoted 7 lines
Quoted 7 lines

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: [email protected]
BugLink:

https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.fr
eedesktop.org%2Fdrm%2Famd%2F- %2Fissues%2F1772&amp;data=04%7C01%7Cmario.limonciello%40amd.com%7 C03c84193638144254d6f08d99b1a147c%7C3dd8961fe4884e608e11a82d994e1 83d%7C0%7C0%7C637711358602513049%7CUnknown%7CTWFpbGZsb3d8eyJ WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C 1000&amp;sdata=frHB0cKKTUHWxj0t8kFBBYTlGapT2dpqUOddJyuPeZ0%3D&am p;reserved=0

Quoted 1 line
Quoted 1 line

BugLink:

https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.fr
eedesktop.org%2Fdrm%2Famd%2F- %2Fissues%2F1735&amp;data=04%7C01%7Cmario.limonciello%40amd.com%7 C03c84193638144254d6f08d99b1a147c%7C3dd8961fe4884e608e11a82d994e1 83d%7C0%7C0%7C637711358602522996%7CUnknown%7CTWFpbGZsb3d8eyJ WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C 1000&amp;sdata=dOqYHWrdTNrJdqdTL1OFJHJVY8ntiLG%2BJzWSqGLSn5w%3D &amp;reserved=0

Quoted 1 line
Quoted 1 line
Fixes b1c61212d8dc ("drm/amd/display: Fully switch to dmub for all dcn21

asics")

Quoted 2 lines
Quoted 1 line
Quoted 9 lines
Quoted 1 line

Actually if there are version differences between renoir and green sardine, maybe we need to bring back the old logic. E.g., 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;

Good point - I'll respin for that.

Quoted 26 lines

Alex

Quoted 6 lines

Review

Quoted 6 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Quoted 4 lines

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_init(struct amdgpu_device

Quoted 4 lines

index 6dd6262f2769..85b3de97f870 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
@@ -1410,7 +1410,7 @@ static int amdgpu_dm_init(struct amdgpu_device

*adev)

Quoted 5 lines

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_init(struct amdgpu_device *adev)

Quoted 5 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
                switch (adev->ip_versions[DCE_HWIP][0]) {
                case IP_VERSION(2, 1, 0):
                        init_data.flags.gpu_vm_support = true;
-                       init_data.flags.disable_dmcu = true;
+                       init_data.flags.disable_dmcu = adev->dm.dmcub_fw_version >

0x01000000;

Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
                        break;
                case IP_VERSION(1, 0, 0):
                case IP_VERSION(1, 0, 1):
--

2.25.1