Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: venus: helpers: fix dynamic buffer mode for v4

Venus v4 doesn't send ALLOC_MODE property and thus parser doesn't
recognize it as dynamic buffer (for OUTPUT/OUTPUT2 type of buffers)
make it obvious in the helper function.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

authored by

Stanimir Varbanov and committed by
Mauro Carvalho Chehab
bc8c479a 3d7f0d71

+7
+7
drivers/media/platform/qcom/venus/helpers.c
··· 467 467 struct venus_core *core = inst->core; 468 468 struct venus_caps *caps; 469 469 470 + /* 471 + * v4 doesn't send BUFFER_ALLOC_MODE_SUPPORTED property and supports 472 + * dynamic buffer mode by default for HFI_BUFFER_OUTPUT/OUTPUT2. 473 + */ 474 + if (IS_V4(core)) 475 + return true; 476 + 470 477 caps = venus_caps_by_codec(core, inst->hfi_codec, inst->session_type); 471 478 if (!caps) 472 479 return false;