From 06197643c1026dc7e3adb58d41b09f78cb34a83b Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 16 Apr 2026 16:13:52 +0200 Subject: [PATCH] pan/lib: emit high bits of buffer-size We can't expose large texel-buffers if we don't emit the high bits. Whoopsie! Fixes: 4db7958edc4 ("pan/bi: Change texel buffer limits") Reviewed-by: Boris Brezillon Reviewed-by: Lars-Ivar Hesselberg Simonsen (cherry picked from commit 57a80ff78cc3f5532ba01e6a1e194544bf207e75) Part-of: --- .pick_status.json | 2 +- src/panfrost/lib/pan_texture.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 558fbcb28e8..ea3c31f3c47 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4204,7 +4204,7 @@ "description": "pan/lib: emit high bits of buffer-size", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "4db7958edc4145acc7777534c1454bc300dea8be", "notes": null diff --git a/src/panfrost/lib/pan_texture.c b/src/panfrost/lib/pan_texture.c index e4c0988978d..68b291eeb34 100644 --- a/src/panfrost/lib/pan_texture.c +++ b/src/panfrost/lib/pan_texture.c @@ -1321,10 +1321,19 @@ GENX(pan_buffer_texture_emit)(const struct pan_buffer_view *bview, .raw = false, }; + uint64_t buffer_size = bview->width_el * stride; + pan_pack(out, BUFFER, cfg) { cfg.type = MALI_DESCRIPTOR_TYPE_BUFFER; cfg.buffer_type = MALI_BUFFER_TYPE_STRUCTURE; - cfg.size = bview->width_el * stride; + +#if PAN_ARCH >= 11 + cfg.size = buffer_size & BITFIELD_MASK(32); + cfg.size_hi = buffer_size >> 32; +#else + cfg.size = buffer_size; +#endif + cfg.address = bview->base; cfg.stride = stride; cfg.conversion = conv;