arm64: imx8mx: vpu: integrate vsi 20210429 release (pre-v1.6)
authorZhou Peng <eagle.zhou@nxp.com>
Thu, 29 Apr 2021 03:03:45 +0000 (11:03 +0800)
committerZhou Peng <eagle.zhou@nxp.com>
Thu, 29 Apr 2021 03:25:51 +0000 (11:25 +0800)
- M865SW-747: VSI V4L2 Engineer release package 20210429
  M865SW-740: [VPU/V4l2] encoder: remove 'V4L2_COLORSPACE_REC709' contraint in vsi_enc_try_fmt()

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 44ef613ab0be5be805cf21a885b381db4b6ea2c8)

drivers/mxc/hantro_v4l2/vsi-v4l2-enc.c
drivers/mxc/hantro_v4l2/vsi-v4l2-priv.h

index 69b15d4..59a1db4 100755 (executable)
@@ -448,7 +448,6 @@ static int vsi_enc_try_fmt(struct file *file, void *prv, struct v4l2_format *f)
                return -EINVAL;
        if (vsi_find_format(ctx, f) == NULL)
                return -EINVAL;
-       f->fmt.pix_mp.colorspace = V4L2_COLORSPACE_REC709;
 
        return 0;
 }
@@ -577,7 +576,7 @@ static int vsi_enc_encoder_cmd(struct file *file, void *fh, struct v4l2_encoder_
                if (ctx->status == ENC_STATUS_STOPPED ||
                        ctx->status == ENC_STATUS_EOS) {
                        vb2_streamon(&ctx->input_que, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
-                       vb2_streamon(&ctx->input_que, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
+                       vb2_streamon(&ctx->output_que, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE);
                        ret = vsi_enc_trystartenc(ctx);
                }
                break;
index bfd1fd3..a03f359 100755 (executable)
@@ -26,8 +26,8 @@
 #include "vsi-v4l2.h"
 
 #define CTX_SEQID_UPLIMT 0x7FFFFFFF
-#define CTX_ARRAY_ID(ctxid)    (ctxid & 0xFFFFFFFF)
-#define CTX_SEQ_ID(ctxid)      (ctxid >> 32)
+#define CTX_ARRAY_ID(ctxid)    ((ctxid) & 0xFFFFFFFF)
+#define CTX_SEQ_ID(ctxid)      ((ctxid) >> 32)
 
 #define MIN_FRAME_4ENC 1