]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mgag200: Protect concurrent access to I/O registers with lock
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 2 May 2022 14:25:14 +0000 (16:25 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 5 May 2022 07:18:54 +0000 (09:18 +0200)
commit9469655941403e0c4bd98a03858b8981339ff342
tree435c7eafdc66bc24e65a3f5bb84ca5a9cc07de59
parent554d08d9b54cb9b7085c336ec4886ca7c3de4a94
drm/mgag200: Protect concurrent access to I/O registers with lock

Add a mutex lock to protect concurrent access to I/O registers
against each other. This happens between invocation of commit-
tail functions and get-mode operations. Both with use the CRTC
index registers MGA1064_GEN_IO_DATA and MGA1064_GEN_IO_CTL.
Concurrent access can lead to failed mode-setting operations.

v2:
* fix typo in commit description (Jocelyn)
* add comment to explain rmmio_lock

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220502142514.2174-4-tzimmermann@suse.de
drivers/gpu/drm/mgag200/mgag200_drv.c
drivers/gpu/drm/mgag200/mgag200_drv.h
drivers/gpu/drm/mgag200/mgag200_mode.c