aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/test-drivers/vimc/vimc-core.c
diff options
context:
space:
mode:
authorKaaira Gupta <[email protected]>2020-07-05 13:53:06 +0000
committerMauro Carvalho Chehab <[email protected]>2020-07-19 11:39:22 +0000
commit5f3fb5c54d67670fa6743d2434a5bd43a97c01de (patch)
tree41d7812c92e0241a8ec1a1f9a80ea6cda2241693 /drivers/media/test-drivers/vimc/vimc-core.c
parentmedia: tpg: Add function to return colors' order of test image (diff)
downloadkernel-5f3fb5c54d67670fa6743d2434a5bd43a97c01de.tar.gz
kernel-5f3fb5c54d67670fa6743d2434a5bd43a97c01de.zip
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 <[email protected]> Acked-by: Helen Koike <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
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 <[email protected]>
*/
+#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;