From 2bd4e58c9d00325b7a850b2ac73fd902e9148b77 Mon Sep 17 00:00:00 2001 From: "Lad, Prabhakar" Date: Tue, 25 Sep 2012 08:11:49 -0300 Subject: [media] media: davinci: vpif: display: separate out subdev from output vpif_display relied on a 1-1 mapping of output and subdev. This is not necessarily the case. Separate the two. So there is a list of subdevs and a list of outputs. Each output refers to a subdev and has routing information. An output does not have to have a subdev. The initial output for each channel is set to the fist output. Currently missing is support for associating multiple subdevs with an output. Signed-off-by: Lad, Prabhakar Signed-off-by: Manjunath Hadli Acked-by: Hans Verkuil Acked-by: Sekhar Nori Signed-off-by: Mauro Carvalho Chehab --- include/media/davinci/vpif_types.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'include/media') diff --git a/include/media/davinci/vpif_types.h b/include/media/davinci/vpif_types.h index 65e8fe17e116..3882e0675ccf 100644 --- a/include/media/davinci/vpif_types.h +++ b/include/media/davinci/vpif_types.h @@ -20,6 +20,7 @@ #include #define VPIF_CAPTURE_MAX_CHANNELS 2 +#define VPIF_DISPLAY_MAX_CHANNELS 2 enum vpif_if_type { VPIF_IF_BT656, @@ -39,15 +40,25 @@ struct vpif_subdev_info { struct i2c_board_info board_info; }; +struct vpif_output { + struct v4l2_output output; + const char *subdev_name; + u32 input_route; + u32 output_route; +}; + +struct vpif_display_chan_config { + const struct vpif_output *outputs; + int output_count; + bool clip_en; +}; + struct vpif_display_config { int (*set_clock)(int, int); struct vpif_subdev_info *subdevinfo; int subdev_count; - const char **output; - int output_count; + struct vpif_display_chan_config chan_config[VPIF_DISPLAY_MAX_CHANNELS]; const char *card_name; - bool ch2_clip_en; - bool ch3_clip_en; }; struct vpif_input { -- cgit v1.2.3-59-g8ed1b