lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b22b35fb-021c-2e46-e8ae-9df73c6a8dc0@quicinc.com>
Date:   Fri, 26 May 2023 11:48:47 +0530
From:   Dikshita Agarwal <quic_dikshita@...cinc.com>
To:     Konrad Dybcio <konrad.dybcio@...aro.org>,
        Stanimir Varbanov <stanimir.k.varbanov@...il.com>,
        Vikash Garodia <quic_vgarodia@...cinc.com>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        "Mauro Carvalho Chehab" <mchehab@...nel.org>,
        Dikshita Agarwal <dikshita@....qualcomm.com>,
        Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
        Mansur Alisha Shaik <mansur@...eaurora.org>,
        Jonathan Marek <jonathan@...ek.ca>,
        Hans Verkuil <hans.verkuil@...co.com>
CC:     Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        Stanimir Varbanov <stanimir.varbanov@...aro.org>,
        <linux-media@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        "Marijn Suijten" <marijn.suijten@...ainline.org>
Subject: Re: [PATCH v3 06/17] media: venus: hfi_venus: Sanitize
 venus_boot_core() per-VPU-version



On 5/18/2023 2:44 AM, Konrad Dybcio wrote:
> The current assumption of IS_V6 is overgeneralized. Adjust the logic
> to take the VPU hardware version into account.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>
> ---
>  drivers/media/platform/qcom/venus/hfi_venus.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
> index 8fc8f46dc390..5af24e98caf0 100644
> --- a/drivers/media/platform/qcom/venus/hfi_venus.c
> +++ b/drivers/media/platform/qcom/venus/hfi_venus.c
> @@ -447,19 +447,20 @@ static int venus_boot_core(struct venus_hfi_device *hdev)
>  {
>  	struct device *dev = hdev->core->dev;
>  	static const unsigned int max_tries = 100;
> -	u32 ctrl_status = 0, mask_val;
> +	u32 ctrl_status = 0, mask_val = 0;
>  	unsigned int count = 0;
>  	void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
>  	void __iomem *wrapper_base = hdev->core->wrapper_base;
>  	int ret = 0;
>  
> -	if (IS_V6(hdev->core)) {
> +	if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) {
>  		mask_val = readl(wrapper_base + WRAPPER_INTR_MASK);
>  		mask_val &= ~(WRAPPER_INTR_MASK_A2HWD_BASK_V6 |
>  			      WRAPPER_INTR_MASK_A2HCPU_MASK);
>  	} else {
>  		mask_val = WRAPPER_INTR_MASK_A2HVCODEC_MASK;
>  	}
> +
>  	writel(mask_val, wrapper_base + WRAPPER_INTR_MASK);
>  	writel(1, cpu_cs_base + CPU_CS_SCIACMDARG3);
>  
> @@ -479,10 +480,11 @@ static int venus_boot_core(struct venus_hfi_device *hdev)
>  	if (count >= max_tries)
>  		ret = -ETIMEDOUT;
>  
> -	if (IS_V6(hdev->core)) {
> +	if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core))
>  		writel(0x1, cpu_cs_base + CPU_CS_H2XSOFTINTEN_V6);
> +
> +	if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core))
>  		writel(0x0, cpu_cs_base + CPU_CS_X2RPMH_V6);
> -	}
above two if conditions can be combined.

Thanks,
Dikshita
>  
>  	return ret;
>  }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ