drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID
Subsystems (2)
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]
skip ip revision match case and continue use asic type to check
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +4 -1
@@ -1334,7 +1334,10 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)return r; } - r =amdgpu_discovery_set_mm_ip_blocks (adev); +if (adev->asic_type ==CHIP_SIENNA_CICHLID &&amdgpu_sriov_vf (adev)) + r =amdgpu_device_ip_block_add (adev, &vcn_v3_0_ip_block); +else + r =amdgpu_discovery_set_mm_ip_blocks (adev);if (r)return r;
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +6 -0
@@ -86,6 +86,10 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)for (i =0 ; i < adev->vcn.num_vcn_inst; i++)atomic_set (&adev->vcn.inst[i].dpg_enc_submission_cnt,0 ); +if (adev->asic_type ==CHIP_SIENNA_CICHLID &&amdgpu_sriov_vf (adev)) { + fw_name =FIRMWARE_SIENNA_CICHLID ; + goto next; + }switch (adev->ip_versions[UVD_HWIP ][0 ]) {case IP_VERSION (1 ,0 ,0 ):case IP_VERSION (1 ,0 ,1 ):
@@ -168,6 +172,8 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)return -EINVAL ; } +next: + r =request_firmware (&adev->vcn.fw, fw_name, adev->dev);if (r) { dev_err(adev->dev, "amdgpu_vcn: Can't load firmware \"%s\"\n",
Signature · 1 line
2.17.1
Deucher, Alexander
maintainer[Public]
Can we just add a check for the new IP version in that case? This looks really hacky.
Alex
________________________________
From: Jane Jian <[email protected]>
Sent: Tuesday, November 23, 2021 6:34 AM
To: [email protected] <[email protected]>; Deucher, Alexander <[email protected]>; Chen, Guchun <[email protected]>; Chen, JingWen <[email protected]>
Cc: Jian, Jane <[email protected]>
Subject: [PATCH] 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]
skip ip revision match case and continue use asic type to check
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +4 -1
@@ -1334,7 +1334,10 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)return r; } - r =amdgpu_discovery_set_mm_ip_blocks (adev); +if (adev->asic_type ==CHIP_SIENNA_CICHLID &&amdgpu_sriov_vf (adev)) + r =amdgpu_device_ip_block_add (adev, &vcn_v3_0_ip_block); +else + r =amdgpu_discovery_set_mm_ip_blocks (adev);if (r)return r;
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +6 -0
@@ -86,6 +86,10 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)for (i =0 ; i < adev->vcn.num_vcn_inst; i++)atomic_set (&adev->vcn.inst[i].dpg_enc_submission_cnt,0 ); +if (adev->asic_type ==CHIP_SIENNA_CICHLID &&amdgpu_sriov_vf (adev)) { + fw_name =FIRMWARE_SIENNA_CICHLID ; + goto next; + }switch (adev->ip_versions[UVD_HWIP ][0 ]) {case IP_VERSION (1 ,0 ,0 ):case IP_VERSION (1 ,0 ,1 ):
@@ -168,6 +172,8 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)return -EINVAL ; } +next: + r =request_firmware (&adev->vcn.fw, fw_name, adev->dev);if (r) { dev_err(adev->dev, "amdgpu_vcn: Can't load firmware \"%s\"\n",
--
2.17.1
[Public]
Hi Guchun,
Per Alex's suggestion, we would better add a check for new vcn0 IP version, which is a version only owned by sriov and a way that I originally did, how do you think?
Thanks,
Jane
From: Deucher, Alexander <[email protected]>
Sent: Tuesday, November 23, 2021 11:03 PM
To: Jian, Jane <[email protected]>; [email protected]; Chen, Guchun <[email protected]>; Chen, JingWen <[email protected]>
Subject: Re: [PATCH] drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID
[Public]
Can we just add a check for the new IP version in that case? This looks really hacky.
Alex
________________________________
From: Jane Jian <[email protected]<mailto:[email protected]>>
Sent: Tuesday, November 23, 2021 6:34 AM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>; Deucher, Alexander <[email protected]<mailto:[email protected]>>; Chen, Guchun <[email protected]<mailto:[email protected]>>; Chen, JingWen <[email protected]<mailto:[email protected]>>
Cc: Jian, Jane <[email protected]<mailto:[email protected]>>
Subject: [PATCH] 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]
skip ip revision match case and continue use asic type to check
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +4 -1
@@ -1334,7 +1334,10 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)return r; } - r =amdgpu_discovery_set_mm_ip_blocks (adev); +if (adev->asic_type ==CHIP_SIENNA_CICHLID &&amdgpu_sriov_vf (adev)) + r =amdgpu_device_ip_block_add (adev, &vcn_v3_0_ip_block); +else + r =amdgpu_discovery_set_mm_ip_blocks (adev);if (r)return r;
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +6 -0
@@ -86,6 +86,10 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)for (i =0 ; i < adev->vcn.num_vcn_inst; i++)atomic_set (&adev->vcn.inst[i].dpg_enc_submission_cnt,0 ); +if (adev->asic_type ==CHIP_SIENNA_CICHLID &&amdgpu_sriov_vf (adev)) { + fw_name =FIRMWARE_SIENNA_CICHLID ; + goto next; + }switch (adev->ip_versions[UVD_HWIP ][0 ]) {case IP_VERSION (1 ,0 ,0 ):case IP_VERSION (1 ,0 ,1 ):
@@ -168,6 +172,8 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)return -EINVAL ; } +next: + r =request_firmware (&adev->vcn.fw, fw_name, adev->dev);if (r) { dev_err(adev->dev, "amdgpu_vcn: Can't load firmware \"%s\"\n",
--
2.17.1
[Public]
Hi Jane/Alex,
Adding a check of new IP in this case looks good to me.
Regards,
Guchun
From: Jian, Jane <[email protected]>
Sent: Wednesday, November 24, 2021 10:54 AM
To: Deucher, Alexander <[email protected]>; Chen, Guchun <[email protected]>; Chen, JingWen <[email protected]>
Cc: [email protected]
Subject: RE: [PATCH] drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID
[Public]
Hi Guchun,
Per Alex's suggestion, we would better add a check for new vcn0 IP version, which is a version only owned by sriov and a way that I originally did, how do you think?
Thanks,
Jane
From: Deucher, Alexander <[email protected]<mailto:[email protected]>>
Sent: Tuesday, November 23, 2021 11:03 PM
To: Jian, Jane <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]>; Chen, Guchun <[email protected]<mailto:[email protected]>>; Chen, JingWen <[email protected]<mailto:[email protected]>>
Subject: Re: [PATCH] drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID
[Public]
Can we just add a check for the new IP version in that case? This looks really hacky.
Alex
________________________________
From: Jane Jian <[email protected]<mailto:[email protected]>>
Sent: Tuesday, November 23, 2021 6:34 AM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>; Deucher, Alexander <[email protected]<mailto:[email protected]>>; Chen, Guchun <[email protected]<mailto:[email protected]>>; Chen, JingWen <[email protected]<mailto:[email protected]>>
Cc: Jian, Jane <[email protected]<mailto:[email protected]>>
Subject: [PATCH] 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]
skip ip revision match case and continue use asic type to check
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +4 -1
@@ -1334,7 +1334,10 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)return r; } - r =amdgpu_discovery_set_mm_ip_blocks (adev); +if (adev->asic_type ==CHIP_SIENNA_CICHLID &&amdgpu_sriov_vf (adev)) + r =amdgpu_device_ip_block_add (adev, &vcn_v3_0_ip_block); +else + r =amdgpu_discovery_set_mm_ip_blocks (adev);if (r)return r;
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +6 -0
@@ -86,6 +86,10 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)for (i =0 ; i < adev->vcn.num_vcn_inst; i++)atomic_set (&adev->vcn.inst[i].dpg_enc_submission_cnt,0 ); +if (adev->asic_type ==CHIP_SIENNA_CICHLID &&amdgpu_sriov_vf (adev)) { + fw_name =FIRMWARE_SIENNA_CICHLID ; + goto next; + }switch (adev->ip_versions[UVD_HWIP ][0 ]) {case IP_VERSION (1 ,0 ,0 ):case IP_VERSION (1 ,0 ,1 ):
@@ -168,6 +172,8 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)return -EINVAL ; } +next: + r =request_firmware (&adev->vcn.fw, fw_name, adev->dev);if (r) { dev_err(adev->dev, "amdgpu_vcn: Can't load firmware \"%s\"\n",
--
2.17.1