Skip to content

Commit

Permalink
OMAP: DSS2: add bootarg for selecting svideo or composite for tv output
Browse files Browse the repository at this point in the history
also add pal-16 and ntsc-16 omapfb.mode settings for 16bpp
  • Loading branch information
sakoman committed Mar 15, 2011
1 parent 9dde51a commit be3d226
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
22 changes: 22 additions & 0 deletions drivers/video/omap2/dss/venc.c
Expand Up @@ -87,6 +87,11 @@
#define VENC_OUTPUT_TEST 0xC8
#define VENC_DAC_B__DAC_C 0xC8

static char *tv_connection;

module_param_named(tvcable, tv_connection, charp, 0);
MODULE_PARM_DESC(tvcable, "TV connection type (svideo, composite)");

struct venc_config {
u32 f_control;
u32 vidout_ctrl;
Expand Down Expand Up @@ -459,6 +464,23 @@ static int venc_panel_probe(struct omap_dss_device *dssdev)
{
dssdev->panel.timings = omap_dss_pal_timings;

/* Allow the TV output to be overriden */
if (tv_connection) {
if (strcmp(tv_connection, "svideo") == 0) {
printk(KERN_INFO
"omapdss: tv output is svideo.\n");
dssdev->phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO;
} else if (strcmp(tv_connection, "composite") == 0) {
printk(KERN_INFO
"omapdss: tv output is composite.\n");
dssdev->phy.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE;
} else {
printk(KERN_INFO
"omapdss: unsupported output type'%s'.\n",
tv_connection);
}
}

return 0;
}

Expand Down
10 changes: 9 additions & 1 deletion drivers/video/omap2/omapfb/omapfb-main.c
Expand Up @@ -2036,7 +2036,15 @@ static int omapfb_mode_to_timings(const char *mode_str,
int r;

#ifdef CONFIG_OMAP2_DSS_VENC
if (strcmp(mode_str, "pal") == 0) {
if (strcmp(mode_str, "pal-16") == 0) {
*timings = omap_dss_pal_timings;
*bpp = 16;
return 0;
} else if (strcmp(mode_str, "ntsc-16") == 0) {
*timings = omap_dss_ntsc_timings;
*bpp = 16;
return 0;
} else if (strcmp(mode_str, "pal") == 0) {
*timings = omap_dss_pal_timings;
*bpp = 24;
return 0;
Expand Down

0 comments on commit be3d226

Please sign in to comment.