]>
Commit | Line | Data |
---|---|---|
d006af40 AF |
1 | From 6bce72b21600d9f52ae60d5bf80d00152eb75b50 Mon Sep 17 00:00:00 2001 |
2 | From: Steve Sakoman <steve@sakoman.com> | |
3 | Date: Tue, 19 Jan 2010 21:19:15 -0800 | |
4 | Subject: [PATCH 1/2] OMAP: DSS2: add bootarg for selecting svideo | |
5 | ||
6 | OMAP: DSS2: add bootarg for selecting svideo or composite for tv output | |
7 | also add pal-16 and ntsc-16 omapfb.mode settings for 16bpp | |
8 | ||
9 | Signed-off-by: Robert Nelson <robertcnelson@gmail.com> | |
10 | --- | |
11 | drivers/video/omap2/dss/venc.c | 22 ++++++++++++++++++++++ | |
12 | drivers/video/omap2/omapfb/omapfb-main.c | 10 +++++++++- | |
13 | 2 files changed, 31 insertions(+), 1 deletions(-) | |
14 | ||
15 | diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c | |
16 | index 56efa3b..d46f7f8 100644 | |
17 | --- a/drivers/video/omap2/dss/venc.c | |
18 | +++ b/drivers/video/omap2/dss/venc.c | |
19 | @@ -86,6 +86,11 @@ | |
20 | #define VENC_OUTPUT_TEST 0xC8 | |
21 | #define VENC_DAC_B__DAC_C 0xC8 | |
22 | ||
23 | +static char *tv_connection; | |
24 | + | |
25 | +module_param_named(tvcable, tv_connection, charp, 0); | |
26 | +MODULE_PARM_DESC(tvcable, "TV connection type (svideo, composite)"); | |
27 | + | |
28 | struct venc_config { | |
29 | u32 f_control; | |
30 | u32 vidout_ctrl; | |
31 | @@ -465,6 +470,23 @@ static int venc_power_on(struct omap_dss_device *dssdev) | |
32 | if (r) | |
33 | goto err2; | |
34 | ||
35 | + /* Allow the TV output to be overriden */ | |
36 | + if (tv_connection) { | |
37 | + if (strcmp(tv_connection, "svideo") == 0) { | |
38 | + printk(KERN_INFO | |
39 | + "omapdss: tv output is svideo.\n"); | |
40 | + dssdev->phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO; | |
41 | + } else if (strcmp(tv_connection, "composite") == 0) { | |
42 | + printk(KERN_INFO | |
43 | + "omapdss: tv output is composite.\n"); | |
44 | + dssdev->phy.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE; | |
45 | + } else { | |
46 | + printk(KERN_INFO | |
47 | + "omapdss: unsupported output type'%s'.\n", | |
48 | + tv_connection); | |
49 | + } | |
50 | + } | |
51 | + | |
52 | return 0; | |
53 | ||
54 | err2: | |
55 | diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c | |
56 | index bc225e4..34d6679 100644 | |
57 | --- a/drivers/video/omap2/omapfb/omapfb-main.c | |
58 | +++ b/drivers/video/omap2/omapfb/omapfb-main.c | |
59 | @@ -2032,7 +2032,15 @@ static int omapfb_mode_to_timings(const char *mode_str, | |
60 | int r; | |
61 | ||
62 | #ifdef CONFIG_OMAP2_DSS_VENC | |
63 | - if (strcmp(mode_str, "pal") == 0) { | |
64 | + if (strcmp(mode_str, "pal-16") == 0) { | |
65 | + *timings = omap_dss_pal_timings; | |
66 | + *bpp = 16; | |
67 | + return 0; | |
68 | + } else if (strcmp(mode_str, "ntsc-16") == 0) { | |
69 | + *timings = omap_dss_ntsc_timings; | |
70 | + *bpp = 16; | |
71 | + return 0; | |
72 | + } else if (strcmp(mode_str, "pal") == 0) { | |
73 | *timings = omap_dss_pal_timings; | |
74 | *bpp = 24; | |
75 | return 0; | |
76 | -- | |
77 | 1.7.7.6 | |
78 |