diff options
author | Archit Taneja <archit@ti.com> | 2012-09-04 02:24:32 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-26 07:58:35 -0400 |
commit | 1db39c0a28483582c165b4f0ea07ca4a600a4630 (patch) | |
tree | e2ab82762c2dd804cf733c7e9a96a1888c161032 | |
parent | 7d6069e571d7c0882210ab5e885de4a940ef9391 (diff) |
OMAPDSS: RFBI: Replace dssdev->manager with dssdev->output->manager references
With addition of output entities, a device connects to an output, and an output
connects to overlay manager. Replace the dssdev->manager references with
dssdev->output->manager to access the manager correctly.
When enabling the RFBI output, check whether the output entity connected to
display is not NULL.
Signed-off-by: Archit Taneja <archit@ti.com>
-rw-r--r-- | drivers/video/omap2/dss/rfbi.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c index 58e51722fccf..7282e5af3e1a 100644 --- a/drivers/video/omap2/dss/rfbi.c +++ b/drivers/video/omap2/dss/rfbi.c | |||
@@ -312,6 +312,7 @@ static int rfbi_transfer_area(struct omap_dss_device *dssdev, | |||
312 | { | 312 | { |
313 | u32 l; | 313 | u32 l; |
314 | int r; | 314 | int r; |
315 | struct omap_overlay_manager *mgr = dssdev->output->manager; | ||
315 | u16 width = rfbi.timings.x_res; | 316 | u16 width = rfbi.timings.x_res; |
316 | u16 height = rfbi.timings.y_res; | 317 | u16 height = rfbi.timings.y_res; |
317 | 318 | ||
@@ -320,9 +321,9 @@ static int rfbi_transfer_area(struct omap_dss_device *dssdev, | |||
320 | 321 | ||
321 | DSSDBG("rfbi_transfer_area %dx%d\n", width, height); | 322 | DSSDBG("rfbi_transfer_area %dx%d\n", width, height); |
322 | 323 | ||
323 | dss_mgr_set_timings(dssdev->manager, &rfbi.timings); | 324 | dss_mgr_set_timings(mgr, &rfbi.timings); |
324 | 325 | ||
325 | r = dss_mgr_enable(dssdev->manager); | 326 | r = dss_mgr_enable(mgr); |
326 | if (r) | 327 | if (r) |
327 | return r; | 328 | return r; |
328 | 329 | ||
@@ -851,6 +852,7 @@ static void rfbi_dump_regs(struct seq_file *s) | |||
851 | 852 | ||
852 | static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev) | 853 | static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev) |
853 | { | 854 | { |
855 | struct omap_overlay_manager *mgr = dssdev->output->manager; | ||
854 | struct dss_lcd_mgr_config mgr_config; | 856 | struct dss_lcd_mgr_config mgr_config; |
855 | 857 | ||
856 | mgr_config.io_pad_mode = DSS_IO_PAD_MODE_RFBI; | 858 | mgr_config.io_pad_mode = DSS_IO_PAD_MODE_RFBI; |
@@ -862,7 +864,7 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev) | |||
862 | mgr_config.video_port_width = rfbi.pixel_size; | 864 | mgr_config.video_port_width = rfbi.pixel_size; |
863 | mgr_config.lcden_sig_polarity = 0; | 865 | mgr_config.lcden_sig_polarity = 0; |
864 | 866 | ||
865 | dss_mgr_set_lcd_config(dssdev->manager, &mgr_config); | 867 | dss_mgr_set_lcd_config(mgr, &mgr_config); |
866 | 868 | ||
867 | /* | 869 | /* |
868 | * Set rfbi.timings with default values, the x_res and y_res fields | 870 | * Set rfbi.timings with default values, the x_res and y_res fields |
@@ -883,15 +885,16 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev) | |||
883 | rfbi.timings.de_level = OMAPDSS_SIG_ACTIVE_HIGH; | 885 | rfbi.timings.de_level = OMAPDSS_SIG_ACTIVE_HIGH; |
884 | rfbi.timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES; | 886 | rfbi.timings.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES; |
885 | 887 | ||
886 | dss_mgr_set_timings(dssdev->manager, &rfbi.timings); | 888 | dss_mgr_set_timings(mgr, &rfbi.timings); |
887 | } | 889 | } |
888 | 890 | ||
889 | int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) | 891 | int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev) |
890 | { | 892 | { |
893 | struct omap_dss_output *out = dssdev->output; | ||
891 | int r; | 894 | int r; |
892 | 895 | ||
893 | if (dssdev->manager == NULL) { | 896 | if (out == NULL || out->manager == NULL) { |
894 | DSSERR("failed to enable display: no manager\n"); | 897 | DSSERR("failed to enable display: no output/manager\n"); |
895 | return -ENODEV; | 898 | return -ENODEV; |
896 | } | 899 | } |
897 | 900 | ||