<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:#317100;margin:15pt;" align="Left">
[AMD Public Use]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Acked-by: Alex Deucher <alexander.deucher@amd.com><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> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Jack Zhang <Jack.Zhang1@amd.com><br>
<b>Sent:</b> Monday, July 13, 2020 10:45 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Zhang, Jack (Jian) <Jack.Zhang1@amd.com>; Liu, Leo <Leo.Liu@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com><br>
<b>Subject:</b> [PATCH 1/5] drm/amd/sriov skip jped ip block and close pgcg flags</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">For SIENNA_CICHLID SRIOV, jpeg and pgcp is not supported.<br>
<br>
Signed-off-by: Jack Zhang <Jack.Zhang1@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/nv.c | 12 ++++++++++--<br>
 1 file changed, 10 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c<br>
index a7cfe3ac7cb6..7f34a2f25700 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/nv.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c<br>
@@ -504,7 +504,9 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)<br>
                 amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);<br>
                 amdgpu_device_ip_block_add(adev, &sdma_v5_2_ip_block);<br>
                 amdgpu_device_ip_block_add(adev, &vcn_v3_0_ip_block);<br>
-               amdgpu_device_ip_block_add(adev, &jpeg_v3_0_ip_block);<br>
+               if (!amdgpu_sriov_vf(adev))<br>
+                       amdgpu_device_ip_block_add(adev, &jpeg_v3_0_ip_block);<br>
+<br>
                 if (adev->enable_mes)<br>
                         amdgpu_device_ip_block_add(adev, &mes_v10_1_ip_block);<br>
                 break;<br>
@@ -732,7 +734,13 @@ static int nv_common_early_init(void *handle)<br>
                 adev->pg_flags = AMD_PG_SUPPORT_VCN |<br>
                         AMD_PG_SUPPORT_VCN_DPG |<br>
                         AMD_PG_SUPPORT_JPEG |<br>
-                       AMD_PG_SUPPORT_ATHUB;<br>
+                       AMD_PG_SUPPORT_ATHUB |<br>
+                       AMD_PG_SUPPORT_MMHUB;<br>
+               if (amdgpu_sriov_vf(adev)) {<br>
+                       /* hypervisor control CG and PG enablement */<br>
+                       adev->cg_flags = 0;<br>
+                       adev->pg_flags = 0;<br>
+               }<br>
                 adev->external_rev_id = adev->rev_id + 0x28;<br>
                 break;<br>
         default:<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Calexander.deucher%40amd.com%7C78d9223013c74c21b2c708d827a01820%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637302915854056774&amp;sdata=Z6SAzQ%2FKFcyJb%2FLPN3iUIBnqyacMeWG8Pjnu2LfioW8%3D&amp;reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Calexander.deucher%40amd.com%7C78d9223013c74c21b2c708d827a01820%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637302915854056774&amp;sdata=Z6SAzQ%2FKFcyJb%2FLPN3iUIBnqyacMeWG8Pjnu2LfioW8%3D&amp;reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>