summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss/venc.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-02-13 15:00:27 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-03-01 10:18:18 +0300
commit1ef904e1e4f05d32331783d413e341c6353ae9aa (patch)
tree88c4dbdbb537709ab829431bbcbe3cab341fc820 /drivers/gpu/drm/omapdrm/dss/venc.c
parent60f9c59fc1e2ced4a02e91088c367395edacc7fe (diff)
downloadlinux-1ef904e1e4f05d32331783d413e341c6353ae9aa.tar.xz
drm: omapdrm: dss: Pass DSS pointer to remaining dss 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/venc.c')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/venc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c
index 6de9d734ddb9..08bae18be188 100644
--- a/drivers/gpu/drm/omapdrm/dss/venc.c
+++ b/drivers/gpu/drm/omapdrm/dss/venc.c
@@ -325,6 +325,7 @@ static struct {
struct mutex venc_lock;
u32 wss_data;
struct regulator *vdda_dac_reg;
+ struct dss_device *dss;
struct clk *tv_dac_clk;
@@ -468,8 +469,8 @@ static int venc_power_on(struct omap_dss_device *dssdev)
venc_reset();
venc_write_config(venc_timings_to_config(&venc.vm));
- dss_set_venc_output(venc.type);
- dss_set_dac_pwrdn_bgz(1);
+ dss_set_venc_output(venc.dss, venc.type);
+ dss_set_dac_pwrdn_bgz(venc.dss, 1);
l = 0;
@@ -499,7 +500,7 @@ err2:
regulator_disable(venc.vdda_dac_reg);
err1:
venc_write_reg(VENC_OUTPUT_CONTROL, 0);
- dss_set_dac_pwrdn_bgz(0);
+ dss_set_dac_pwrdn_bgz(venc.dss, 0);
venc_runtime_put();
err0:
@@ -511,7 +512,7 @@ static void venc_power_off(struct omap_dss_device *dssdev)
enum omap_channel channel = dssdev->dispc_channel;
venc_write_reg(VENC_OUTPUT_CONTROL, 0);
- dss_set_dac_pwrdn_bgz(0);
+ dss_set_dac_pwrdn_bgz(venc.dss, 0);
dss_mgr_disable(channel);
@@ -871,11 +872,13 @@ static const struct soc_device_attribute venc_soc_devices[] = {
static int venc_bind(struct device *dev, struct device *master, void *data)
{
struct platform_device *pdev = to_platform_device(dev);
+ struct dss_device *dss = dss_get_device(master);
u8 rev_id;
struct resource *venc_mem;
int r;
venc.pdev = pdev;
+ venc.dss = dss;
/* The OMAP34xx, OMAP35xx and AM35xx VENC require the TV DAC clock. */
if (soc_device_match(venc_soc_devices))