All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: stanimir.varbanov@linaro.org, agross@kernel.org,
	bjorn.andersson@linaro.org, mchehab@kernel.org,
	linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org
Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org,
	jonathan@marek.ca, vgarodia@codeaurora.org,
	Dikshita Agarwal <dikshita@qti.qualcomm.com>
Subject: [PATCH v3 15/25] media: venus: hfi, vdec: v6 Add IS_V6() to existing IS_V4() if locations
Date: Fri,  2 Apr 2021 11:06:38 +0100	[thread overview]
Message-ID: <20210402100648.1815854-16-bryan.odonoghue@linaro.org> (raw)
In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org>

In various places in the venus codebase we have if (IS_V4()) which takes
the code down paths for 4xx silicon. This logic is broadly applicable to
6xx silicon also. In this patch we add IS_V6() to various IS_V4() decision
locations.

Co-developed-by: Dikshita Agarwal <dikshita@qti.qualcomm.com>
Signed-off-by: Dikshita Agarwal <dikshita@qti.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
---
 drivers/media/platform/qcom/venus/helpers.c   | 5 ++---
 drivers/media/platform/qcom/venus/hfi_venus.c | 4 ++--
 drivers/media/platform/qcom/venus/vdec.c      | 6 +++---
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index 76ece2ff8d39..2515a2225614 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -488,7 +488,7 @@ static bool is_dynamic_bufmode(struct venus_inst *inst)
 	 * v4 doesn't send BUFFER_ALLOC_MODE_SUPPORTED property and supports
 	 * dynamic buffer mode by default for HFI_BUFFER_OUTPUT/OUTPUT2.
 	 */
-	if (IS_V4(core))
+	if (IS_V4(core) || IS_V6(core))
 		return true;
 
 	caps = venus_caps_by_codec(core, inst->hfi_codec, inst->session_type);
@@ -1084,11 +1084,10 @@ int venus_helper_set_work_mode(struct venus_inst *inst, u32 mode)
 	const u32 ptype = HFI_PROPERTY_PARAM_WORK_MODE;
 	struct hfi_video_work_mode wm;
 
-	if (!IS_V4(inst->core))
+	if (!IS_V4(inst->core) && !IS_V6(inst->core))
 		return 0;
 
 	wm.video_work_mode = mode;
-
 	return hfi_session_set_property(inst, ptype, &wm);
 }
 EXPORT_SYMBOL_GPL(venus_helper_set_work_mode);
diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
index dabff8654f97..24cf20f76e7f 100644
--- a/drivers/media/platform/qcom/venus/hfi_venus.c
+++ b/drivers/media/platform/qcom/venus/hfi_venus.c
@@ -897,7 +897,7 @@ static int venus_sys_set_default_properties(struct venus_hfi_device *hdev)
 	 * enable it explicitly in order to make suspend functional by checking
 	 * WFI (wait-for-interrupt) bit.
 	 */
-	if (IS_V4(hdev->core))
+	if (IS_V4(hdev->core) || IS_V6(hdev->core))
 		venus_sys_idle_indicator = true;
 
 	ret = venus_sys_set_idle_message(hdev, venus_sys_idle_indicator);
@@ -1577,7 +1577,7 @@ static int venus_suspend_3xx(struct venus_core *core)
 
 static int venus_suspend(struct venus_core *core)
 {
-	if (IS_V3(core) || IS_V4(core))
+	if (IS_V3(core) || IS_V4(core) || IS_V6(core))
 		return venus_suspend_3xx(core);
 
 	return venus_suspend_1xx(core);
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index c20496a14a55..5cefa396f2b5 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -670,8 +670,8 @@ static int vdec_output_conf(struct venus_inst *inst)
 	if (width > 1920 && height > ALIGN(1080, 32))
 		ubwc = true;
 
-	/* For Venus v4 UBWC format is mandatory */
-	if (IS_V4(core))
+	/* For Venus v4/v6 UBWC format is mandatory */
+	if (IS_V4(core) || IS_V6(core))
 		ubwc = true;
 
 	ret = venus_helper_get_out_fmts(inst, inst->fmt_cap->pixfmt, &out_fmt,
@@ -722,7 +722,7 @@ static int vdec_output_conf(struct venus_inst *inst)
 			return ret;
 	}
 
-	if (IS_V3(core) || IS_V4(core)) {
+	if (IS_V3(core) || IS_V4(core) || IS_V6(core)) {
 		ret = venus_helper_get_bufreq(inst, HFI_BUFFER_OUTPUT, &bufreq);
 		if (ret)
 			return ret;
-- 
2.30.1


  parent reply	other threads:[~2021-04-02 10:05 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02 10:06 [PATCH v3 00/25] media: venus: Enable 6xx support Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 01/25] media: venus: Update v6 buffer descriptors Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 02/25] media: venus: core,pm: Add handling for resets Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 03/25] media: venus: core: add sm8250 DT compatible and resource data Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 04/25] media: venus: core: Add io base variables for each block Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 05/25] media: venus: hfi,pm,firmware: Convert to block relative addressing Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 06/25] media: venus: hfi: Define block offsets for V6 hardware Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 07/25] media: venus: hfi: Define additional 6xx registers Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 08/25] media: venus: core: Add differentiator IS_V6(core) Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 09/25] media: venus: core: Add an io base for TZ wrapper regs Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 10/25] media: venus: core: Add an io base for AON regs Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 11/25] media: venus: core: Hook to V6 base registers when appropriate Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 12/25] media: venus: hfi: Add a 6xx boot logic Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 13/25] media: venus: hfi: Add 6xx interrupt support Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 14/25] media: venus: hfi: Read WRAPPER_TZ_CPU_STATUS_V6 on 6xx Bryan O'Donoghue
2021-04-02 10:06 ` Bryan O'Donoghue [this message]
2021-04-02 10:06 ` [PATCH v3 16/25] media: venus: pm: Hook 6xx pm ops into 4xx pm ops Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 17/25] media: venus: core,pm: Vote for min clk freq during venus boot Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 18/25] media: venus: hfi: Add 6xx AXI halt logic Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 19/25] media: venus: pm: Toggle 6xx wrapper power in vcodec_control Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 20/25] media: venus: firmware: Do not toggle WRAPPER_A9SS_SW_RESET on 6xx Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 21/25] media: venus: helpers: Add internal buffer list for v6 Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 22/25] media: venus: helpers, hfi, vdec: Set actual plane constraints to FW Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 23/25] media: venus: hfi: Increase plat_buf_v6 o/p buffer count Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 24/25] media: venus: helper: Decide work mode Bryan O'Donoghue
2021-04-02 10:06 ` [PATCH v3 25/25] media: venus: vdec: Fix decoder cmd STOP issue Bryan O'Donoghue
2021-05-26 19:03 ` [PATCH v3 00/25] media: venus: Enable 6xx support patchwork-bot+linux-arm-msm

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=20210402100648.1815854-16-bryan.odonoghue@linaro.org \
    --to=bryan.odonoghue@linaro.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=dikshita@codeaurora.org \
    --cc=dikshita@qti.qualcomm.com \
    --cc=jonathan@marek.ca \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=stanimir.varbanov@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.