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]
Date: Thu, 11 Jan 2024 16:05:52 -0800
From: Nathan Hebert <nhebert@...omium.org>
To: Dikshita Agarwal <quic_dikshita@...cinc.com>
Cc: Stanimir Varbanov <stanimir.k.varbanov@...il.com>, 
	Vikash Garodia <quic_vgarodia@...cinc.com>, Andy Gross <agross@...nel.org>, 
	Bjorn Andersson <andersson@...nel.org>, Konrad Dybcio <konrad.dybcio@...aro.org>, 
	Mauro Carvalho Chehab <mchehab@...nel.org>, "Bryan O'Donoghue" <bryan.odonoghue@...aro.org>, 
	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
Subject: Re: [PATCH v2] media: venus: flush all buffers in output plane streamoff

On Tue, Jan 9, 2024 at 10:13 PM Dikshita Agarwal
<quic_dikshita@...cinc.com> wrote:
>
> For scenarios, when source change is followed by VIDIOC_STREAMOFF
> on output plane, driver should discard any queued OUTPUT
> buffers, which are not decoded or dequeued.
> Flush with HFI_FLUSH_INPUT does not have any actual impact.
> So, fix it, by invoking HFI_FLUSH_ALL, which will flush all
> queued buffers.
>
> Fixes: 85872f861d4c ("media: venus: Mark last capture buffer")
> Signed-off-by: Dikshita Agarwal <quic_dikshita@...cinc.com>
Tested on a SC7280 Chromebook with a custom client [0] to perform the
queueing and VIDIOC_STREAMOFF sequence as described in the commit
message. Before this patch, a buffer from before the VIDIOC_STREAMOFF
command would be dequeued and seen by the client. With this patch, it
is not seen by the client.

[0]: https://crrev.com/c/5191249

Tested-by: Nathan Hebert <nhebert@...omium.org>
>
> ---
> Changes since v1:
> - Added fixes tag (Bryan)
>
>  drivers/media/platform/qcom/venus/vdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
> index 29130a9..0d2ab95 100644
> --- a/drivers/media/platform/qcom/venus/vdec.c
> +++ b/drivers/media/platform/qcom/venus/vdec.c
> @@ -1255,7 +1255,7 @@ static int vdec_stop_output(struct venus_inst *inst)
>                 break;
>         case VENUS_DEC_STATE_INIT:
>         case VENUS_DEC_STATE_CAPTURE_SETUP:
> -               ret = hfi_session_flush(inst, HFI_FLUSH_INPUT, true);
> +               ret = hfi_session_flush(inst, HFI_FLUSH_ALL, true);
>                 break;
>         default:
>                 break;
> --
> 2.7.4
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ