<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 20, 2023 at 1:38 PM Alex Deucher <<a href="mailto:alexander.deucher@amd.com" target="_blank">alexander.deucher@amd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Add UAPI to query the GFX shadow buffer requirements<br>
for preemption on GFX11. UMDs need to specify the shadow<br>
areas for preemption.<br>
<br>
Signed-off-by: Alex Deucher <<a href="mailto:alexander.deucher@amd.com" target="_blank">alexander.deucher@amd.com</a>><br>
---<br>
include/uapi/drm/amdgpu_drm.h | 10 ++++++++++<br>
1 file changed, 10 insertions(+)<br>
<br>
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h<br>
index 3d9474af6566..19a806145371 100644<br>
--- a/include/uapi/drm/amdgpu_drm.h<br>
+++ b/include/uapi/drm/amdgpu_drm.h<br>
@@ -886,6 +886,7 @@ struct drm_amdgpu_cs_chunk_cp_gfx_shadow {<br>
#define AMDGPU_INFO_VIDEO_CAPS_DECODE 0<br>
/* Subquery id: Encode */<br>
#define AMDGPU_INFO_VIDEO_CAPS_ENCODE 1<br>
+#define AMDGPU_INFO_CP_GFX_SHADOW_SIZE 0x22<br></blockquote><div><br></div><div>Can you put this into the device structure instead? Let's minimize the number of kernel queries as much as possible.<br></div><div><br></div><div>Thanks,</div><div>Marek</div><br></div></div>