drm/mgag200: Allocate cursor BOs at high end of video memory
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 27 Sep 2019 09:13:01 +0000 (11:13 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 4 Oct 2019 08:01:12 +0000 (10:01 +0200)
commitdfc507b9eb26e719a63eb7a846ec36b88b416397
treea0405243daeb55aa5912c19c16890b31171b0f09
parent2c51a6601693ffbcef2eb3e47f6c2b8cb3949b86
drm/mgag200: Allocate cursor BOs at high end of video memory

By putting cursor BOs at the high end of the video memory, we can avoid
memory fragmentation. Starting at the low end, contiguous video memory is
available for framebuffers.

The patch also simplifies the buffer swapping and aligns it with the
ast driver. If there are more drivers with similar requirements, the
code could be moved into a shared place.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190927091301.10574-8-tzimmermann@suse.de
drivers/gpu/drm/mgag200/mgag200_cursor.c
drivers/gpu/drm/mgag200/mgag200_drv.h