summaryrefslogtreecommitdiff
path: root/drivers/media/test-drivers/vimc/vimc-core.c
diff options
context:
space:
mode:
authorKaaira Gupta <kgupta@es.iitr.ac.in>2020-07-05 15:53:06 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-07-19 13:39:22 +0200
commit5f3fb5c54d67670fa6743d2434a5bd43a97c01de (patch)
tree41d7812c92e0241a8ec1a1f9a80ea6cda2241693 /drivers/media/test-drivers/vimc/vimc-core.c
parent7a785081a16968a28adce223c572111d2d57a83e (diff)
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 <kgupta@es.iitr.ac.in> Acked-by: Helen Koike <helen.koike@collabora.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/test-drivers/vimc/vimc-core.c')
-rw-r--r--drivers/media/test-drivers/vimc/vimc-core.c10
1 files changed, 10 insertions, 0 deletions
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 <helen.fornazier@gmail.com>
*/
+#include <linux/font.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <media/media-device.h>
+#include <media/tpg/v4l2-tpg.h>
#include <media/v4l2-device.h>
#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;