From 8211635c44c7b3e6ad1e7036908218ef0d4d9342 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 29 Sep 2023 20:30:23 -0400 Subject: [PATCH] winsys/amdgpu: don't send CP_GFX_SHADOW chunk if shadow address is not set Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c index fc7e3aa..c447843 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c @@ -1686,7 +1686,7 @@ static void amdgpu_cs_submit_ib(void *job, void *gdata, int thread_index) num_chunks++; } - if (ws->info.has_fw_based_shadowing) { + if (ws->info.has_fw_based_shadowing && acs->mcbp_fw_shadow_chunk.shadow_va) { chunks[num_chunks].chunk_id = AMDGPU_CHUNK_ID_CP_GFX_SHADOW; chunks[num_chunks].length_dw = sizeof(struct drm_amdgpu_cs_chunk_cp_gfx_shadow) / 4; chunks[num_chunks].chunk_data = (uintptr_t)&acs->mcbp_fw_shadow_chunk; -- 2.7.4