diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-02-13 14:00:23 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2018-03-01 09:18:18 +0200 |
commit | d7157dfe0460fb003d41c1a5c36788de9b639ecb (patch) | |
tree | ae5ae04e92cfc49817a4162dea468abd9ed1ca6c /drivers/gpu/drm/omapdrm/dss/sdi.c | |
parent | 2726099921caab2473dca91c9ddc4f4a108f4c15 (diff) | |
download | linux-d7157dfe0460fb003d41c1a5c36788de9b639ecb.tar.gz linux-d7157dfe0460fb003d41c1a5c36788de9b639ecb.tar.bz2 linux-d7157dfe0460fb003d41c1a5c36788de9b639ecb.zip |
drm: omapdrm: dss: Pass DSS pointer to dss_sdi_*() functions
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/sdi.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/sdi.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index d8ab31f3a813..f0564daa3831 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -31,6 +31,7 @@ static struct { struct platform_device *pdev; + struct dss_device *dss; bool update_enabled; struct regulator *vdds_sdi_reg; @@ -187,8 +188,8 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) */ dispc_mgr_set_clock_div(channel, &sdi.mgr_config.clock_info); - dss_sdi_init(sdi.datapairs); - r = dss_sdi_enable(); + dss_sdi_init(sdi.dss, sdi.datapairs); + r = dss_sdi_enable(sdi.dss); if (r) goto err_sdi_enable; mdelay(2); @@ -200,7 +201,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) return 0; err_mgr_enable: - dss_sdi_disable(); + dss_sdi_disable(sdi.dss); err_sdi_enable: err_set_dss_clock_div: err_calc_clock_div: @@ -217,7 +218,7 @@ static void sdi_display_disable(struct omap_dss_device *dssdev) dss_mgr_disable(channel); - dss_sdi_disable(); + dss_sdi_disable(sdi.dss); dispc_runtime_put(); @@ -345,7 +346,8 @@ static void sdi_uninit_output(struct platform_device *pdev) omapdss_unregister_output(out); } -int sdi_init_port(struct platform_device *pdev, struct device_node *port) +int sdi_init_port(struct dss_device *dss, struct platform_device *pdev, + struct device_node *port) { struct device_node *ep; u32 datapairs; @@ -362,6 +364,7 @@ int sdi_init_port(struct platform_device *pdev, struct device_node *port) } sdi.datapairs = datapairs; + sdi.dss = dss; of_node_put(ep); |