diff options
Diffstat (limited to 'drivers/media/platform/vivid/vivid-tpg.c')
-rw-r--r-- | drivers/media/platform/vivid/vivid-tpg.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/platform/vivid/vivid-tpg.c b/drivers/media/platform/vivid/vivid-tpg.c index 7a3ed580626a..c1883a8533c5 100644 --- a/drivers/media/platform/vivid/vivid-tpg.c +++ b/drivers/media/platform/vivid/vivid-tpg.c @@ -1651,8 +1651,14 @@ static void tpg_recalc(struct tpg_data *tpg) if (tpg->recalc_colors) { tpg->recalc_colors = false; tpg->recalc_lines = true; + tpg->real_xfer_func = tpg->xfer_func; tpg->real_ycbcr_enc = tpg->ycbcr_enc; tpg->real_quantization = tpg->quantization; + + if (tpg->xfer_func == V4L2_XFER_FUNC_DEFAULT) + tpg->real_xfer_func = + V4L2_MAP_XFER_FUNC_DEFAULT(tpg->colorspace); + if (tpg->ycbcr_enc == V4L2_YCBCR_ENC_DEFAULT) tpg->real_ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(tpg->colorspace); @@ -1716,6 +1722,7 @@ void tpg_log_status(struct tpg_data *tpg) pr_info("tpg compose: %ux%u@%dx%d\n", tpg->compose.width, tpg->compose.height, 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 quantization: %d/%d\n", tpg->quantization, tpg->real_quantization); pr_info("tpg RGB range: %d/%d\n", tpg->rgb_range, tpg->real_rgb_range); |