[PATCH v5 6/7] media: venus: helpers: update NUM_MBS macro calculation

From: Stanimir Varbanov
Date: Tue Oct 05 2021 - 04:11:29 EST


From: Dikshita Agarwal <dikshita@xxxxxxxxxxxxxx>

Consider alignment while calculating NUM_MBS.

Co-developed-by: Mansur Alisha Shaik <mansur@xxxxxxxxxxxxxx>
Signed-off-by: Mansur Alisha Shaik <mansur@xxxxxxxxxxxxxx>
Signed-off-by: Dikshita Agarwal <dikshita@xxxxxxxxxxxxxx>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@xxxxxxxxxx>
---
Dropped changes in the patch which are not related to it

drivers/media/platform/qcom/venus/helpers.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index 1f46a6f4456a..196a24892176 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -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;
--
2.25.1