drm/mgag200: Acquire I/O-register lock in atomic_commit_tail function
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 28 Jul 2022 12:40:53 +0000 (14:40 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 29 Jul 2022 14:01:25 +0000 (16:01 +0200)
commit2d70b9a1482e09f8465452c4655ffe20c605d526
treee7497583fbf6a6c88ccd82eb702bd910e5a852bf
parent9382ec27acb2f5a43dc3c3b77036f898a498ba60
drm/mgag200: Acquire I/O-register lock in atomic_commit_tail function

Hold I/O-register lock in atomic_commit_tail to protect all pipeline
updates at once. Protects against concurrent I/O access in get-modes
helper.

Complex modesetting operations involve mode changes, plane updates and
possibly BMC updates. Make all this atomic wrt to reading display modes
via EDID. It's not so much an issue with simple-KMS helpers, but will
become necessary for using regular atomic helpers.

v4:
* remove empty line

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Tested-by: Jocelyn Falempe <jfalempe@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220728124103.30159-5-tzimmermann@suse.de
drivers/gpu/drm/mgag200/mgag200_mode.c