Skip to content

Commit

Permalink
OMAPDSS: DISPC: pclk & lclk rates for writeback
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomi Valkeinen committed Nov 27, 2012
1 parent 3c91ee8 commit 251886d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions drivers/video/omap2/dss/dispc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 251886d

Please sign in to comment.