gbm_mesa: Add constraints for hardware video decoder & encoder

Change-Id: I41d2987b30f7a54b481cabb8be8ddab5c68eff63
This commit is contained in:
Konsta 2023-01-07 19:17:11 +02:00 committed by Brendan Szymanski
parent 5e001f8239
commit bd1b4e1aea

View file

@ -371,6 +371,14 @@ int gbm_mesa_bo_create(struct bo *bo, uint32_t width, uint32_t height, uint32_t
size_align = 4096;
}
/* Raspberry Pi hardware decoder/encoder */
if (use_flags & (BO_USE_HW_VIDEO_DECODER | BO_USE_HW_VIDEO_ENCODER)) {
scanout_strong = true;
alloc_args.use_scanout = true;
alloc_args.width = ALIGN(alloc_args.width, 32);
size_align = 4096;
}
if (alloc_args.drm_format == 0) {
/* Always use linear for spoofed format allocations. */
drv_bo_from_format(bo, alloc_args.width, 1, alloc_args.height, format);