[PATCH 1/2] drm/xe: Simplify batch buffer allocation in emit_wa_job()
Tvrtko Ursulin
tvrtko.ursulin at igalia.com
Fri Jun 27 13:14:37 UTC 2025
Code just needs a large enough buffer and it doesn't even check. Lets
therefore simplify to one allocation path which is guaranteed to be as
least as big as the current ones.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at igalia.com>
---
drivers/gpu/drm/xe/xe_gt.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index d397df056e4c..86018fee74d3 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -190,13 +190,8 @@ static int emit_wa_job(struct xe_gt *gt, struct xe_exec_queue *q)
int count_rmw = 0;
int count = 0;
- if (q->hwe->class == XE_ENGINE_CLASS_RENDER)
- /* Big enough to emit all of the context's 3DSTATE */
- bb = xe_bb_new(gt, xe_gt_lrc_size(gt, q->hwe->class), false);
- else
- /* Just pick a large BB size */
- bb = xe_bb_new(gt, SZ_4K, false);
-
+ /* Just pick a large BB size */
+ bb = xe_bb_new(gt, xe_gt_lrc_size(gt, q->hwe->class), false);
if (IS_ERR(bb))
return PTR_ERR(bb);
--
2.48.0
More information about the Intel-xe
mailing list