diff mbox series

[1/3] media: venus: core: Set up secure memory ranges for SC7280

Message ID 20230929-sc7280-venus-pas-v1-1-9c6738cf157a@fairphone.com (mailing list archive)
State Superseded
Headers show
Series Enable venus on Fairphone 5 / non-ChromeOS sc7280 venus support | expand

Commit Message

Luca Weiss Sept. 29, 2023, 8:38 a.m. UTC
Not all SC7280 devices ship with ChromeOS firmware. Other devices need
PAS for image authentication. That requires the predefined virtual
address ranges to be passed via scm calls. Define them to enable Venus
on non-CrOS SC7280 devices.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
 drivers/media/platform/qcom/venus/core.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Bryan O'Donoghue Sept. 29, 2023, 8:41 a.m. UTC | #1
On 29/09/2023 09:38, Luca Weiss wrote:
> Not all SC7280 devices ship with ChromeOS firmware. Other devices need
> PAS for image authentication. That requires the predefined virtual
> address ranges to be passed via scm calls. Define them to enable Venus
> on non-CrOS SC7280 devices.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
>   drivers/media/platform/qcom/venus/core.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index 054b8e74ba4f..5c6baa0f4d45 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -881,6 +881,10 @@ static const struct venus_resources sc7280_res = {
>   	.vmem_size = 0,
>   	.vmem_addr = 0,
>   	.dma_mask = 0xe0000000 - 1,
> +	.cp_start = 0,
> +	.cp_size = 0x25800000,
> +	.cp_nonpixel_start = 0x1000000,
> +	.cp_nonpixel_size = 0x24800000,
>   	.fwname = "qcom/vpu-2.0/venus.mbn",
>   };
>   
> 
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Konrad Dybcio Sept. 29, 2023, 11:37 a.m. UTC | #2
On 29.09.2023 10:38, Luca Weiss wrote:
> Not all SC7280 devices ship with ChromeOS firmware. Other devices need
> PAS for image authentication. That requires the predefined virtual
> address ranges to be passed via scm calls. Define them to enable Venus
> on non-CrOS SC7280 devices.
> 
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
The media tree (or at least venus) moves quite slugglishly..

But looks like applying just the DT patches (which I expect to get
in first) results in a non-platform-killing:

[   25.851120] qcom-venus aa00000.video-codec: Adding to iommu group 11
[   25.851618] qcom-venus aa00000.video-codec: non legacy binding
[   25.916562] qcom-venus aa00000.video-codec: invalid setting for UC_REGION
[   25.916569] qcom-venus aa00000.video-codec: failed to reset venus core
[   25.919000] qcom-venus: probe of aa00000.video-codec failed with error -22

So it should be okay either way.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad
diff mbox series

Patch

diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 054b8e74ba4f..5c6baa0f4d45 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -881,6 +881,10 @@  static const struct venus_resources sc7280_res = {
 	.vmem_size = 0,
 	.vmem_addr = 0,
 	.dma_mask = 0xe0000000 - 1,
+	.cp_start = 0,
+	.cp_size = 0x25800000,
+	.cp_nonpixel_start = 0x1000000,
+	.cp_nonpixel_size = 0x24800000,
 	.fwname = "qcom/vpu-2.0/venus.mbn",
 };