Skip to contentSkip to conversation

drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID

PATCH In review Jane Jian 2 participants 2 messages Nov 24, 2021

Subsystems (2)
lore
Share & tools
lore

Jane Jian

author
#0 lore raw

PATCH 1/1 drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID

[WHY]
for sriov odd# vf will modify vcn0 engine ip revision(due to multimedia bandwidth feature), which will be mismatched with original vcn0 revision

[HOW]
add new version check for vcn0 disabled revision

Change-Id I1ace32acbf3a13c0baac958508da1324ec387a58
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 3 +++
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c       | 4 ++++
 2 files changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +3 -0
index 503995c7ff6c..1dabbcbc3970 100644
@@ -925,6 +925,9 @@ static int amdgpu_discovery_set_mm_ip_blocks(struct amdgpu_device *adev)
 		case IP_VERSION(3, 0, 33):
 			amdgpu_device_ip_block_add(adev, &vcn_v3_0_ip_block);
 			break;
+		case IP_VERSION(3, 0, 192):
+			amdgpu_device_ip_block_add(adev, &vcn_v3_0_ip_block);
+			break;
 		default:
 			dev_err(adev->dev,
 				"Failed to add vcn/jpeg ip block(UVD_HWIP:0x%x)\n",
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +4 -0
index 4f7c70845785..27125e5e3092 100644
@@ -143,6 +143,10 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
 		    (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG))
 			adev->vcn.indirect_sram = true;
 		break;
+	case IP_VERSION(3, 0, 192):
+		if (amdgpu_sriov_vf(adev))
+			fw_name = FIRMWARE_SIENNA_CICHLID;
+		break;
 	case IP_VERSION(3, 0, 2):
 		fw_name = FIRMWARE_VANGOGH;
 		break;
Signature · 1 line
2.17.1
#1 lore raw
Quoted 20 lines · Jane Jian

[WHY]
for sriov odd# vf will modify vcn0 engine ip revision(due to multimedia bandwidth feature), which will be mismatched with original vcn0 revision

[HOW]
add new version check for vcn0 disabled revision

Change-Id I1ace32acbf3a13c0baac958508da1324ec387a58
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 3 +++
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c       | 4 ++++
 2 files changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +0 -0
index 503995c7ff6c..1dabbcbc3970 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c static int amdgpu_discovery_set_mm_ip_blocks(struct amdgpu_device *adev) · line 928

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
@@ -925,6 +925,9 @@ static int amdgpu_discovery_set_mm_ip_blocks(struct amdgpu_device *adev)
                case IP_VERSION(3, 0, 33):
                        amdgpu_device_ip_block_add(adev, &vcn_v3_0_ip_block);
                        break;
+               case IP_VERSION(3, 0, 192):

You can probably just add this case to the above 3.0.33 case.

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +2 -0
+                       amdgpu_device_ip_block_add(adev, &vcn_v3_0_ip_block);
+                       break;
                default:
                        dev_err(adev->dev,
                                "Failed to add vcn/jpeg ip block(UVD_HWIP:0x%x)\n",
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -0
index 4f7c70845785..27125e5e3092 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c int amdgpu_vcn_sw_init(struct amdgpu_device *adev) · line 147

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +2 -0
@@ -143,6 +143,10 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
                    (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG))
                        adev->vcn.indirect_sram = true;
                break;
+       case IP_VERSION(3, 0, 192):
+               if (amdgpu_sriov_vf(adev))

I think you can skip the sr-iov check here.

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +2 -1
+                       fw_name = FIRMWARE_SIENNA_CICHLID;
+               break;
        case IP_VERSION(3, 0, 2):
                fw_name = FIRMWARE_VANGOGH;
                break;
--

2.17.1