Commit bb01672c authored by Andrey Grodzovsky's avatar Andrey Grodzovsky Committed by Alex Deucher
Browse files

drm/amd/display: Fix i2c write flag.



I2C_M_RD was translated to write instead of read.

Signed-off-by: default avatarAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5c4e9806
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -423,7 +423,7 @@ bool dm_helpers_submit_i2c(
		return false;

	for (i = 0; i < num; i++) {
		msgs[i].flags = cmd->payloads[i].write ? I2C_M_RD : 0;
		msgs[i].flags = cmd->payloads[i].write ? 0 : I2C_M_RD;
		msgs[i].addr = cmd->payloads[i].address;
		msgs[i].len = cmd->payloads[i].length;
		msgs[i].buf = cmd->payloads[i].data;
+1 −1
Original line number Diff line number Diff line
@@ -1948,7 +1948,7 @@ int amdgpu_dm_i2c_xfer(struct i2c_adapter *i2c_adap,
	cmd.speed = 100;

	for (i = 0; i < num; i++) {
		cmd.payloads[i].write = (msgs[i].flags & I2C_M_RD);
		cmd.payloads[i].write = !(msgs[i].flags & I2C_M_RD);
		cmd.payloads[i].address = msgs[i].addr;
		cmd.payloads[i].length = msgs[i].len;
		cmd.payloads[i].data = msgs[i].buf;