All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Cc: Dikshita Agarwal <dikshita@codeaurora.org>,
	Vikash Garodia <vgarodia@codeaurora.org>,
	Stanimir Varbanov <stanimir.varbanov@linaro.org>
Subject: [PATCH 07/13] venus: hfi_plat: Add platform ops for getting number of VPP pipes
Date: Thu, 27 Aug 2020 12:24:11 +0300	[thread overview]
Message-ID: <20200827092417.16040-8-stanimir.varbanov@linaro.org> (raw)
In-Reply-To: <20200827092417.16040-1-stanimir.varbanov@linaro.org>

Starting from v6 we have one more hfi property which will be needed
to calculate buffer sizes/count for particular codec and session type.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
---
 drivers/media/platform/qcom/venus/hfi_platform.c | 14 ++++++++++++++
 drivers/media/platform/qcom/venus/hfi_platform.h |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/drivers/media/platform/qcom/venus/hfi_platform.c b/drivers/media/platform/qcom/venus/hfi_platform.c
index 65559cae21aa..06f46900cae8 100644
--- a/drivers/media/platform/qcom/venus/hfi_platform.c
+++ b/drivers/media/platform/qcom/venus/hfi_platform.c
@@ -47,3 +47,17 @@ hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec, u32 session
 
 	return freq;
 }
+
+u8 hfi_platform_num_vpp_pipes(enum hfi_version version)
+{
+	const struct hfi_platform *plat;
+
+	plat = hfi_platform_get(version);
+	if (!plat)
+		return 0;
+
+	if (plat->num_vpp_pipes)
+		return plat->num_vpp_pipes();
+
+	return 0;
+}
diff --git a/drivers/media/platform/qcom/venus/hfi_platform.h b/drivers/media/platform/qcom/venus/hfi_platform.h
index 8084d092d5d1..f2a6512b3950 100644
--- a/drivers/media/platform/qcom/venus/hfi_platform.h
+++ b/drivers/media/platform/qcom/venus/hfi_platform.h
@@ -48,6 +48,7 @@ struct hfi_platform {
 	unsigned long (*codec_vsp_freq)(u32 session_type, u32 codec);
 	void (*codecs)(u32 *enc_codecs, u32 *dec_codecs, u32 *count);
 	const struct hfi_plat_caps *(*capabilities)(unsigned int *entries);
+	u8 (*num_vpp_pipes)(void);
 };
 
 extern const struct hfi_platform hfi_plat_v4;
@@ -57,4 +58,5 @@ unsigned long hfi_platform_get_codec_vpp_freq(enum hfi_version version, u32 code
 					      u32 session_type);
 unsigned long hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec,
 					      u32 session_type);
+u8 hfi_platform_num_vpp_pipes(enum hfi_version version);
 #endif
-- 
2.17.1


  parent reply	other threads:[~2020-08-27  9:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27  9:24 [PATCH 00/13] Introduce new hfi platform layer Stanimir Varbanov
2020-08-27  9:24 ` [PATCH 01/13] venus: Delete not used core caps Stanimir Varbanov
2020-08-27  9:24 ` [PATCH 02/13] venus: Add more capabilities and VP9 profile/levels Stanimir Varbanov
2020-08-27  9:24 ` [PATCH 03/13] venus: Create hfi platform and move vpp/vsp there Stanimir Varbanov
2020-08-27  9:24 ` [PATCH 04/13] venus: Rename venus_caps to hfi_plat_caps Stanimir Varbanov
2020-08-27  9:24 ` [PATCH 05/13] venus: hfi_plat: Add codecs and capabilities ops Stanimir Varbanov
2020-08-27  9:24 ` [PATCH 06/13] venus: hfi_plat_v4: Populate codecs and capabilities for v4 Stanimir Varbanov
2020-08-27  9:24 ` Stanimir Varbanov [this message]
2020-08-27  9:24 ` [PATCH 08/13] venus: hfi_plat_v6: Populate capabilities for v6 Stanimir Varbanov
2020-08-27  9:24 ` [PATCH 09/13] venus: hfi_plat: Add hfi platform buffers ops Stanimir Varbanov
2020-08-27  9:24 ` [PATCH 10/13] venus: Add platform buffers for v6 Stanimir Varbanov
2020-08-27  9:24 ` [PATCH 11/13] venus: Get codecs and capabilities from hfi platform Stanimir Varbanov
2020-08-27  9:24 ` [PATCH 12/13] venus: vdec,core: Handle picture structure event Stanimir Varbanov
2020-08-27  9:24 ` [PATCH 13/13] venus: helpers: Wire up hfi platform buffer requirements 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=20200827092417.16040-8-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=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.