<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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:#0000FF;margin:5pt;" align="Left">
[AMD Official Use Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> dri-devel <dri-devel-bounces@lists.freedesktop.org> on behalf of Pan, Xinhui <Xinhui.Pan@amd.com><br>
<b>Sent:</b> Monday, September 6, 2021 9:10 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org><br>
<b>Cc:</b> Koenig, Christian <Christian.Koenig@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; chenli@uniontech.com <chenli@uniontech.com><br>
<b>Subject:</b> [PATCH v2 2/2] drm/amdpgu: Use VRAM domain in UVD IB test</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">[AMD Official Use Only]<br>
<br>
[AMD Official Use Only]<br>
<br>
Like vce/vcn does, visible VRAM is OK for ib test.<br>
While commit a11d9ff3ebe0 ("drm/amdgpu: use GTT for<br>
uvd_get_create/destory_msg") says VRAM is not mapped correctly in his<br>
platform which is likely an arm64.<br>
<br>
So lets change back to use VRAM on x86_64 platform.<br>
<br>
Signed-off-by: xinhui pan <xinhui.pan@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 8 ++++++++<br>
 1 file changed, 8 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c<br>
index d451c359606a..e4b75f33ccc8 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c<br>
@@ -1178,7 +1178,11 @@ int amdgpu_uvd_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,<br>
        int r, i;<br>
<br>
        r = amdgpu_bo_create_reserved(adev, 1024, PAGE_SIZE,<br>
+#ifdef CONFIG_X86_64</div>
<div class="PlainText">[kevin]:</div>
<div class="PlainText">It's better to replace this with macro of <b>CONFIG_64BIT</b> to cover more cases,</div>
<div class="PlainText">do you think it is ok ?</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">Best Regards,</div>
<div class="PlainText">Kevin</div>
<div class="PlainText"><br>
<span></span>+                                     AMDGPU_GEM_DOMAIN_VRAM,<br>
+#else<br>
                                      AMDGPU_GEM_DOMAIN_GTT,<br>
+#endif<br>
                                      &bo, NULL, (void **)&msg);<br>
        if (r)<br>
                return r;<br>
@@ -1210,7 +1214,11 @@ int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,<br>
        int r, i;<br>
<br>
        r = amdgpu_bo_create_reserved(adev, 1024, PAGE_SIZE,<br>
+#ifdef CONFIG_X86_64<br>
+                                     AMDGPU_GEM_DOMAIN_VRAM,<br>
+#else<br>
                                      AMDGPU_GEM_DOMAIN_GTT,<br>
+#endif<br>
                                      &bo, NULL, (void **)&msg);<br>
        if (r)<br>
                return r;<br>
--<br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>