Message ID | 20201026162848.18310-1-dafna.hirschfeld@collabora.com |
---|---|
State | Accepted |
Commit | f4aefc581af4286ff3bfaea44084c5e5d9aa57c8 |
Headers | show |
Series | media: staging: rkisp1: capture: set default quantization on 'set_fmt' | expand |
On 10/26/20 1:28 PM, Dafna Hirschfeld wrote: > On 's/try_fmt' ioctl, set the quantization field to > V4L2_QUANTIZATION_DEFAULT. This fixes the compliance > errors: > > fail: v4l2-test-formats.cpp(357): quantization >= 0xff > fail: v4l2-test-formats.cpp(473): testColorspace(!node->is_io_mc, pix_mp.pixelformat, pix_mp.colorspace, pix_mp.ycbcr_enc, pix_mp.quantization) > test VIDIOC_TRY_FMT: FAIL > fail: v4l2-test-formats.cpp(357): quantization >= 0xff > fail: v4l2-test-formats.cpp(473): testColorspace(!node->is_io_mc, pix_mp.pixelformat, pix_mp.colorspace, pix_mp.ycbcr_enc, pix_mp.quantization) > test VIDIOC_S_FMT: FAIL > > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Acked-by: Helen Koike <helen.koike@collabora.com> Thanks! Helen > --- > drivers/staging/media/rkisp1/rkisp1-capture.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c > index b6f497ce3e95..9a0f88b2254b 100644 > --- a/drivers/staging/media/rkisp1/rkisp1-capture.c > +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c > @@ -1132,6 +1132,7 @@ static void rkisp1_try_fmt(const struct rkisp1_capture *cap, > pixm->field = V4L2_FIELD_NONE; > pixm->colorspace = V4L2_COLORSPACE_DEFAULT; > pixm->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; > + pixm->quantization = V4L2_QUANTIZATION_DEFAULT; > > info = rkisp1_fill_pixfmt(pixm, cap->id); > >
diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c index b6f497ce3e95..9a0f88b2254b 100644 --- a/drivers/staging/media/rkisp1/rkisp1-capture.c +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c @@ -1132,6 +1132,7 @@ static void rkisp1_try_fmt(const struct rkisp1_capture *cap, pixm->field = V4L2_FIELD_NONE; pixm->colorspace = V4L2_COLORSPACE_DEFAULT; pixm->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; + pixm->quantization = V4L2_QUANTIZATION_DEFAULT; info = rkisp1_fill_pixfmt(pixm, cap->id);
On 's/try_fmt' ioctl, set the quantization field to V4L2_QUANTIZATION_DEFAULT. This fixes the compliance errors: fail: v4l2-test-formats.cpp(357): quantization >= 0xff fail: v4l2-test-formats.cpp(473): testColorspace(!node->is_io_mc, pix_mp.pixelformat, pix_mp.colorspace, pix_mp.ycbcr_enc, pix_mp.quantization) test VIDIOC_TRY_FMT: FAIL fail: v4l2-test-formats.cpp(357): quantization >= 0xff fail: v4l2-test-formats.cpp(473): testColorspace(!node->is_io_mc, pix_mp.pixelformat, pix_mp.colorspace, pix_mp.ycbcr_enc, pix_mp.quantization) test VIDIOC_S_FMT: FAIL Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> --- drivers/staging/media/rkisp1/rkisp1-capture.c | 1 + 1 file changed, 1 insertion(+)