media: venus: helpers: update NUM_MBS macro calculation
authorDikshita Agarwal <dikshita@codeaurora.org>
Tue, 10 Aug 2021 09:47:54 +0000 (11:47 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 8 Oct 2021 09:26:14 +0000 (11:26 +0200)
Consider alignment while calculating NUM_MBS.

Co-developed-by: Mansur Alisha Shaik <mansur@codeaurora.org>
Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org>
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/qcom/venus/helpers.c

index 1f46a6f4456aba95b741cccc51eb4947e87d234d..196a24892176886a88b505edadaa7944e5bf6a44 100644 (file)
@@ -18,8 +18,8 @@
 #include "hfi_platform.h"
 #include "hfi_parser.h"
 
-#define NUM_MBS_720P   (((1280 + 15) >> 4) * ((720 + 15) >> 4))
-#define NUM_MBS_4K     (((4096 + 15) >> 4) * ((2304 + 15) >> 4))
+#define NUM_MBS_720P   (((ALIGN(1280, 16)) >> 4) * ((ALIGN(736, 16)) >> 4))
+#define NUM_MBS_4K     (((ALIGN(4096, 16)) >> 4) * ((ALIGN(2304, 16)) >> 4))
 
 struct intbuf {
        struct list_head list;