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: <274a112a-604c-82b4-130a-c3718abcf141@linaro.org>
Date:   Tue, 9 Oct 2018 17:59:55 +0300
From:   Stanimir Varbanov <stanimir.varbanov@...aro.org>
To:     Malathi Gottam <mgottam@...eaurora.org>,
        stanimir.varbanov@...aro.org, hverkuil@...all.nl,
        mchehab@...nel.org
Cc:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, acourbot@...omium.org,
        vgarodia@...eaurora.org
Subject: Re: [PATCH] media: venus: handle peak bitrate set property

Hi Malathi,

Thanks for the patch!

On 10/09/2018 10:51 AM, Malathi Gottam wrote:
> Max bitrate property is not supported for venus version 4xx.
> Add a version check for the same.

I'd like to avoid version checks in this layer of the driver. Could just
black-list this property in pkt_session_set_property_4xx? Hint, see
HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE in the same function.

> 
> Signed-off-by: Malathi Gottam <mgottam@...eaurora.org>
> ---
>  drivers/media/platform/qcom/venus/venc.c | 22 ++++++++++++----------
>  1 file changed, 12 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
> index ef11495..3f50cd0 100644
> --- a/drivers/media/platform/qcom/venus/venc.c
> +++ b/drivers/media/platform/qcom/venus/venc.c
> @@ -757,18 +757,20 @@ static int venc_set_properties(struct venus_inst *inst)
>  	if (ret)
>  		return ret;
>  
> -	if (!ctr->bitrate_peak)
> -		bitrate *= 2;
> -	else
> -		bitrate = ctr->bitrate_peak;
> +	if (!IS_V4(inst->core)) {
> +		if (!ctr->bitrate_peak)
> +			bitrate *= 2;
> +		else
> +			bitrate = ctr->bitrate_peak;
>  
> -	ptype = HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE;
> -	brate.bitrate = bitrate;
> -	brate.layer_id = 0;
> +		ptype = HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE;
> +		brate.bitrate = bitrate;
> +		brate.layer_id = 0;
>  
> -	ret = hfi_session_set_property(inst, ptype, &brate);
> -	if (ret)
> -		return ret;
> +		ret = hfi_session_set_property(inst, ptype, &brate);
> +		if (ret)
> +			return ret;
> +	}
>  
>  	if (inst->fmt_cap->pixfmt == V4L2_PIX_FMT_H264) {
>  		profile = venc_v4l2_to_hfi(V4L2_CID_MPEG_VIDEO_H264_PROFILE,
> 

-- 
regards,
Stan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ