Files
linux/drivers
Boris Brezillon 8e43b1e537 drm/panthor: Fix an off-by-one in the heap context retrieval logic
The heap ID is used to index the heap context pool, and allocating
in the [1:MAX_HEAPS_PER_POOL] leads to an off-by-one. This was
originally to avoid returning a zero heap handle, but given the handle
is formed with (vm_id << 16) | heap_id, with vm_id > 0, we already can't
end up with a valid heap handle that's zero.

v4:
- s/XA_FLAGS_ALLOC1/XA_FLAGS_ALLOC/

v3:
- Allocate in the [0:MAX_HEAPS_PER_POOL-1] range

v2:
- New patch

Fixes: 9cca48fa4f ("drm/panthor: Add the heap logical block")
Reported-by: Eric Smith <eric.smith@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Eric Smith <eric.smith@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240502165158.1458959-5-boris.brezillon@collabora.com
2024-05-13 09:49:22 +02:00
..
2024-04-25 19:25:54 +02:00
2024-03-07 21:52:03 +00:00
2024-02-16 18:51:00 -05:00
2024-03-07 20:37:04 +00:00
2024-02-19 21:23:28 +01:00
2024-03-07 20:32:47 +00:00
2024-04-09 17:01:01 -07:00
2024-03-07 20:32:38 +00:00
2024-02-15 18:12:01 +01:00
2024-02-20 13:36:34 +01:00
2024-04-22 17:07:13 -04:00
2024-04-29 20:22:39 +02:00
2024-02-19 11:10:55 +01:00