diff options
| -rw-r--r-- | drivers/video/omap2/dss/core.c | 15 | ||||
| -rw-r--r-- | drivers/video/omap2/dss/dispc.c | 4 | ||||
| -rw-r--r-- | drivers/video/omap2/dss/dss.c | 15 | ||||
| -rw-r--r-- | drivers/video/omap2/dss/dss.h | 3 |
4 files changed, 19 insertions, 18 deletions
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 8c308317a19f..5c5e59190586 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c | |||
| @@ -101,21 +101,6 @@ struct regulator *dss_get_vdds_sdi(void) | |||
| 101 | return reg; | 101 | return reg; |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | int dss_get_ctx_loss_count(struct device *dev) | ||
| 105 | { | ||
| 106 | struct omap_dss_board_info *board_data = core.pdev->dev.platform_data; | ||
| 107 | int cnt; | ||
| 108 | |||
| 109 | if (!board_data->get_context_loss_count) | ||
| 110 | return -ENOENT; | ||
| 111 | |||
| 112 | cnt = board_data->get_context_loss_count(dev); | ||
| 113 | |||
| 114 | WARN_ONCE(cnt < 0, "get_context_loss_count failed: %d\n", cnt); | ||
| 115 | |||
| 116 | return cnt; | ||
| 117 | } | ||
| 118 | |||
| 119 | int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask) | 104 | int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask) |
| 120 | { | 105 | { |
| 121 | struct omap_dss_board_info *board_data = core.pdev->dev.platform_data; | 106 | struct omap_dss_board_info *board_data = core.pdev->dev.platform_data; |
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index ce594a1d860c..f7df52306788 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
| @@ -382,7 +382,7 @@ static void dispc_save_context(void) | |||
| 382 | if (dss_has_feature(FEAT_CORE_CLK_DIV)) | 382 | if (dss_has_feature(FEAT_CORE_CLK_DIV)) |
| 383 | SR(DIVISOR); | 383 | SR(DIVISOR); |
| 384 | 384 | ||
| 385 | dispc.ctx_loss_cnt = dss_get_ctx_loss_count(&dispc.pdev->dev); | 385 | dispc.ctx_loss_cnt = dss_get_ctx_loss_count(); |
| 386 | dispc.ctx_valid = true; | 386 | dispc.ctx_valid = true; |
| 387 | 387 | ||
| 388 | DSSDBG("context saved, ctx_loss_count %d\n", dispc.ctx_loss_cnt); | 388 | DSSDBG("context saved, ctx_loss_count %d\n", dispc.ctx_loss_cnt); |
| @@ -397,7 +397,7 @@ static void dispc_restore_context(void) | |||
| 397 | if (!dispc.ctx_valid) | 397 | if (!dispc.ctx_valid) |
| 398 | return; | 398 | return; |
| 399 | 399 | ||
| 400 | ctx = dss_get_ctx_loss_count(&dispc.pdev->dev); | 400 | ctx = dss_get_ctx_loss_count(); |
| 401 | 401 | ||
| 402 | if (ctx >= 0 && ctx == dispc.ctx_loss_cnt) | 402 | if (ctx >= 0 && ctx == dispc.ctx_loss_cnt) |
| 403 | return; | 403 | return; |
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 6ca69d55cf57..833f1627dc76 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c | |||
| @@ -154,6 +154,21 @@ static void dss_restore_context(void) | |||
| 154 | #undef SR | 154 | #undef SR |
| 155 | #undef RR | 155 | #undef RR |
| 156 | 156 | ||
| 157 | int dss_get_ctx_loss_count(void) | ||
| 158 | { | ||
| 159 | struct omap_dss_board_info *board_data = dss.pdev->dev.platform_data; | ||
| 160 | int cnt; | ||
| 161 | |||
| 162 | if (!board_data->get_context_loss_count) | ||
| 163 | return -ENOENT; | ||
| 164 | |||
| 165 | cnt = board_data->get_context_loss_count(&dss.pdev->dev); | ||
| 166 | |||
| 167 | WARN_ONCE(cnt < 0, "get_context_loss_count failed: %d\n", cnt); | ||
| 168 | |||
| 169 | return cnt; | ||
| 170 | } | ||
| 171 | |||
| 157 | void dss_sdi_init(int datapairs) | 172 | void dss_sdi_init(int datapairs) |
| 158 | { | 173 | { |
| 159 | u32 l; | 174 | u32 l; |
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 9ee3c881d1c0..4d6f325cee84 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h | |||
| @@ -164,7 +164,6 @@ struct platform_device *dss_get_core_pdev(void); | |||
| 164 | struct bus_type *dss_get_bus(void); | 164 | struct bus_type *dss_get_bus(void); |
| 165 | struct regulator *dss_get_vdds_dsi(void); | 165 | struct regulator *dss_get_vdds_dsi(void); |
| 166 | struct regulator *dss_get_vdds_sdi(void); | 166 | struct regulator *dss_get_vdds_sdi(void); |
| 167 | int dss_get_ctx_loss_count(struct device *dev); | ||
| 168 | int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask); | 167 | int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask); |
| 169 | void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask); | 168 | void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask); |
| 170 | int dss_set_min_bus_tput(struct device *dev, unsigned long tput); | 169 | int dss_set_min_bus_tput(struct device *dev, unsigned long tput); |
| @@ -284,6 +283,8 @@ void dss_dump_clocks(struct seq_file *s); | |||
| 284 | void dss_debug_dump_clocks(struct seq_file *s); | 283 | void dss_debug_dump_clocks(struct seq_file *s); |
| 285 | #endif | 284 | #endif |
| 286 | 285 | ||
| 286 | int dss_get_ctx_loss_count(void); | ||
| 287 | |||
| 287 | void dss_sdi_init(int datapairs); | 288 | void dss_sdi_init(int datapairs); |
| 288 | int dss_sdi_enable(void); | 289 | int dss_sdi_enable(void); |
| 289 | void dss_sdi_disable(void); | 290 | void dss_sdi_disable(void); |
