media: venus: core: Set up secure memory ranges for SC7180

Message ID 20230616-topic-sc7180_venus_lawp-v1-1-15a8f44d474e@linaro.org
State New
Headers
Series media: venus: core: Set up secure memory ranges for SC7180 |

Commit Message

Konrad Dybcio June 15, 2023, 11:36 p.m. UTC
  Not all SC7180 devices ship with ChromeOS firmware. WoA devices use
Android-like TZ, which uses 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 SC7180 devices.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 drivers/media/platform/qcom/venus/core.c | 4 ++++
 1 file changed, 4 insertions(+)


---
base-commit: 925294c9aa184801cc0a451b69a18dd0fe7d847d
change-id: 20230616-topic-sc7180_venus_lawp-965e5fd18c7a

Best regards,
  

Comments

Nikita Travkin June 16, 2023, 5:31 a.m. UTC | #1
Konrad Dybcio писал(а) 16.06.2023 04:36:
> Not all SC7180 devices ship with ChromeOS firmware. WoA devices use
> Android-like TZ, which uses 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 SC7180 devices.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>

This does indeed bring up the venus for me now. Thanks! 

Tested-by: Nikita Travkin <nikita@trvn.ru> # Aspire 1

> ---
>  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 2ae867cb4c48..bee1b4c98060 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -760,6 +760,10 @@ static const struct venus_resources sc7180_res = {
>  	.vmem_size = 0,
>  	.vmem_addr = 0,
>  	.dma_mask = 0xe0000000 - 1,
> +	.cp_start = 0,
> +	.cp_size = 0x70800000,
> +	.cp_nonpixel_start = 0x1000000,
> +	.cp_nonpixel_size = 0x24800000,
>  	.fwname = "qcom/venus-5.4/venus.mdt",
>  };
>  
> 
> ---
> base-commit: 925294c9aa184801cc0a451b69a18dd0fe7d847d
> change-id: 20230616-topic-sc7180_venus_lawp-965e5fd18c7a
> 
> Best regards,
  
Vikash Garodia July 10, 2023, 7:03 a.m. UTC | #2
On 6/16/2023 5:06 AM, Konrad Dybcio wrote:
> Not all SC7180 devices ship with ChromeOS firmware. WoA devices use
> Android-like TZ, which uses 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 SC7180 devices.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.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 2ae867cb4c48..bee1b4c98060 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -760,6 +760,10 @@ static const struct venus_resources sc7180_res = {
>  	.vmem_size = 0,
>  	.vmem_addr = 0,
>  	.dma_mask = 0xe0000000 - 1,
> +	.cp_start = 0,
> +	.cp_size = 0x70800000,
> +	.cp_nonpixel_start = 0x1000000,
> +	.cp_nonpixel_size = 0x24800000,
>  	.fwname = "qcom/venus-5.4/venus.mdt",
>  };
>  
> 
> ---
> base-commit: 925294c9aa184801cc0a451b69a18dd0fe7d847d
> change-id: 20230616-topic-sc7180_venus_lawp-965e5fd18c7a
> 
> Best regards,
  

Patch

diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 2ae867cb4c48..bee1b4c98060 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -760,6 +760,10 @@  static const struct venus_resources sc7180_res = {
 	.vmem_size = 0,
 	.vmem_addr = 0,
 	.dma_mask = 0xe0000000 - 1,
+	.cp_start = 0,
+	.cp_size = 0x70800000,
+	.cp_nonpixel_start = 0x1000000,
+	.cp_nonpixel_size = 0x24800000,
 	.fwname = "qcom/venus-5.4/venus.mdt",
 };