aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/display.c4
-rwxr-xr-xdrivers/video/omap2/dss/dsi.c13
-rw-r--r--include/video/omapdss.h2
3 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index dd91c20..417bd66 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -27,6 +27,8 @@
#include <plat/omap_device.h>
#include <plat/omap-pm.h>
+#include "dvfs.h"
+
static struct platform_device omap_display_device = {
.name = "omapdss",
.id = -1,
@@ -97,7 +99,7 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
}
pdata.board_data = board_data;
-
+ pdata.device_scale = omap_device_scale;
for (i = 0; i < oh_count; i++) {
oh = omap_hwmod_lookup(curr_dss_hwmod[i].oh_name);
if (!oh) {
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index ebbeb2d..fc0b00f 100755
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -4722,6 +4722,7 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev)
{
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
+ struct omap_display_platform_data *dss_plat_data;
int r = 0;
DSSDBG("dsi_display_enable\n");
@@ -4740,6 +4741,11 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev)
if (r)
goto err_get_dsi;
+ dss_plat_data = dsidev->dev.platform_data;
+ dss_plat_data->device_scale(&dssdev->dev,
+ omap_hwmod_name_get_dev("dss_dispc"),
+ dssdev->panel.timings.pixel_clock * 1000);
+
if(!dssdev->skip_init)
dsi_enable_pll_clock(dsidev, 1);
@@ -4771,6 +4777,8 @@ err_init_dsi:
dsi_display_uninit_dispc(dssdev);
err_init_dispc:
dsi_enable_pll_clock(dsidev, 0);
+ dss_plat_data->device_scale(&dssdev->dev,
+ omap_hwmod_name_get_dev("dss_dispc"), 0);
dsi_runtime_put(dsidev);
err_get_dsi:
omap_dss_stop_device(dssdev);
@@ -4786,6 +4794,7 @@ void omapdss_dsi_display_disable(struct omap_dss_device *dssdev,
{
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
+ struct omap_display_platform_data *dss_plat_data;
DSSDBG("dsi_display_disable\n");
@@ -4797,6 +4806,10 @@ void omapdss_dsi_display_disable(struct omap_dss_device *dssdev,
dsi_display_uninit_dsi(dssdev, disconnect_lanes, enter_ulps);
+ dss_plat_data = dsidev->dev.platform_data;
+ dss_plat_data->device_scale(&dssdev->dev,
+ omap_hwmod_name_get_dev("dss_dispc"), 0);
+
dsi_runtime_put(dsidev);
dsi_enable_pll_clock(dsidev, 0);
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 352640d..b6928f6 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -303,6 +303,8 @@ static inline int omap_display_init(struct omap_dss_board_info *board_data)
struct omap_display_platform_data {
struct omap_dss_board_info *board_data;
/* TODO: Additional members to be added when PM is considered */
+ int (*device_scale) (struct device *req_dev, struct device *target_dev,
+ unsigned long rate);
};
struct omap_video_timings {