summaryrefslogtreecommitdiff
path: root/include/media/tpg
diff options
context:
space:
mode:
authorKaaira Gupta <kgupta@es.iitr.ac.in>2020-07-05 16:53:05 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-07-19 14:38:56 +0300
commit7a785081a16968a28adce223c572111d2d57a83e (patch)
tree3f165730de0a6ec6e3a7f4fad868f47b146a7bce /include/media/tpg
parent9dc75e79c0dec0eb9363793efbd5f16d134169dc (diff)
downloadlinux-7a785081a16968a28adce223c572111d2d57a83e.tar.xz
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>
Diffstat (limited to 'include/media/tpg')
-rw-r--r--include/media/tpg/v4l2-tpg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/media/tpg/v4l2-tpg.h b/include/media/tpg/v4l2-tpg.h
index 9749ed409856..0b0ddb87380e 100644
--- a/include/media/tpg/v4l2-tpg.h
+++ b/include/media/tpg/v4l2-tpg.h
@@ -252,6 +252,7 @@ void tpg_fillbuffer(struct tpg_data *tpg, v4l2_std_id std,
bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc);
void tpg_s_crop_compose(struct tpg_data *tpg, const struct v4l2_rect *crop,
const struct v4l2_rect *compose);
+const char *tpg_g_color_order(const struct tpg_data *tpg);
static inline void tpg_s_pattern(struct tpg_data *tpg, enum tpg_pattern pattern)
{