Skip to content

Commit

Permalink
OMAPDSS: DISPC: Remove omap_dss_device pointer usage from dispc_mgr_p…
Browse files Browse the repository at this point in the history
…clk_rate()

The pixel clock rate for the TV manager is calculated by checking the device
type connected to the manager, and then requesting the VENC/HDMI interface for
the pixel clock rate.

Remove the use of omap_dss_device pointer from here by checking which interface
generates the pixel clock by reading the DSS_CTRL.VENC_HDMI_SWITCH bit.

Signed-off-by: Archit Taneja <archit@ti.com>
  • Loading branch information
Archit Taneja authored and Tomi Valkeinen committed May 9, 2012
1 parent b3d795a commit 3fa03ba
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/video/omap2/dss/dispc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2643,13 +2643,14 @@ unsigned long dispc_mgr_pclk_rate(enum omap_channel channel)

return r / pcd;
} else {
struct omap_dss_device *dssdev =
dispc_mgr_get_device(channel);
enum dss_hdmi_venc_clk_source_select source;

switch (dssdev->type) {
case OMAP_DISPLAY_TYPE_VENC:
source = dss_get_hdmi_venc_clk_source();

switch (source) {
case DSS_VENC_TV_CLK:
return venc_get_pixel_clock();
case OMAP_DISPLAY_TYPE_HDMI:
case DSS_HDMI_M_PCLK:
return hdmi_get_pixel_clock();
default:
BUG();
Expand Down

0 comments on commit 3fa03ba

Please sign in to comment.