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

Commit e9549744 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/sde: remove vote on power handle disable"

parents c0d483af c4f1c7c7
Loading
Loading
Loading
Loading
+27 −4
Original line number Diff line number Diff line
@@ -362,13 +362,13 @@ static int _sde_power_data_bus_set_quota(
		ib_quota_nrt = max_t(u64, ib_quota_nrt,
				SDE_POWER_HANDLE_ENABLE_BUS_IB_QUOTA);
	} else {
		ab_quota_rt = max_t(u64, ab_quota_rt,
		ab_quota_rt = min_t(u64, ab_quota_rt,
				SDE_POWER_HANDLE_DISABLE_BUS_AB_QUOTA);
		ib_quota_rt = max_t(u64, ib_quota_rt,
		ib_quota_rt = min_t(u64, ib_quota_rt,
				SDE_POWER_HANDLE_DISABLE_BUS_IB_QUOTA);
		ab_quota_nrt = max_t(u64, ab_quota_nrt,
		ab_quota_nrt = min_t(u64, ab_quota_nrt,
				SDE_POWER_HANDLE_DISABLE_BUS_AB_QUOTA);
		ib_quota_nrt = max_t(u64, ib_quota_nrt,
		ib_quota_nrt = min_t(u64, ib_quota_nrt,
				SDE_POWER_HANDLE_DISABLE_BUS_IB_QUOTA);
	}

@@ -598,6 +598,23 @@ static void sde_power_reg_bus_unregister(u32 reg_bus_hdl)
		msm_bus_scale_unregister_client(reg_bus_hdl);
}

int sde_power_data_bus_state_update(struct sde_power_handle *phandle,
							bool enable)
{
	int i;

	if (!phandle) {
		pr_err("invalid param\n");
		return -EINVAL;
	}

	for (i = SDE_POWER_HANDLE_DBUS_ID_MNOC;
			i < SDE_POWER_HANDLE_DBUS_ID_MAX; i++)
		phandle->data_bus_handle[i].enable = enable;

	return 0;
}

static int sde_power_data_bus_update(struct sde_power_data_bus_handle *pdbus,
							bool enable)
{
@@ -668,6 +685,12 @@ static int sde_power_data_bus_update(struct sde_power_data_bus_handle *pdbus,
{
	return 0;
}

int sde_power_data_bus_state_update(struct sde_power_handle *phandle,
							bool enable)
{
	return 0;
}
#endif

int sde_power_resource_init(struct platform_device *pdev,
+10 −0
Original line number Diff line number Diff line
@@ -223,6 +223,16 @@ void sde_power_client_destroy(struct sde_power_handle *phandle,
int sde_power_resource_enable(struct sde_power_handle *pdata,
	struct sde_power_client *pclient, bool enable);

/**
 * sde_power_data_bus_state_update() - update data bus state
 * @pdata:  power handle containing the resources
 * @enable: take enable vs disable path
 *
 * Return: error code.
 */
int sde_power_data_bus_state_update(struct sde_power_handle *phandle,
							bool enable);

/**
 * sde_power_clk_set_rate() - set the clock rate
 * @pdata:  power handle containing the resources
+6 −0
Original line number Diff line number Diff line
@@ -1240,6 +1240,12 @@ static int sde_rsc_probe(struct platform_device *pdev)
		goto sde_rsc_fail;
	}

	/**
	 * sde rsc should always vote through enable path, sleep vote is
	 * set to "0" by default.
	 */
	sde_power_data_bus_state_update(&rsc->phandle, true);

	rsc->disp_rsc = rpmh_get_byname(pdev, "disp_rsc");
	if (IS_ERR_OR_NULL(rsc->disp_rsc)) {
		ret = PTR_ERR(rsc->disp_rsc);