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:

committed by
Tomi Valkeinen

parent
0e546dfd3f
commit
7b295257a1
@@ -5322,7 +5322,8 @@ static const struct dss_pll_hw dss_omap5_dsi_pll_hw = {
|
||||
.has_refsel = true,
|
||||
};
|
||||
|
||||
static int dsi_init_pll_data(struct platform_device *dsidev)
|
||||
static int dsi_init_pll_data(struct dss_device *dss,
|
||||
struct platform_device *dsidev)
|
||||
{
|
||||
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
|
||||
struct dss_pll *pll = &dsi->pll;
|
||||
@@ -5341,6 +5342,7 @@ static int dsi_init_pll_data(struct platform_device *dsidev)
|
||||
pll->base = dsi->pll_base;
|
||||
pll->hw = dsi->data->pll_hw;
|
||||
pll->ops = &dsi_pll_ops;
|
||||
pll->dss = dss;
|
||||
|
||||
r = dss_pll_register(pll);
|
||||
if (r)
|
||||
@@ -5417,6 +5419,7 @@ static const struct soc_device_attribute dsi_soc_devices[] = {
|
||||
static int dsi_bind(struct device *dev, struct device *master, void *data)
|
||||
{
|
||||
struct platform_device *dsidev = to_platform_device(dev);
|
||||
struct dss_device *dss = dss_get_device(master);
|
||||
const struct soc_device_attribute *soc;
|
||||
const struct dsi_module_id_data *d;
|
||||
u32 rev;
|
||||
@@ -5525,7 +5528,7 @@ static int dsi_bind(struct device *dev, struct device *master, void *data)
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
dsi_init_pll_data(dsidev);
|
||||
dsi_init_pll_data(dss, dsidev);
|
||||
|
||||
pm_runtime_enable(&dsidev->dev);
|
||||
|
||||
|
Reference in New Issue
Block a user