diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-02-13 15:00:38 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2018-03-01 10:18:18 +0300 |
commit | 28d79f3e56b2c1d5ff0fd363da3229be0962cc85 (patch) | |
tree | 7b2272cffb1ad422de2e3bbf33be75a741cbcc85 /drivers/gpu/drm/omapdrm/dss/hdmi5.c | |
parent | f81b0fd4701c6c25481a81f8ec279ddb9fa2c27a (diff) | |
download | linux-28d79f3e56b2c1d5ff0fd363da3229be0962cc85.tar.xz |
drm: omapdrm: dss: Pass omap_dss_device pointer to dss_mgr_*() functions
The dss_mgr_*() functions take a channel argument to identify the
channel they operate on. This prevents the functions from accessing
driver data structures without resorting to global variables. In an
effort to remove global variables, pass the omap_dss_device pointer
associated with the channel instead. This will be used to look up the
omap_drm_private data structure to pass to the dss_mgr_ops.
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/hdmi5.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/hdmi5.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index 8ede19c3d8e7..597baebd959c 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c @@ -173,7 +173,6 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) { int r; struct videomode *vm; - enum omap_channel channel = dssdev->dispc_channel; struct dss_pll_clock_info hdmi_cinfo = { 0 }; unsigned int pc; @@ -227,9 +226,9 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) hdmi5_configure(&hdmi.core, &hdmi.wp, &hdmi.cfg); /* tv size */ - dss_mgr_set_timings(channel, vm); + dss_mgr_set_timings(&hdmi.output, vm); - r = dss_mgr_enable(channel); + r = dss_mgr_enable(&hdmi.output); if (r) goto err_mgr_enable; @@ -243,7 +242,7 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev) return 0; err_vid_enable: - dss_mgr_disable(channel); + dss_mgr_disable(&hdmi.output); err_mgr_enable: hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); err_phy_pwr: @@ -257,13 +256,11 @@ err_pll_enable: static void hdmi_power_off_full(struct omap_dss_device *dssdev) { - enum omap_channel channel = dssdev->dispc_channel; - hdmi_wp_clear_irqenable(&hdmi.wp, 0xffffffff); hdmi_wp_video_stop(&hdmi.wp); - dss_mgr_disable(channel); + dss_mgr_disable(&hdmi.output); hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); @@ -456,14 +453,13 @@ static void hdmi_core_disable(struct omap_dss_device *dssdev) static int hdmi_connect(struct omap_dss_device *dssdev, struct omap_dss_device *dst) { - enum omap_channel channel = dssdev->dispc_channel; int r; r = hdmi_init_regulator(); if (r) return r; - r = dss_mgr_connect(channel, dssdev); + r = dss_mgr_connect(&hdmi.output, dssdev); if (r) return r; @@ -471,7 +467,7 @@ static int hdmi_connect(struct omap_dss_device *dssdev, if (r) { DSSERR("failed to connect output to new device: %s\n", dst->name); - dss_mgr_disconnect(channel, dssdev); + dss_mgr_disconnect(&hdmi.output, dssdev); return r; } @@ -481,8 +477,6 @@ static int hdmi_connect(struct omap_dss_device *dssdev, static void hdmi_disconnect(struct omap_dss_device *dssdev, struct omap_dss_device *dst) { - enum omap_channel channel = dssdev->dispc_channel; - WARN_ON(dst != dssdev->dst); if (dst != dssdev->dst) @@ -490,7 +484,7 @@ static void hdmi_disconnect(struct omap_dss_device *dssdev, omapdss_output_unset_device(dssdev); - dss_mgr_disconnect(channel, dssdev); + dss_mgr_disconnect(&hdmi.output, dssdev); } static int hdmi_read_edid(struct omap_dss_device *dssdev, |