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.
Signed-off-by: Dikshita Agarwal <[email protected]>
---
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
For scenarios, when source change is followed by VIDIOC_STREAMOFF
on output, driver should discards any remaining queued OUTPUT
buffers which are not decoded or dequeued.
Flush with HFI_FLUSH_INPUT doesn't have any actual implact. So,
fix it by invoking HFI_FLUSH_ALL which will flush all queued buffers.
Signed-off-by: Dikshita Agarwal <[email protected]>
---
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
Hello All,
Please ignore this duplicate email and review the other patch [1].
Sorry for the spam.
[1]
https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/
Thanks,
Dikshita
On 1/8/2024 12:03 PM, Dikshita Agarwal wrote:
> For scenarios, when source change is followed by VIDIOC_STREAMOFF
> on output, driver should discards any remaining queued OUTPUT
> buffers which are not decoded or dequeued.
> Flush with HFI_FLUSH_INPUT doesn't have any actual implact. So,
> fix it by invoking HFI_FLUSH_ALL which will flush all queued buffers.
>
> Signed-off-by: Dikshita Agarwal <[email protected]>
> ---
> 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;
On 08/01/2024 06:33, Dikshita Agarwal 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.
>
> Signed-off-by: Dikshita Agarwal <[email protected]>
> ---
> 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;
Missing
Fixes: 85872f861d4c ("media: venus: Mark last capture buffer")
Once fixed
Reviewed-by: Bryan O'Donoghue <[email protected]>
---
bod