diff options
author | Archit Taneja <archit@ti.com> | 2012-08-13 13:56:49 +0400 |
---|---|---|
committer | Archit Taneja <archit@ti.com> | 2012-08-16 16:30:54 +0400 |
commit | b02875be08fd2ca7a195154c9f1c538508ca0d5a (patch) | |
tree | 65d9ea0d7f7c0a171e4e89c8ae7c9e10cccb0f79 /drivers/video/omap2/dss/rfbi.c | |
parent | 02c3960b1eeafd5ed30323e1bb86bfa099b46921 (diff) | |
download | linux-b02875be08fd2ca7a195154c9f1c538508ca0d5a.tar.xz |
OMAPDSS: RFBI: Maintain copy of pixel size in driver data
The RFBI driver currently relies on the omap_dss_device struct to receive the
desired pixel size of the panel. This makes the RFBI interface driver dependent
on the omap_dss_device struct.
Make the RFBI driver data maintain it's own pixel format field. A panel driver
is expected to call omapdss_rfbi_set_pixel_size() to configure the pixel format
before enabling the interface or calling omap_rfbi_configure().
Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/rfbi.c')
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 40abee72aaee..98c65223789e 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c @@ -113,6 +113,7 @@ static struct { struct semaphore bus_lock; struct omap_video_timings timings; + int pixel_size; } rfbi; static inline void rfbi_write_reg(const struct rfbi_reg idx, u32 val) @@ -764,10 +765,10 @@ static int rfbi_configure(int rfbi_module, int bpp, int lines) return 0; } -int omap_rfbi_configure(struct omap_dss_device *dssdev, int pixel_size, - int data_lines) +int omap_rfbi_configure(struct omap_dss_device *dssdev, int data_lines) { - return rfbi_configure(dssdev->phy.rfbi.channel, pixel_size, data_lines); + return rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, + data_lines); } EXPORT_SYMBOL(omap_rfbi_configure); @@ -785,6 +786,12 @@ void omapdss_rfbi_set_size(struct omap_dss_device *dssdev, u16 w, u16 h) } EXPORT_SYMBOL(omapdss_rfbi_set_size); +void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev, int pixel_size) +{ + rfbi.pixel_size = pixel_size; +} +EXPORT_SYMBOL(omapdss_rfbi_set_pixel_size); + static void rfbi_dump_regs(struct seq_file *s) { #define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, rfbi_read_reg(r)) @@ -835,7 +842,7 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev) /* Do we need fifohandcheck for RFBI? */ mgr_config.fifohandcheck = false; - mgr_config.video_port_width = dssdev->ctrl.pixel_size; + mgr_config.video_port_width = rfbi.pixel_size; mgr_config.lcden_sig_polarity = 0; dss_mgr_set_lcd_config(dssdev->manager, &mgr_config); @@ -890,9 +897,8 @@ int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) rfbi_config_lcd_manager(dssdev); - rfbi_configure(dssdev->phy.rfbi.channel, - dssdev->ctrl.pixel_size, - dssdev->phy.rfbi.data_lines); + rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, + dssdev->phy.rfbi.data_lines); rfbi_set_timings(dssdev->phy.rfbi.channel, &dssdev->ctrl.rfbi_timings); |