diff options
author | Archit Taneja <archit@ti.com> | 2012-08-16 10:26:31 +0400 |
---|---|---|
committer | Archit Taneja <archit@ti.com> | 2012-08-16 17:17:52 +0400 |
commit | 89e7195634e563b72288bf13ef4dbdf4709d2d08 (patch) | |
tree | 8f786f5c3510ca8a70725e5c914ec5ad2ae4171c /drivers/video/omap2/dss/venc.c | |
parent | febe2905d08b238f4ee2eb7e99c402bf85f0f70f (diff) | |
download | linux-89e7195634e563b72288bf13ef4dbdf4709d2d08.tar.xz |
OMAPDSS: VENC: Maintian copy of video output polarity info in private data
The VENC driver currently relies on the omap_dss_device struct to configure the
video output polarity. This makes the VENC interface driver dependent on the
omap_dss_device struct.
Make the VENC driver data maintain it's own polarity field. A panel driver
is expected to call omapdss_venc_invert_vid_out_polarity() before enabling the
interface.
Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/venc.c')
-rw-r--r-- | drivers/video/omap2/dss/venc.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index 2d90fcf7e8f9..7d3eef8a010f 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c @@ -303,6 +303,7 @@ static struct { struct omap_video_timings timings; enum omap_dss_venc_type type; + bool invert_polarity; } venc; static inline void venc_write_reg(int idx, u32 val) @@ -447,7 +448,7 @@ static int venc_power_on(struct omap_dss_device *dssdev) else /* S-Video */ l |= (1 << 0) | (1 << 2); - if (dssdev->phy.venc.invert_polarity == false) + if (venc.invert_polarity == false) l |= 1 << 3; venc_write_reg(VENC_OUTPUT_CONTROL, l); @@ -639,6 +640,16 @@ void omapdss_venc_set_type(struct omap_dss_device *dssdev, mutex_unlock(&venc.venc_lock); } +void omapdss_venc_invert_vid_out_polarity(struct omap_dss_device *dssdev, + bool invert_polarity) +{ + mutex_lock(&venc.venc_lock); + + venc.invert_polarity = invert_polarity; + + mutex_unlock(&venc.venc_lock); +} + static int __init venc_init_display(struct omap_dss_device *dssdev) { DSSDBG("init_display\n"); |