minigbm: Fix 10bit protected allocations on MTK

There was another change done after this was tested before which then
was setting the size before the calculation was done to handle the
10-bit case. We now fix that size after doing the 10-bit modification.

BUG=b:367770932
TEST=None

Change-Id: Id5410f802c9140d378217fbf7b33f1d467ebf5ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5967833
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Auto-Submit: Jeffrey Kardatzke <jkardatzke@google.com>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Jeffrey Kardatzke <jkardatzke@google.com>
This commit is contained in:
Jeffrey Kardatzke 2024-10-25 12:43:43 -07:00 committed by Chromeos LUCI
parent 93e16b9029
commit ff04d4aa48

View file

@ -387,6 +387,7 @@ static int mediatek_bo_create_with_modifiers(struct bo *bo, uint32_t width, uint
bo->meta.sizes[1] = bo->meta.sizes[1] * 10 / 16;
bo->meta.offsets[1] = bo->meta.sizes[0];
bo->meta.total_size = bo->meta.total_size * 10 / 16;
heap_data.len = bo->meta.total_size;
}
if (priv->dma_heap_fd < 0) {