diff options
author | Archit Taneja <archit@ti.com> | 2012-08-13 05:58:15 -0400 |
---|---|---|
committer | Archit Taneja <archit@ti.com> | 2012-08-16 08:30:54 -0400 |
commit | 475989b763668f0794d6a8ee34a1ca0e784831e2 (patch) | |
tree | 29034bc47a822f28326b62b3e6523a931c6294f1 /drivers/video | |
parent | b02875be08fd2ca7a195154c9f1c538508ca0d5a (diff) |
OMAPDSS: RFBI: Maintain copy of number of data lines in driver data
The RFBI driver currently relies on the omap_dss_device struct to configure the
number of data lines as specified by the panel. This makes the RFBI interface
driver dependent on the omap_dss_device struct.
Make the RFBI driver data maintain it's own data lines field. A panel driver
is expected to call omapdss_rfbi_set_data_lines() 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')
-rw-r--r-- | drivers/video/omap2/displays/panel-n8x0.c | 7 | ||||
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 13 |
2 files changed, 15 insertions, 5 deletions
diff --git a/drivers/video/omap2/displays/panel-n8x0.c b/drivers/video/omap2/displays/panel-n8x0.c index 9565958ebaa9..3ffd987ad8b2 100644 --- a/drivers/video/omap2/displays/panel-n8x0.c +++ b/drivers/video/omap2/displays/panel-n8x0.c | |||
@@ -151,14 +151,16 @@ static void blizzard_ctrl_setup_update(struct omap_dss_device *dssdev, | |||
151 | BLIZZARD_SRC_WRITE_LCD_DESTRUCTIVE; | 151 | BLIZZARD_SRC_WRITE_LCD_DESTRUCTIVE; |
152 | 152 | ||
153 | omapdss_rfbi_set_pixel_size(dssdev, 16); | 153 | omapdss_rfbi_set_pixel_size(dssdev, 16); |
154 | omapdss_rfbi_set_data_lines(dssdev, 8); | ||
154 | 155 | ||
155 | omap_rfbi_configure(dssdev, 8); | 156 | omap_rfbi_configure(dssdev); |
156 | 157 | ||
157 | blizzard_write(BLIZZARD_INPUT_WIN_X_START_0, tmp, 18); | 158 | blizzard_write(BLIZZARD_INPUT_WIN_X_START_0, tmp, 18); |
158 | 159 | ||
159 | omapdss_rfbi_set_pixel_size(dssdev, 16); | 160 | omapdss_rfbi_set_pixel_size(dssdev, 16); |
161 | omapdss_rfbi_set_data_lines(dssdev, 16); | ||
160 | 162 | ||
161 | omap_rfbi_configure(dssdev, 16); | 163 | omap_rfbi_configure(dssdev); |
162 | } | 164 | } |
163 | 165 | ||
164 | static void mipid_transfer(struct spi_device *spi, int cmd, const u8 *wbuf, | 166 | static void mipid_transfer(struct spi_device *spi, int cmd, const u8 *wbuf, |
@@ -304,6 +306,7 @@ static int n8x0_panel_power_on(struct omap_dss_device *dssdev) | |||
304 | omapdss_rfbi_set_size(dssdev, dssdev->panel.timings.x_res, | 306 | omapdss_rfbi_set_size(dssdev, dssdev->panel.timings.x_res, |
305 | dssdev->panel.timings.y_res); | 307 | dssdev->panel.timings.y_res); |
306 | omapdss_rfbi_set_pixel_size(dssdev, dssdev->ctrl.pixel_size); | 308 | omapdss_rfbi_set_pixel_size(dssdev, dssdev->ctrl.pixel_size); |
309 | omapdss_rfbi_set_data_lines(dssdev, dssdev->phy.rfbi.data_lines); | ||
307 | 310 | ||
308 | r = omapdss_rfbi_display_enable(dssdev); | 311 | r = omapdss_rfbi_display_enable(dssdev); |
309 | if (r) | 312 | if (r) |
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 98c65223789e..698d5b92f8e2 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c | |||
@@ -114,6 +114,7 @@ static struct { | |||
114 | 114 | ||
115 | struct omap_video_timings timings; | 115 | struct omap_video_timings timings; |
116 | int pixel_size; | 116 | int pixel_size; |
117 | int data_lines; | ||
117 | } rfbi; | 118 | } rfbi; |
118 | 119 | ||
119 | static inline void rfbi_write_reg(const struct rfbi_reg idx, u32 val) | 120 | static inline void rfbi_write_reg(const struct rfbi_reg idx, u32 val) |
@@ -765,10 +766,10 @@ static int rfbi_configure(int rfbi_module, int bpp, int lines) | |||
765 | return 0; | 766 | return 0; |
766 | } | 767 | } |
767 | 768 | ||
768 | int omap_rfbi_configure(struct omap_dss_device *dssdev, int data_lines) | 769 | int omap_rfbi_configure(struct omap_dss_device *dssdev) |
769 | { | 770 | { |
770 | return rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, | 771 | return rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, |
771 | data_lines); | 772 | rfbi.data_lines); |
772 | } | 773 | } |
773 | EXPORT_SYMBOL(omap_rfbi_configure); | 774 | EXPORT_SYMBOL(omap_rfbi_configure); |
774 | 775 | ||
@@ -792,6 +793,12 @@ void omapdss_rfbi_set_pixel_size(struct omap_dss_device *dssdev, int pixel_size) | |||
792 | } | 793 | } |
793 | EXPORT_SYMBOL(omapdss_rfbi_set_pixel_size); | 794 | EXPORT_SYMBOL(omapdss_rfbi_set_pixel_size); |
794 | 795 | ||
796 | void omapdss_rfbi_set_data_lines(struct omap_dss_device *dssdev, int data_lines) | ||
797 | { | ||
798 | rfbi.data_lines = data_lines; | ||
799 | } | ||
800 | EXPORT_SYMBOL(omapdss_rfbi_set_data_lines); | ||
801 | |||
795 | static void rfbi_dump_regs(struct seq_file *s) | 802 | static void rfbi_dump_regs(struct seq_file *s) |
796 | { | 803 | { |
797 | #define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, rfbi_read_reg(r)) | 804 | #define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, rfbi_read_reg(r)) |
@@ -898,7 +905,7 @@ int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) | |||
898 | rfbi_config_lcd_manager(dssdev); | 905 | rfbi_config_lcd_manager(dssdev); |
899 | 906 | ||
900 | rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, | 907 | rfbi_configure(dssdev->phy.rfbi.channel, rfbi.pixel_size, |
901 | dssdev->phy.rfbi.data_lines); | 908 | rfbi.data_lines); |
902 | 909 | ||
903 | rfbi_set_timings(dssdev->phy.rfbi.channel, | 910 | rfbi_set_timings(dssdev->phy.rfbi.channel, |
904 | &dssdev->ctrl.rfbi_timings); | 911 | &dssdev->ctrl.rfbi_timings); |