aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/davinci/vpif_capture.c
diff options
context:
space:
mode:
authorMats Randgaard <mats.randgaard@cisco.com>2010-12-16 10:17:42 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-01-19 08:28:15 -0500
commitaa4444063505983c5971bc8fb832385dfba16b41 (patch)
tree6c9e1642c9350a6395d72755a290c475407aeeff /drivers/media/video/davinci/vpif_capture.c
parent7036d6a73c88428764e4a12f30846279346f4382 (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_capture.c')
-rw-r--r--drivers/media/video/davinci/vpif_capture.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/media/video/davinci/vpif_capture.c b/drivers/media/video/davinci/vpif_capture.c
index 9446dbc476fd..0a7ebb0e151a 100644
--- a/drivers/media/video/davinci/vpif_capture.c
+++ b/drivers/media/video/davinci/vpif_capture.c
@@ -82,20 +82,6 @@ static struct vpif_device vpif_obj = { {NULL} };
82static struct device *vpif_dev; 82static struct device *vpif_dev;
83 83
84/** 84/**
85 * ch_params: video standard configuration parameters for vpif
86 */
87static const struct vpif_channel_config_params ch_params[] = {
88 {
89 "NTSC_M", 720, 480, 30, 0, 1, 268, 1440, 1, 23, 263, 266,
90 286, 525, 525, 0, 1, 0, V4L2_STD_525_60,
91 },
92 {
93 "PAL_BDGHIK", 720, 576, 25, 0, 1, 280, 1440, 1, 23, 311, 313,
94 336, 624, 625, 0, 1, 0, V4L2_STD_625_50,
95 },
96};
97
98/**
99 * vpif_uservirt_to_phys : translate user/virtual address to phy address 85 * vpif_uservirt_to_phys : translate user/virtual address to phy address
100 * @virtp: user/virtual address 86 * @virtp: user/virtual address
101 * 87 *
@@ -444,7 +430,7 @@ static int vpif_update_std_info(struct channel_obj *ch)
444 430
445 std_info = &vpifparams->std_info; 431 std_info = &vpifparams->std_info;
446 432
447 for (index = 0; index < ARRAY_SIZE(ch_params); index++) { 433 for (index = 0; index < vpif_ch_params_count; index++) {
448 config = &ch_params[index]; 434 config = &ch_params[index];
449 if (config->stdid & vid_ch->stdid) { 435 if (config->stdid & vid_ch->stdid) {
450 memcpy(std_info, config, sizeof(*config)); 436 memcpy(std_info, config, sizeof(*config));
@@ -453,7 +439,7 @@ static int vpif_update_std_info(struct channel_obj *ch)
453 } 439 }
454 440
455 /* standard not found */ 441 /* standard not found */
456 if (index == ARRAY_SIZE(ch_params)) 442 if (index == vpif_ch_params_count)
457 return -EINVAL; 443 return -EINVAL;
458 444
459 common->fmt.fmt.pix.width = std_info->width; 445 common->fmt.fmt.pix.width = std_info->width;