OSDN Git Service

drm/dp_mst: Support remote i2c writes
authorSam McNally <sammc@chromium.org>
Mon, 27 Jul 2020 06:03:37 +0000 (16:03 +1000)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 1 Sep 2020 09:18:13 +0000 (12:18 +0300)
commitadb48b26985686f93f20ca71c16c067d790e7af3
tree97b03eee6f0eaba491b0ddf3c53b75befc6f4840
parentf7ec68b341dbd5da13d4c65ce444dcd605f1c42e
drm/dp_mst: Support remote i2c writes

For DP MST outputs, the i2c device currently only supports transfers
that can be implemented using remote i2c reads. Such transfers must
consist of zero or more write transactions followed by one read
transaction. DDC/CI commands require standalone write transactions and
hence aren't supported.

Since each remote i2c write is handled as a separate transfer, remote
i2c writes can support transfers consisting of write transactions, where
all but the last have I2C_M_STOP set. According to the DDC/CI 1.1
standard, DDC/CI commands only require a single write or read
transaction in a transfer, so this is sufficient.

For i2c transfers meeting the above criteria, generate and send a remote
i2c write message for each transaction. Add the trivial remote i2c write
reply parsing support so remote i2c write acks bubble up correctly.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/37
Signed-off-by: Sam McNally <sammc@chromium.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200727160225.1.I4e95a534de051551cd143e6cb83d4c5a9b0ad1cd@changeid
drivers/gpu/drm/drm_dp_mst_topology.c