]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ast: Keep cursor HW BOs mapped
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 2 Jul 2020 11:50:24 +0000 (13:50 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 7 Jul 2020 09:11:47 +0000 (11:11 +0200)
commit91823dba91a46c31a084b333b059639ff72e049c
tree0e95d07c18625aa6feb0899c36f0bc46f03fd930
parent1d2e140d2d2e0000f0306d04883f40ba6dee6846
drm/ast: Keep cursor HW BOs mapped

Updating the image in a cursor's HW BO requires a mapping of the BO's
buffer in the kernel's address space. Cursor image updates can happen
frequently and create CPU overhead.

As cursor HW BOs are small and never move, they are now map exactly
once during the initialization and the mapping is used throughout the
driver's lifetime.

This change also removes a possible source of failures from
ast_cursor_show(). As the helper does not establish mappings, it cannot
fail. As a result, the cursor plane's atomic-update helper does not
call any failable interfaces. All failures are detected before trying
to update the cursor plane.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-10-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_cursor.c
drivers/gpu/drm/ast/ast_drv.h