]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ast: Protect concurrent access to I/O registers with lock
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 2 May 2022 14:25:13 +0000 (16:25 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 5 May 2022 07:18:32 +0000 (09:18 +0200)
commit554d08d9b54cb9b7085c336ec4886ca7c3de4a94
treeb84e31c9b73da87b6e8376913fae8ffb08d55b57
parenta19918daed07e988113943d3da4a028e59e9454d
drm/ast: 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 register AST_IO_CRTC_PORT. Concurrent access can lead to
failed mode-setting operations.

v2:
* fix typo in commit description (Jocelyn)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reported-by: KuoHsiang Chou <kuohsiang_chou@aspeedtech.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220502142514.2174-3-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_drv.h
drivers/gpu/drm/ast/ast_main.c
drivers/gpu/drm/ast/ast_mode.c