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: <b19b4e2f-3e39-d0cd-42eb-fc680946cbfe@quicinc.com>
Date: Fri, 5 Apr 2024 13:29:25 +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>,
        Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
        Andy Gross
	<agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        "Mauro Carvalho
 Chehab" <mchehab@...nel.org>,
        Philipp Zabel <p.zabel@...gutronix.de>
CC: Marijn Suijten <marijn.suijten@...ainline.org>,
        Stanimir Varbanov
	<stanimir.varbanov@...aro.org>,
        Mauro Carvalho Chehab
	<mchehab+huawei@...nel.org>,
        <linux-media@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 10/19] media: venus: core: Use GENMASK for dma_mask



On 3/27/2024 11:38 PM, Konrad Dybcio wrote:
> The raw literals mean very little. Substitute it with more telling
> bitops macros.
> 
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>
> ---
>  drivers/media/platform/qcom/venus/core.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index 51ac9eff244c..5d41ecddcef6 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -562,7 +562,7 @@ static const struct venus_resources msm8916_res = {
>  	.clks_num = 3,
>  	.max_load = 352800, /* 720p@30 + 1080p@30 */
>  	.hfi_version = HFI_VERSION_1XX,
> -	.dma_mask = 0xddc00000 - 1,
> +	.dma_mask = (GENMASK(31, 30) | GENMASK(28, 26) | GENMASK(24, 22)) - 1,
>  	.fwname = "qcom/venus-1.8/venus.mbn",
>  };
>  
> @@ -592,7 +592,7 @@ static const struct venus_resources msm8996_res = {
>  	.vcodec_clks_num = 1,
>  	.max_load = 2563200,
>  	.hfi_version = HFI_VERSION_3XX,
> -	.dma_mask = 0xddc00000 - 1,
> +	.dma_mask = (GENMASK(31, 30) | GENMASK(28, 26) | GENMASK(24, 22)) - 1,
>  	.fwname = "qcom/venus-4.2/venus.mbn",
>  };
>  
> @@ -693,7 +693,7 @@ static const struct venus_resources sdm845_res = {
>  	.max_load = 3110400,	/* 4096x2160@90 */
>  	.hfi_version = HFI_VERSION_4XX,
>  	.vpu_version = VPU_VERSION_AR50,
> -	.dma_mask = 0xe0000000 - 1,
> +	.dma_mask = GENMASK(31, 29) - 1,
>  	.fwname = "qcom/venus-5.2/venus.mbn",
>  };
>  
> @@ -715,7 +715,7 @@ static const struct venus_resources sdm845_res_v2 = {
>  	.max_load = 3110400,	/* 4096x2160@90 */
>  	.hfi_version = HFI_VERSION_4XX,
>  	.vpu_version = VPU_VERSION_AR50,
> -	.dma_mask = 0xe0000000 - 1,
> +	.dma_mask = GENMASK(31, 29) - 1,
>  	.cp_start = 0,
>  	.cp_size = 0x70800000,
>  	.cp_nonpixel_start = 0x1000000,
> @@ -759,7 +759,7 @@ static const struct venus_resources sc7180_res = {
>  	.opp_pmdomain = pd_names_cx,
>  	.hfi_version = HFI_VERSION_4XX,
>  	.vpu_version = VPU_VERSION_AR50,
> -	.dma_mask = 0xe0000000 - 1,
> +	.dma_mask = GENMASK(31, 29) - 1,
>  	.cp_start = 0,
>  	.cp_size = 0x70800000,
>  	.cp_nonpixel_start = 0x1000000,
> @@ -814,7 +814,7 @@ static const struct venus_resources sm8250_res = {
>  	.hfi_version = HFI_VERSION_6XX,
>  	.vpu_version = VPU_VERSION_IRIS2,
>  	.num_vpp_pipes = 4,
> -	.dma_mask = 0xe0000000 - 1,
> +	.dma_mask = GENMASK(31, 29) - 1,
>  	.fwname = "qcom/vpu-1.0/venus.mbn",
>  };
>  
> @@ -868,7 +868,7 @@ static const struct venus_resources sc7280_res = {
>  	.hfi_version = HFI_VERSION_6XX,
>  	.vpu_version = VPU_VERSION_IRIS2_1,
>  	.num_vpp_pipes = 1,
> -	.dma_mask = 0xe0000000 - 1,
> +	.dma_mask = GENMASK(31, 29) - 1,
>  	.cp_start = 0,
>  	.cp_size = 0x25800000,
>  	.cp_nonpixel_start = 0x1000000,
> 
Reviewed-by: Dikshita Agarwal <quic_dikshita@...cinc.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ