drm/ast: Only map cursor BOs during updates
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 9 Dec 2020 14:25:21 +0000 (15:25 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 11 Dec 2020 11:35:32 +0000 (12:35 +0100)
commit78336798ce7122803bb7fbfd96b4c7dbf2119246
tree33748471c0dc9d0534b87fc6f2b038e0ef724ec2
parentabe54e54ddef85006d58495e6f2311ce82b4f015
drm/ast: Only map cursor BOs during updates

The HW cursor's BO used to be mapped permanently into the kernel's
address space. GEM's vmap operation will be protected by locks, and
we don't want to lock the BO's for an indefinate period of time.

Change the cursor code to map the HW BOs only during updates. The
vmap operation in VRAM helpers is cheap, as a once estabished mapping
is being reused until the BO actually moves. As the HW cursor BOs are
permanently pinned, they never move at all.

v2:
* fix typos in commit description

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20201209142527.26415-3-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_cursor.c
drivers/gpu/drm/ast/ast_drv.h