diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2018-08-11 07:07:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-11 08:34:45 -0400 |
commit | bd7ae8adeca003f6eafe578fe2c6b9308aeb582a (patch) | |
tree | adb657e266e415a6773a7e7c8510ceceb6c3e207 /drivers/media/common/v4l2-tpg | |
parent | b4ae675d3f4f31b7810b58895e643177be8fc010 (diff) |
media: v4l2-tpg: show either Y'CbCr or HSV encoding
When logging the current TPG state detect if we are generating
a Y'CbCr or HSV pattern and report one or the other instead of
both, which is confusing.
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/v4l2-tpg')
-rw-r--r-- | drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c index abd4c788dffd..e6d13c4fb7b7 100644 --- a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c +++ b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c @@ -2038,8 +2038,12 @@ void tpg_log_status(struct tpg_data *tpg) tpg->compose.left, tpg->compose.top); pr_info("tpg colorspace: %d\n", tpg->colorspace); pr_info("tpg transfer function: %d/%d\n", tpg->xfer_func, tpg->real_xfer_func); - pr_info("tpg Y'CbCr encoding: %d/%d\n", tpg->ycbcr_enc, tpg->real_ycbcr_enc); - pr_info("tpg HSV encoding: %d/%d\n", tpg->hsv_enc, tpg->real_hsv_enc); + if (tpg->color_enc == TGP_COLOR_ENC_HSV) + pr_info("tpg HSV encoding: %d/%d\n", + tpg->hsv_enc, tpg->real_hsv_enc); + else if (tpg->color_enc == TGP_COLOR_ENC_YCBCR) + pr_info("tpg Y'CbCr encoding: %d/%d\n", + tpg->ycbcr_enc, tpg->real_ycbcr_enc); pr_info("tpg quantization: %d/%d\n", tpg->quantization, tpg->real_quantization); pr_info("tpg RGB range: %d/%d\n", tpg->rgb_range, tpg->real_rgb_range); } |