aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/dss/dss.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-02-13 14:00:40 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-03-01 09:18:18 +0200
commit72877cf38b4b78fbb3a852f2288d7f2a7af0db22 (patch)
treece4d5cc14676548b850255c8a2183bd476675487 /drivers/gpu/drm/omapdrm/dss/dss.c
parentdrm: omapdrm: dss: Pass omap_drm_private pointer to dss_mgr_ops (diff)
downloadlinux-dev-72877cf38b4b78fbb3a852f2288d7f2a7af0db22.tar.xz
linux-dev-72877cf38b4b78fbb3a852f2288d7f2a7af0db22.zip
drm: omapdrm: dss: Store DSS device pointer in the omapdrm private data
The dss_device is the top-level component in the omapdss driver. Give the omapdrm driver access to the dss_device pointer in order to obtain pointers to all other components from it. This requires a new global variable in the omapdss driver that will be removed when merging the omapdrm and omapdss drivers, but will already allow removal of several other global variables. As this partly duplicates the omapdss_is_initialized() API, reimplement it as an inline function wrapping omapdss_get_dss(). 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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c
index 14d2f024eb70..ca2efb937d42 100644
--- a/drivers/gpu/drm/omapdrm/dss/dss.c
+++ b/drivers/gpu/drm/omapdrm/dss/dss.c
@@ -1316,6 +1316,7 @@ static const struct soc_device_attribute dss_soc_devices[] = {
static int dss_bind(struct device *dev)
{
+ struct dss_device *dss = dev_get_drvdata(dev);
int r;
r = component_bind_all(dev, NULL);
@@ -1325,14 +1326,14 @@ static int dss_bind(struct device *dev)
pm_set_vt_switch(0);
omapdss_gather_components(dev);
- omapdss_set_is_initialized(true);
+ omapdss_set_dss(dss);
return 0;
}
static void dss_unbind(struct device *dev)
{
- omapdss_set_is_initialized(false);
+ omapdss_set_dss(NULL);
component_unbind_all(dev, NULL);
}