diff options
author | Mats Randgaard <mats.randgaard@cisco.com> | 2010-12-16 12:17:42 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-01-19 11:28:15 -0200 |
commit | aa4444063505983c5971bc8fb832385dfba16b41 (patch) | |
tree | 6c9e1642c9350a6395d72755a290c475407aeeff /drivers/media/video/davinci/vpif_display.c | |
parent | 7036d6a73c88428764e4a12f30846279346f4382 (diff) |
[media] vpif: Consolidate formats from capture and display
- The ch_params tables in vpif_capture.c and vpif_display.c are moved to a common
table in vpif.c. Then it is easier to maintain the table.
- The field "fps" is removed from the struct vpif_channel_config_params because it
is not used.
Signed-off-by: Mats Randgaard <mats.randgaard@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by : Murali Karicheri <mkaricheri@gmail.com>
Acked-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/davinci/vpif_display.c')
-rw-r--r-- | drivers/media/video/davinci/vpif_display.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/media/video/davinci/vpif_display.c b/drivers/media/video/davinci/vpif_display.c index 2d55e3e86a84..9de0062eca59 100644 --- a/drivers/media/video/davinci/vpif_display.c +++ b/drivers/media/video/davinci/vpif_display.c @@ -85,17 +85,6 @@ static struct vpif_config_params config_params = { static struct vpif_device vpif_obj = { {NULL} }; static struct device *vpif_dev; -static const struct vpif_channel_config_params ch_params[] = { - { - "NTSC", 720, 480, 30, 0, 1, 268, 1440, 1, 23, 263, 266, - 286, 525, 525, 0, 1, 0, V4L2_STD_525_60, - }, - { - "PAL", 720, 576, 25, 0, 1, 280, 1440, 1, 23, 311, 313, - 336, 624, 625, 0, 1, 0, V4L2_STD_625_50, - }, -}; - /* * vpif_uservirt_to_phys: This function is used to convert user * space virtual address to physical address. @@ -388,7 +377,7 @@ static int vpif_get_std_info(struct channel_obj *ch) if (!std_info->stdid) return -1; - for (index = 0; index < ARRAY_SIZE(ch_params); index++) { + for (index = 0; index < vpif_ch_params_count; index++) { config = &ch_params[index]; if (config->stdid & std_info->stdid) { memcpy(std_info, config, sizeof(*config)); @@ -396,8 +385,8 @@ static int vpif_get_std_info(struct channel_obj *ch) } } - if (index == ARRAY_SIZE(ch_params)) - return -1; + if (index == vpif_ch_params_count) + return -EINVAL; common->fmt.fmt.pix.width = std_info->width; common->fmt.fmt.pix.height = std_info->height; |