]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/mgag200: Acquire I/O-register lock in DDC code
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 13 May 2024 12:51:14 +0000 (14:51 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 17 May 2024 15:20:23 +0000 (17:20 +0200)
commit66d58ec0bc659fafcda962a5678dbb3f061d7359
tree70e3f106da2cf21ca9efc82a0871c010f311ee8b
parentb7e04af37edc5b6fd9a5aa206ca4dc73346c688b
drm/mgag200: Acquire I/O-register lock in DDC code

The modeset lock protects the DDC code from concurrent modeset
operations, which use the same registers. Move that code from the
connector helpers into the DDC helpers .pre_xfer() and .post_xfer().

Both, .pre_xfer() and .post_xfer(), enclose the transfer of data blocks
over the I2C channel in the internal I2C function bit_xfer(). Both
calls are executed unconditionally if present. Invoking DDC transfers
from any where within the driver now takes the lock.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-10-tzimmermann@suse.de
drivers/gpu/drm/mgag200/mgag200_ddc.c
drivers/gpu/drm/mgag200/mgag200_mode.c