drm/ast: Acquire I/O-register lock in atomic_commit_tail function
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 13 Oct 2022 11:29:16 +0000 (13:29 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Sun, 16 Oct 2022 09:15:31 +0000 (11:15 +0200)
commit1fe182154984fa7942f8aafc268e9922e553cb13
tree697c5c8979a08a3a5706dfa76c704dcc14eab10c
parent6cba31e33e770d9b5e9973278573cfef90583fcc
drm/ast: 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 modesetting against concurrent EDID reads.

Complex modesetting operations involve mode changes and plane updates.
These steps used to be protected individually against concurrent I/O.
Make all this atomic wrt to reading display modes via EDID. The EDID
code in the connector's get_modes helper already acquires the necessary
lock.

A similar issue was fixed in commit 2d70b9a1482e ("drm/mgag200: Acquire
I/O-register lock in atomic_commit_tail function") for mgag200.

v2:
* fix typo in commit message (Jocelyn)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Tested-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221013112923.769-2-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_mode.c