summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/dss/dss.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-02-13 13:00:25 +0100
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-03-01 08:18:18 +0100
commit3cc62aadf414102785adbfc3dd2f2f3be85d60db (patch)
tree2395b877248336dec6ff96bf8ac5932f7cfb421a /drivers/gpu/drm/omapdrm/dss/dss.c
parentdrm: omapdrm: dss: Pass DSS pointer to dss_ops operations (diff)
downloadlinux-3cc62aadf414102785adbfc3dd2f2f3be85d60db.tar.xz
linux-3cc62aadf414102785adbfc3dd2f2f3be85d60db.zip
drm: omapdrm: dss: Pass DSS pointer to dss_get_*_clk_source()
This removes the need to access the global DSS private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DSS device dynamically). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/dss.c')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dss.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c
index 73698a497e4a..bdf8f66002b6 100644
--- a/drivers/gpu/drm/omapdrm/dss/dss.c
+++ b/drivers/gpu/drm/omapdrm/dss/dss.c
@@ -570,25 +570,27 @@ void dss_select_lcd_clk_source(struct dss_device *dss,
dss->lcd_clk_source[idx] = clk_src;
}
-enum dss_clk_source dss_get_dispc_clk_source(void)
+enum dss_clk_source dss_get_dispc_clk_source(struct dss_device *dss)
{
- return dss.dispc_clk_source;
+ return dss->dispc_clk_source;
}
-enum dss_clk_source dss_get_dsi_clk_source(int dsi_module)
+enum dss_clk_source dss_get_dsi_clk_source(struct dss_device *dss,
+ int dsi_module)
{
- return dss.dsi_clk_source[dsi_module];
+ return dss->dsi_clk_source[dsi_module];
}
-enum dss_clk_source dss_get_lcd_clk_source(enum omap_channel channel)
+enum dss_clk_source dss_get_lcd_clk_source(struct dss_device *dss,
+ enum omap_channel channel)
{
- if (dss.feat->has_lcd_clk_src) {
+ if (dss->feat->has_lcd_clk_src) {
int idx = dss_get_channel_index(channel);
- return dss.lcd_clk_source[idx];
+ return dss->lcd_clk_source[idx];
} else {
/* LCD_CLK source is the same as DISPC_FCLK source for
* OMAP2 and OMAP3 */
- return dss.dispc_clk_source;
+ return dss->dispc_clk_source;
}
}