<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#008000;margin:15pt;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Can we just add a check for the new IP version in that case? This looks really hacky.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Alex</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Jane Jian <Jane.Jian@amd.com><br>
<b>Sent:</b> Tuesday, November 23, 2021 6:34 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>; Chen, Guchun <Guchun.Chen@amd.com>; Chen, JingWen <JingWen.Chen2@amd.com><br>
<b>Cc:</b> Jian, Jane <Jane.Jian@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu/sriov/vcn: skip ip revision check case to ip init for SIENNA_CICHLID</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">[WHY]<br>
for sriov odd# vf will modify vcn0 engine ip revision(due to multimedia bandwidth feature),<br>
which will be mismatched with original vcn0 revision<br>
<br>
[HOW]<br>
skip ip revision match case and continue use asic type to check<br>
<br>
Signed-off-by: Jane Jian <Jane.Jian@amd.com><br>
Change-Id: I1ace32acbf3a13c0baac958508da1324ec387a58<br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 ++++-<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 6 ++++++<br>
2 files changed, 10 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
index 4e3669407518..0a91e53f520c 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
@@ -1334,7 +1334,10 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)<br>
return r;<br>
}<br>
<br>
- r = amdgpu_discovery_set_mm_ip_blocks(adev);<br>
+ if (adev->asic_type == CHIP_SIENNA_CICHLID && amdgpu_sriov_vf(adev))<br>
+ r = amdgpu_device_ip_block_add(adev, &vcn_v3_0_ip_block);<br>
+ else<br>
+ r = amdgpu_discovery_set_mm_ip_blocks(adev);<br>
if (r)<br>
return r;<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c<br>
index 4f7c70845785..87f56b61be53 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c<br>
@@ -86,6 +86,10 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)<br>
for (i = 0; i < adev->vcn.num_vcn_inst; i++)<br>
atomic_set(&adev->vcn.inst[i].dpg_enc_submission_cnt, 0);<br>
<br>
+ if (adev->asic_type == CHIP_SIENNA_CICHLID && amdgpu_sriov_vf(adev)) {<br>
+ fw_name = FIRMWARE_SIENNA_CICHLID;<br>
+ goto next;<br>
+ }<br>
switch (adev->ip_versions[UVD_HWIP][0]) {<br>
case IP_VERSION(1, 0, 0):<br>
case IP_VERSION(1, 0, 1):<br>
@@ -168,6 +172,8 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)<br>
return -EINVAL;<br>
}<br>
<br>
+next:<br>
+<br>
r = request_firmware(&adev->vcn.fw, fw_name, adev->dev);<br>
if (r) {<br>
dev_err(adev->dev, "amdgpu_vcn: Can't load firmware \"%s\"\n",<br>
-- <br>
2.17.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>