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

Commit b720ddc8 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "disp: msm: sde: avoid zero BW votes in cases where planes are staged"

parents 0c76e792 0449a3a0
Loading
Loading
Loading
Loading
+15 −8
Original line number Diff line number Diff line
@@ -105,12 +105,15 @@ static void _sde_core_perf_calc_doze_suspend(struct drm_crtc *crtc,
	if (!old_perf)
		return;

	if (!perf->bw_ctl[SDE_POWER_HANDLE_DBUS_ID_LLCC] &&
		!perf->max_per_pipe_ib[SDE_POWER_HANDLE_DBUS_ID_LLCC] &&
		!perf->bw_ctl[SDE_POWER_HANDLE_DBUS_ID_EBI] &&
		!perf->max_per_pipe_ib[SDE_POWER_HANDLE_DBUS_ID_EBI] &&
	if (!perf->bw_ctl[SDE_POWER_HANDLE_DBUS_ID_MNOC] &&
		!perf->max_per_pipe_ib[SDE_POWER_HANDLE_DBUS_ID_MNOC] &&
		state->plane_mask) {

		perf->bw_ctl[SDE_POWER_HANDLE_DBUS_ID_MNOC] =
			old_perf->bw_ctl[SDE_POWER_HANDLE_DBUS_ID_MNOC];
		perf->max_per_pipe_ib[SDE_POWER_HANDLE_DBUS_ID_MNOC] =
			old_perf->max_per_pipe_ib
					[SDE_POWER_HANDLE_DBUS_ID_MNOC];
		perf->bw_ctl[SDE_POWER_HANDLE_DBUS_ID_LLCC] =
			old_perf->bw_ctl[SDE_POWER_HANDLE_DBUS_ID_LLCC];
		perf->max_per_pipe_ib[SDE_POWER_HANDLE_DBUS_ID_LLCC] =
@@ -120,6 +123,9 @@ static void _sde_core_perf_calc_doze_suspend(struct drm_crtc *crtc,
		perf->max_per_pipe_ib[SDE_POWER_HANDLE_DBUS_ID_EBI] =
		  old_perf->max_per_pipe_ib[SDE_POWER_HANDLE_DBUS_ID_EBI];

		if (!old_perf->core_clk_rate)
			perf->core_clk_rate = old_perf->core_clk_rate;

		for (i = 0; i < new_cstate->num_connectors; i++) {
			conn = new_cstate->connectors[i];
			if (!conn)
@@ -130,13 +136,14 @@ static void _sde_core_perf_calc_doze_suspend(struct drm_crtc *crtc,
				is_doze_suspend = true;
		}

		if (!is_doze_suspend && conn && c_conn) {
			SDE_DEBUG("No BW, planes:%x dpms_mode:%d lpmode:%d\n",
		if (!is_doze_suspend && conn && c_conn)
			SDE_ERROR("No BW, planes:%x dpms_mode:%d lpmode:%d\n",
				state->plane_mask, c_conn->dpms_mode,
				sde_connector_get_lp(conn));
		if (conn && c_conn)
			SDE_EVT32(state->plane_mask, c_conn->dpms_mode,
				sde_connector_get_lp(conn), SDE_EVTLOG_ERROR);
		}
				sde_connector_get_lp(conn), is_doze_suspend,
				SDE_EVTLOG_ERROR);
	}
}