[04/18] media: venus: firmware: Leave a clue for homegrown porters

Message ID 20230228-topic-venus-v1-4-58c2c88384e9@linaro.org
State New
Headers
Series Venus QoL / maintainability fixes |

Commit Message

Konrad Dybcio Feb. 28, 2023, 3:24 p.m. UTC
  Leave a clue about where the seemingly magic values come from, as it
is not obvious and requires some digging downstream..

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

Comments

Dikshita Agarwal March 2, 2023, 8:18 a.m. UTC | #1
On 2/28/2023 8:54 PM, Konrad Dybcio wrote:
> Leave a clue about where the seemingly magic values come from, as it
> is not obvious and requires some digging downstream..
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>   drivers/media/platform/qcom/venus/firmware.c | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
> index 61ff20a7e935..1bb6406af564 100644
> --- a/drivers/media/platform/qcom/venus/firmware.c
> +++ b/drivers/media/platform/qcom/venus/firmware.c
> @@ -241,6 +241,13 @@ int venus_boot(struct venus_core *core)
>   		return ret;
>   
>   	if (core->use_tz && res->cp_size) {
> +		/*
> +		 * Clues for porting using downstream data:
> +		 * cp_start = 0
> +		 * cp_size = venus_ns/virtual-addr-pool[0] (yes, addr not size)
> +		 * cp_nonpixel_start = venus_sec_non_pixel/virtual-addr-pool[0]
> +		 * cp_nonpixel_size = venus_sec_non_pixel/virtual-addr-pool[1]
> +		 */
>   		ret = qcom_scm_mem_protect_video_var(res->cp_start,
>   						     res->cp_size,
>   						     res->cp_nonpixel_start,
reviewed-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
  

Patch

diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
index 61ff20a7e935..1bb6406af564 100644
--- a/drivers/media/platform/qcom/venus/firmware.c
+++ b/drivers/media/platform/qcom/venus/firmware.c
@@ -241,6 +241,13 @@  int venus_boot(struct venus_core *core)
 		return ret;
 
 	if (core->use_tz && res->cp_size) {
+		/*
+		 * Clues for porting using downstream data:
+		 * cp_start = 0
+		 * cp_size = venus_ns/virtual-addr-pool[0] (yes, addr not size)
+		 * cp_nonpixel_start = venus_sec_non_pixel/virtual-addr-pool[0]
+		 * cp_nonpixel_size = venus_sec_non_pixel/virtual-addr-pool[1]
+		 */
 		ret = qcom_scm_mem_protect_video_var(res->cp_start,
 						     res->cp_size,
 						     res->cp_nonpixel_start,