Skip to content

Commit 0c70363

Browse files
Wayne Lingregkh
authored andcommitted
drm/dp_mst: correct the shifting in DP_REMOTE_I2C_READ
commit c4e4fcc upstream. [Why] According to DP spec, it should shift left 4 digits for NO_STOP_BIT in REMOTE_I2C_READ message. Not 5 digits. In current code, NO_STOP_BIT is always set to zero which means I2C master is always generating a I2C stop at the end of each I2C write transaction while handling REMOTE_I2C_READ sideband message. This issue might have the generated I2C signal not meeting the requirement. Take random read in I2C for instance, I2C master should generate a repeat start to start to read data after writing the read address. This issue will cause the I2C master to generate a stop-start rather than a re-start which is not expected in I2C random read. [How] Correct the shifting value of NO_STOP_BIT for DP_REMOTE_I2C_READ case in drm_dp_encode_sideband_req(). Changes since v1:(https://patchwork.kernel.org/patch/11312667/) * Add more descriptions in commit and cc to stable Fixes: ad7f8a1 ("drm/helper: add Displayport multi-stream helper (v0.6)") Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Wayne Lin <[email protected]> Cc: [email protected] Signed-off-by: Lyude Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 733463f commit 0c70363

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/drm_dp_mst_topology.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static void drm_dp_encode_sideband_req(struct drm_dp_sideband_msg_req_body *req,
274274
memcpy(&buf[idx], req->u.i2c_read.transactions[i].bytes, req->u.i2c_read.transactions[i].num_bytes);
275275
idx += req->u.i2c_read.transactions[i].num_bytes;
276276

277-
buf[idx] = (req->u.i2c_read.transactions[i].no_stop_bit & 0x1) << 5;
277+
buf[idx] = (req->u.i2c_read.transactions[i].no_stop_bit & 0x1) << 4;
278278
buf[idx] |= (req->u.i2c_read.transactions[i].i2c_transaction_delay & 0xf);
279279
idx++;
280280
}

0 commit comments

Comments
 (0)