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

Commit 884f19e9 authored by Jani Nikula's avatar Jani Nikula Committed by Daniel Vetter
Browse files

drm/i915/dp: move edp vdd enable/disable at a lower level in i2c-over-aux



This is prep work for conversion to generic drm i2c-over-aux helpers
where we won't have the function to do this at.

Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent adddaaf4
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -461,6 +461,9 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
	uint32_t status;
	uint32_t status;
	int try, clock = 0;
	int try, clock = 0;
	bool has_aux_irq = HAS_AUX_IRQ(dev);
	bool has_aux_irq = HAS_AUX_IRQ(dev);
	bool vdd;

	vdd = _edp_panel_vdd_on(intel_dp);


	/* dp aux is extremely sensitive to irq latency, hence request the
	/* dp aux is extremely sensitive to irq latency, hence request the
	 * lowest possible wakeup latency and so prevent the cpu from going into
	 * lowest possible wakeup latency and so prevent the cpu from going into
@@ -566,6 +569,9 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
	pm_qos_update_request(&dev_priv->pm_qos, PM_QOS_DEFAULT_VALUE);
	pm_qos_update_request(&dev_priv->pm_qos, PM_QOS_DEFAULT_VALUE);
	intel_aux_display_runtime_put(dev_priv);
	intel_aux_display_runtime_put(dev_priv);


	if (vdd)
		edp_panel_vdd_off(intel_dp, false);

	return ret;
	return ret;
}
}


@@ -678,8 +684,6 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
	int reply_bytes;
	int reply_bytes;
	int ret;
	int ret;


	edp_panel_vdd_on(intel_dp);
	intel_dp_check_edp(intel_dp);
	/* Set up the command byte */
	/* Set up the command byte */
	if (mode & MODE_I2C_READ)
	if (mode & MODE_I2C_READ)
		msg[0] = DP_AUX_I2C_READ << 4;
		msg[0] = DP_AUX_I2C_READ << 4;
@@ -781,7 +785,6 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
	ret = -EREMOTEIO;
	ret = -EREMOTEIO;


out:
out:
	edp_panel_vdd_off(intel_dp, false);
	return ret;
	return ret;
}
}