summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen2012-11-15 12:20:02 +0100
committerTomi Valkeinen2012-11-27 11:27:02 +0100
commit251886d8bc6f565c14acb34b12c007b994c2e56d (patch)
tree972c2ea0dcd3af64427e694d75335e0c7a09d179 /drivers/video
parentOMAPDSS: DISPC: use WARN_ON() in dispc_mgr_go (diff)
downloadkernel-qcow2-linux-251886d8bc6f565c14acb34b12c007b994c2e56d.tar.gz
kernel-qcow2-linux-251886d8bc6f565c14acb34b12c007b994c2e56d.tar.xz
kernel-qcow2-linux-251886d8bc6f565c14acb34b12c007b994c2e56d.zip
OMAPDSS: DISPC: pclk & lclk rates for writeback
Change the dispc_plane_pclk_rate and dispc_plane_lclk_rate functions to return 0 if the given plane is the writeback plane. The clocks are not valid for WB, but returning 0 from these functions instead of running into BUG() will simplify the code that uses these functions. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/dispc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 531961424d33..fff26fd5d17f 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -3232,14 +3232,24 @@ unsigned long dispc_core_clk_rate(void)
static unsigned long dispc_plane_pclk_rate(enum omap_plane plane)
{
- enum omap_channel channel = dispc_ovl_get_channel_out(plane);
+ enum omap_channel channel;
+
+ if (plane == OMAP_DSS_WB)
+ return 0;
+
+ channel = dispc_ovl_get_channel_out(plane);
return dispc_mgr_pclk_rate(channel);
}
static unsigned long dispc_plane_lclk_rate(enum omap_plane plane)
{
- enum omap_channel channel = dispc_ovl_get_channel_out(plane);
+ enum omap_channel channel;
+
+ if (plane == OMAP_DSS_WB)
+ return 0;
+
+ channel = dispc_ovl_get_channel_out(plane);
return dispc_mgr_lclk_rate(channel);
}