From 5f3fb5c54d67670fa6743d2434a5bd43a97c01de Mon Sep 17 00:00:00 2001 From: Kaaira Gupta Date: Sun, 5 Jul 2020 15:53:06 +0200 Subject: media: vimc: Add a control to display info on test image Add a control in VIMC to display information such as the correct order of colors for a given test pattern, counter, brightness, hue, saturation, contrast, width and height at sensor over test image. Signed-off-by: Kaaira Gupta Acked-by: Helen Koike Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/test-drivers/vimc/vimc-core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/media/test-drivers/vimc/vimc-core.c') diff --git a/drivers/media/test-drivers/vimc/vimc-core.c b/drivers/media/test-drivers/vimc/vimc-core.c index 11210aaa2551..4b0ae6f51d76 100644 --- a/drivers/media/test-drivers/vimc/vimc-core.c +++ b/drivers/media/test-drivers/vimc/vimc-core.c @@ -5,10 +5,12 @@ * Copyright (C) 2015-2017 Helen Koike */ +#include #include #include #include #include +#include #include #include "vimc-common.h" @@ -263,11 +265,19 @@ err_v4l2_unregister: static int vimc_probe(struct platform_device *pdev) { + const struct font_desc *font = find_font("VGA8x16"); struct vimc_device *vimc; int ret; dev_dbg(&pdev->dev, "probe"); + if (!font) { + dev_err(&pdev->dev, "could not find font\n"); + return -ENODEV; + } + + tpg_set_font(font->data); + vimc = kzalloc(sizeof(*vimc), GFP_KERNEL); if (!vimc) return -ENOMEM; -- cgit v1.2.3