media: tpg: Add function to return colors' order of test image
authorKaaira Gupta <kgupta@es.iitr.ac.in>
Sun, 5 Jul 2020 13:53:05 +0000 (15:53 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Jul 2020 11:38:56 +0000 (13:38 +0200)
commit7a785081a16968a28adce223c572111d2d57a83e
tree3f165730de0a6ec6e3a7f4fad868f47b146a7bce
parent9dc75e79c0dec0eb9363793efbd5f16d134169dc
media: tpg: Add function to return colors' order of test image

Currently there is no method to know the correct order of the colors for
a test image generated by tpg. Write a function that returns a string of
colors' order given a tpg. It returns a NULL pointer in case of test
patterns which do not have a well defined colors' order. Hence add a
NULL check for text in tpg_gen_text().

[hverkuil: white -> White (for consistency)]

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
include/media/tpg/v4l2-tpg.h