Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 852f0838 authored by Tomi Valkeinen's avatar Tomi Valkeinen
Browse files

OMAPDSS: remove uses of dss_runtime_get/put



Now that the omapdss_core device is the parent for all other dss
devices, we don't need to use the dss_runtime_get/put anymore. Instead,
enabling omapdss_core will happen automatically when a child device is
enabled.

Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent a57dd4fe
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -3571,19 +3571,12 @@ static int omap_dispchw_remove(struct platform_device *pdev)
static int dispc_runtime_suspend(struct device *dev)
{
	dispc_save_context();
	dss_runtime_put();

	return 0;
}

static int dispc_runtime_resume(struct device *dev)
{
	int r;

	r = dss_runtime_get();
	if (r < 0)
		return r;

	dispc_restore_context();

	return 0;
+1 −15
Original line number Diff line number Diff line
@@ -202,10 +202,6 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev)
			goto err_reg_enable;
	}

	r = dss_runtime_get();
	if (r)
		goto err_get_dss;

	r = dispc_runtime_get();
	if (r)
		goto err_get_dispc;
@@ -244,8 +240,6 @@ err_dsi_pll_init:
err_get_dsi:
	dispc_runtime_put();
err_get_dispc:
	dss_runtime_put();
err_get_dss:
	if (cpu_is_omap34xx())
		regulator_disable(dpi.vdds_dsi_reg);
err_reg_enable:
@@ -266,7 +260,6 @@ void omapdss_dpi_display_disable(struct omap_dss_device *dssdev)
	}

	dispc_runtime_put();
	dss_runtime_put();

	if (cpu_is_omap34xx())
		regulator_disable(dpi.vdds_dsi_reg);
@@ -283,20 +276,13 @@ void dpi_set_timings(struct omap_dss_device *dssdev,
	DSSDBG("dpi_set_timings\n");
	dssdev->panel.timings = *timings;
	if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
		r = dss_runtime_get();
		if (r)
			return;

		r = dispc_runtime_get();
		if (r) {
			dss_runtime_put();
		if (r)
			return;
		}

		dpi_set_mode(dssdev);

		dispc_runtime_put();
		dss_runtime_put();
	} else {
		dss_mgr_set_timings(dssdev->manager, timings);
	}
+1 −11
Original line number Diff line number Diff line
@@ -4767,7 +4767,6 @@ static int omap_dsihw_remove(struct platform_device *dsidev)
static int dsi_runtime_suspend(struct device *dev)
{
	dispc_runtime_put();
	dss_runtime_put();

	return 0;
}
@@ -4776,20 +4775,11 @@ static int dsi_runtime_resume(struct device *dev)
{
	int r;

	r = dss_runtime_get();
	if (r)
		goto err_get_dss;

	r = dispc_runtime_get();
	if (r)
		goto err_get_dispc;
		return r;

	return 0;

err_get_dispc:
	dss_runtime_put();
err_get_dss:
	return r;
}

static const struct dev_pm_ops dsi_pm_ops = {
+5 −2
Original line number Diff line number Diff line
@@ -62,6 +62,9 @@ struct dss_reg {
#define REG_FLD_MOD(idx, val, start, end) \
	dss_write_reg(idx, FLD_MOD(dss_read_reg(idx), val, start, end))

static int dss_runtime_get(void);
static void dss_runtime_put(void);

static struct {
	struct platform_device *pdev;
	void __iomem    *base;
@@ -707,7 +710,7 @@ static void dss_put_clocks(void)
	clk_put(dss.dss_clk);
}

int dss_runtime_get(void)
static int dss_runtime_get(void)
{
	int r;

@@ -718,7 +721,7 @@ int dss_runtime_get(void)
	return r < 0 ? r : 0;
}

void dss_runtime_put(void)
static void dss_runtime_put(void)
{
	int r;

+0 −3
Original line number Diff line number Diff line
@@ -233,9 +233,6 @@ int dss_ovl_check(struct omap_overlay *ovl, struct omap_overlay_info *info,
int dss_init_platform_driver(void);
void dss_uninit_platform_driver(void);

int dss_runtime_get(void);
void dss_runtime_put(void);

void dss_select_hdmi_venc_clk_source(enum dss_hdmi_venc_clk_source_select);
enum dss_hdmi_venc_clk_source_select dss_get_hdmi_venc_clk_source(void);
const char *dss_get_generic_clk_source_name(enum omap_dss_clk_source clk_src);
Loading