From e240cda12820b9767205339fd87df97295e35b9b Mon Sep 17 00:00:00 2001 From: Yogesh Mohan Marimuthu Date: Sat, 9 Dec 2023 17:08:34 +0530 Subject: [PATCH] winsys/amdgpu: move 125% comment to correct line of code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák 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 3f1274c1b7e..bac52d58287 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c @@ -1228,7 +1228,6 @@ static bool amdgpu_cs_check_space(struct radeon_cmdbuf *rcs, unsigned dw) assert(rcs->current.cdw <= rcs->current.max_dw); - /* 125% of the size for IB epilog. */ unsigned requested_size_dw = rcs->prev_dw + rcs->current.cdw + dw; if (requested_size_dw > IB_MAX_SUBMIT_DWORDS) @@ -1239,6 +1238,7 @@ static bool amdgpu_cs_check_space(struct radeon_cmdbuf *rcs, unsigned dw) unsigned cs_epilog_dw = amdgpu_cs_epilog_dws(cs); unsigned need_byte_size = (dw + cs_epilog_dw) * 4; + /* 125% of the size for IB epilog. */ unsigned safe_byte_size = need_byte_size + need_byte_size / 4; main_ib->max_check_space_size = MAX2(main_ib->max_check_space_size, safe_byte_size); main_ib->max_ib_size_dw = MAX2(main_ib->max_ib_size_dw, requested_size_dw);