linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	vgarodia@codeaurora.org,
	Dikshita Agarwal <dikshita@codeaurora.org>,
	Mansur Alisha Shaik <mansur@codeaurora.org>,
	Stanimir Varbanov <stanimir.varbanov@linaro.org>
Subject: [PATCH v5 6/7] media: venus: helpers: update NUM_MBS macro calculation
Date: Tue,  5 Oct 2021 11:10:47 +0300	[thread overview]
Message-ID: <20211005081048.3095252-7-stanimir.varbanov@linaro.org> (raw)
In-Reply-To: <20211005081048.3095252-1-stanimir.varbanov@linaro.org>

From: Dikshita Agarwal <dikshita@codeaurora.org>

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>
---
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


  parent reply	other threads:[~2021-10-05  8:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05  8:10 [PATCH v5 0/7] media: venus: Enable venus support on sc7280 Stanimir Varbanov
2021-10-05  8:10 ` [PATCH v5 1/7] venus: firmware: enable no tz fw loading for sc7280 Stanimir Varbanov
2021-10-05  8:10 ` [PATCH v5 2/7] media: venus: core: Add sc7280 DT compatible and resource data Stanimir Varbanov
2021-10-05  8:10 ` [PATCH v5 3/7] media: venus: Add num_vpp_pipes to resource structure Stanimir Varbanov
2021-10-05  8:10 ` [PATCH v5 4/7] media: venus: hfi: Skip AON register programming for V6 1pipe Stanimir Varbanov
2021-10-05  8:10 ` [PATCH v5 5/7] venus: vdec: set work route to fw Stanimir Varbanov
2021-10-05  8:10 ` Stanimir Varbanov [this message]
2021-10-05  8:10 ` [PATCH v5 7/7] media: venus: Set buffer to FW based on FW min count requirement Stanimir Varbanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211005081048.3095252-7-stanimir.varbanov@linaro.org \
    --to=stanimir.varbanov@linaro.org \
    --cc=dikshita@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mansur@codeaurora.org \
    --cc=vgarodia@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).