diff options
author | Stanimir Varbanov <stanimir.varbanov@linaro.org> | 2020-11-11 15:37:51 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-01-13 09:08:53 +0100 |
commit | ddd1fc49b60822b29d476564a4b8509565cc51ab (patch) | |
tree | cb3c7828569ac89e64891ae5f7809e011dd235f7 /drivers/media/platform/qcom/venus | |
parent | e922a33e0228fa314ffc4f70b3b9ffbc4aad1bbe (diff) | |
download | linux-ddd1fc49b60822b29d476564a4b8509565cc51ab.tar.gz |
media: venus: helpers: Calculate properly compressed buffer size
For resolutions below 720p the size of the compressed buffer must
be bigger. Correct this by checking the resolution when calculating
buffer size and multiply by eight.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/qcom/venus')
-rw-r--r-- | drivers/media/platform/qcom/venus/helpers.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index c2a82cf43361..11f35e36149b 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -986,6 +986,8 @@ u32 venus_helper_get_framesz(u32 v4l2_fmt, u32 width, u32 height) if (compressed) { sz = ALIGN(height, 32) * ALIGN(width, 32) * 3 / 2 / 2; + if (width < 1280 || height < 720) + sz *= 8; return ALIGN(sz, SZ_4K); } |