[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8f1b17e3-5015-3a4e-821f-8097da933f91@linaro.org>
Date: Mon, 8 Oct 2018 15:21:13 +0300
From: Stanimir Varbanov <stanimir.varbanov@...aro.org>
To: Vikash Garodia <vgarodia@...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
Subject: Re: [PATCH v2] venus: vdec: fix decoded data size
Hi Vikash,
On 10/08/2018 02:09 PM, Vikash Garodia wrote:
> Existing code returns the max of the decoded size and buffer size.
> It turns out that buffer size is always greater due to hardware
> alignment requirement. As a result, payload size given to client
> is incorrect. This change ensures that the bytesused is assigned
> to actual payload size, when available.
>
> Signed-off-by: Vikash Garodia <vgarodia@...eaurora.org>
> ---
> drivers/media/platform/qcom/venus/vdec.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
> index 991e158..189ec97 100644
> --- a/drivers/media/platform/qcom/venus/vdec.c
> +++ b/drivers/media/platform/qcom/venus/vdec.c
> @@ -888,8 +888,7 @@ static void vdec_buf_done(struct venus_inst *inst, unsigned int buf_type,
> unsigned int opb_sz = venus_helper_get_opb_size(inst);
>
> vb = &vbuf->vb2_buf;
> - vb->planes[0].bytesused =
> - max_t(unsigned int, opb_sz, bytesused);
> + vb2_set_plane_payload(vb, 0, bytesused ? : opb_sz);
> vb->planes[0].data_offset = data_offset;
> vb->timestamp = timestamp_us * NSEC_PER_USEC;
> vbuf->sequence = inst->sequence_cap++;
>
Acked-by: Stanimir Varbanov <stanimir.varbanov@...aro.org>
--
regards,
Stan
Powered by blists - more mailing lists