Message ID | 20250305104335.3629945-7-quic_dikshita@quicinc.com |
---|---|
State | New |
Headers | show |
Series | Add support for HEVC and VP9 codecs in decoder | expand |
On 3/6/2025 2:15 AM, Dmitry Baryshkov wrote: > On Wed, Mar 05, 2025 at 04:13:29PM +0530, Dikshita Agarwal wrote: >> Update the width, height and buffer size of CAPTURE based on the >> resolution set to OUTPUT via VIDIOC_S_FMT. This is required to set the >> updated capture resolution to firmware when S_FMT is called only for >> OUTPUT. >> >> Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> >> --- >> drivers/media/platform/qcom/iris/iris_vdec.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> > > This also looks like a fix, so Fixes, cc:stable, move to the top. Ack. >
diff --git a/drivers/media/platform/qcom/iris/iris_vdec.c b/drivers/media/platform/qcom/iris/iris_vdec.c index cdcfe71f5b96..16ae83948076 100644 --- a/drivers/media/platform/qcom/iris/iris_vdec.c +++ b/drivers/media/platform/qcom/iris/iris_vdec.c @@ -228,6 +228,11 @@ int iris_vdec_s_fmt(struct iris_inst *inst, struct v4l2_format *f) output_fmt->fmt.pix_mp.ycbcr_enc = f->fmt.pix_mp.ycbcr_enc; output_fmt->fmt.pix_mp.quantization = f->fmt.pix_mp.quantization; + /* Update capture format based on new ip w/h */ + output_fmt->fmt.pix_mp.width = ALIGN(f->fmt.pix_mp.width, 128); + output_fmt->fmt.pix_mp.height = ALIGN(f->fmt.pix_mp.height, 32); + inst->buffers[BUF_OUTPUT].size = iris_get_buffer_size(inst, BUF_OUTPUT); + inst->crop.left = 0; inst->crop.top = 0; inst->crop.width = f->fmt.pix_mp.width;
Update the width, height and buffer size of CAPTURE based on the resolution set to OUTPUT via VIDIOC_S_FMT. This is required to set the updated capture resolution to firmware when S_FMT is called only for OUTPUT. Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> --- drivers/media/platform/qcom/iris/iris_vdec.c | 5 +++++ 1 file changed, 5 insertions(+)