diff options
author | Archit Taneja <archit@ti.com> | 2012-06-25 01:54:10 -0400 |
---|---|---|
committer | Archit Taneja <archit@ti.com> | 2012-06-29 05:16:49 -0400 |
commit | bc2e60a69fead72cfff97ddccb4cca5ce75164a8 (patch) | |
tree | b18ed02bbbb926a6273941c6d5a2976c55086923 /drivers/video | |
parent | 5cf9a264115da9b69a2cdbe43ea0e741844bfef6 (diff) |
OMAPDSS: RFBI: Configure dss_lcd_mgr_config struct with lcd manager parameters
Create a dss_lcd_mgr_config struct instance in RFBI. Fill up all the parameters
of the struct with configurations held by the panel, and the configurations
required by RFBI.
Use these to write to the DISPC registers. These direct register writes would be
later replaced by a function which applies the configuration using the shadow
register programming model.
Create function rfbi_config_lcd_manager() which fills up the mgr_config
parameters and writes to the DISPC regs.
Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 539d709c6c0e..0dc8dac1c07c 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c | |||
@@ -859,6 +859,33 @@ static void rfbi_dump_regs(struct seq_file *s) | |||
859 | #undef DUMPREG | 859 | #undef DUMPREG |
860 | } | 860 | } |
861 | 861 | ||
862 | static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev) | ||
863 | { | ||
864 | struct dss_lcd_mgr_config mgr_config; | ||
865 | |||
866 | mgr_config.io_pad_mode = DSS_IO_PAD_MODE_RFBI; | ||
867 | |||
868 | mgr_config.stallmode = true; | ||
869 | /* Do we need fifohandcheck for RFBI? */ | ||
870 | mgr_config.fifohandcheck = false; | ||
871 | |||
872 | mgr_config.video_port_width = dssdev->ctrl.pixel_size; | ||
873 | mgr_config.lcden_sig_polarity = 0; | ||
874 | |||
875 | dispc_mgr_set_io_pad_mode(mgr_config.io_pad_mode); | ||
876 | |||
877 | dispc_mgr_enable_stallmode(dssdev->manager->id, mgr_config.stallmode); | ||
878 | dispc_mgr_enable_fifohandcheck(dssdev->manager->id, | ||
879 | mgr_config.fifohandcheck); | ||
880 | |||
881 | dispc_mgr_set_tft_data_lines(dssdev->manager->id, | ||
882 | mgr_config.video_port_width); | ||
883 | |||
884 | dispc_lcd_enable_signal_polarity(mgr_config.lcden_sig_polarity); | ||
885 | |||
886 | dispc_mgr_set_lcd_type_tft(dssdev->manager->id); | ||
887 | } | ||
888 | |||
862 | int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) | 889 | int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) |
863 | { | 890 | { |
864 | int r; | 891 | int r; |
@@ -885,12 +912,7 @@ int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) | |||
885 | goto err1; | 912 | goto err1; |
886 | } | 913 | } |
887 | 914 | ||
888 | dispc_mgr_set_lcd_type_tft(dssdev->manager->id); | 915 | rfbi_config_lcd_manager(dssdev); |
889 | |||
890 | dispc_mgr_set_io_pad_mode(DSS_IO_PAD_MODE_RFBI); | ||
891 | dispc_mgr_enable_stallmode(dssdev->manager->id, true); | ||
892 | |||
893 | dispc_mgr_set_tft_data_lines(dssdev->manager->id, dssdev->ctrl.pixel_size); | ||
894 | 916 | ||
895 | rfbi_configure(dssdev->phy.rfbi.channel, | 917 | rfbi_configure(dssdev->phy.rfbi.channel, |
896 | dssdev->ctrl.pixel_size, | 918 | dssdev->ctrl.pixel_size, |