diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2018-08-11 07:07:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-11 08:36:51 -0400 |
commit | 648301b456b0169af4a8be49ea59a91742c3f75b (patch) | |
tree | 497cdf95974ac60b2bfe263576cd86819abc4b60 /drivers/media/common | |
parent | bd7ae8adeca003f6eafe578fe2c6b9308aeb582a (diff) |
media: v4l2-tpg: add Z16 support
Z16 support is identical to Y16, so that's easy to add.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c index e6d13c4fb7b7..f3d9c1140ffa 100644 --- a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c +++ b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c @@ -235,6 +235,7 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc) case V4L2_PIX_FMT_Y12: case V4L2_PIX_FMT_Y16: case V4L2_PIX_FMT_Y16_BE: + case V4L2_PIX_FMT_Z16: tpg->color_enc = TGP_COLOR_ENC_LUMA; break; case V4L2_PIX_FMT_YUV444: @@ -351,6 +352,7 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc) case V4L2_PIX_FMT_Y12: case V4L2_PIX_FMT_Y16: case V4L2_PIX_FMT_Y16_BE: + case V4L2_PIX_FMT_Z16: tpg->twopixelsize[0] = 2 * 2; break; case V4L2_PIX_FMT_RGB24: @@ -1062,6 +1064,7 @@ static void gen_twopix(struct tpg_data *tpg, buf[0][offset+1] = r_y_h >> 4; break; 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 * be able to detect endian problems. So keep it 0 except for |