Commit 648301b4 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: v4l2-tpg: add Z16 support

Z16 support is identical to Y16, so that's easy to add.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent bd7ae8ad
...@@ -235,6 +235,7 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc) ...@@ -235,6 +235,7 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc)
case V4L2_PIX_FMT_Y12: case V4L2_PIX_FMT_Y12:
case V4L2_PIX_FMT_Y16: case V4L2_PIX_FMT_Y16:
case V4L2_PIX_FMT_Y16_BE: case V4L2_PIX_FMT_Y16_BE:
case V4L2_PIX_FMT_Z16:
tpg->color_enc = TGP_COLOR_ENC_LUMA; tpg->color_enc = TGP_COLOR_ENC_LUMA;
break; break;
case V4L2_PIX_FMT_YUV444: case V4L2_PIX_FMT_YUV444:
...@@ -351,6 +352,7 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc) ...@@ -351,6 +352,7 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc)
case V4L2_PIX_FMT_Y12: case V4L2_PIX_FMT_Y12:
case V4L2_PIX_FMT_Y16: case V4L2_PIX_FMT_Y16:
case V4L2_PIX_FMT_Y16_BE: case V4L2_PIX_FMT_Y16_BE:
case V4L2_PIX_FMT_Z16:
tpg->twopixelsize[0] = 2 * 2; tpg->twopixelsize[0] = 2 * 2;
break; break;
case V4L2_PIX_FMT_RGB24: case V4L2_PIX_FMT_RGB24:
...@@ -1062,6 +1064,7 @@ static void gen_twopix(struct tpg_data *tpg, ...@@ -1062,6 +1064,7 @@ static void gen_twopix(struct tpg_data *tpg,
buf[0][offset+1] = r_y_h >> 4; buf[0][offset+1] = r_y_h >> 4;
break; break;
case V4L2_PIX_FMT_Y16: case V4L2_PIX_FMT_Y16:
case V4L2_PIX_FMT_Z16:
/* /*
* Ideally both bytes should be set to r_y_h, but then you won't * Ideally both bytes should be set to r_y_h, but then you won't
* be able to detect endian problems. So keep it 0 except for * be able to detect endian problems. So keep it 0 except for
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment