drm: omapdrm: dss: Pass DSS private structure to runtime PM functions

To prepare for the removal of the global variable storing DSS private
data, pass its pointer to the dss_runtime_{get,put}() functions.

As this requires getting hold of the dss_device structure in the
callers, we add a new dss_get_device() function to retrieve it. The
function currently returns a pointer to the global data structure, and
will later be updated to get the pointer from device driver data when
the DSS private structure will be allocated dynamically.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
This commit is contained in:
Laurent Pinchart
2018-02-13 14:00:21 +02:00
committed by Tomi Valkeinen
parent 0e546dfd3f
commit 7b295257a1
8 changed files with 61 additions and 39 deletions

View File

@@ -717,6 +717,7 @@ static int hdmi_audio_register(struct device *dev)
static int hdmi4_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);
int r;
int irq;
@@ -734,7 +735,7 @@ static int hdmi4_bind(struct device *dev, struct device *master, void *data)
if (r)
return r;
r = hdmi_pll_init(pdev, &hdmi.pll, &hdmi.wp);
r = hdmi_pll_init(dss, pdev, &hdmi.pll, &hdmi.wp);
if (r)
return r;