drm/mgag200: Rewrite cursor handling
The cursor handling in mgag200 is complicated to understand. It touches a number of different BOs, but doesn't really use all of them. Rewriting the cursor update reduces the amount of cursor state. There are two BOs for double-buffered HW updates. The source BO updates the one that is currently not displayed and then switches buffers. Explicit BO locking has been removed from the code. BOs are simply pinned and unpinned in video RAM. v2: * pin cursor BOs to current location Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190613073041.29350-8-tzimmermann@suse.de
This commit is contained in:
@@ -241,10 +241,8 @@ int mgag200_driver_load(struct drm_device *dev, unsigned long flags)
|
||||
mdev->cursor.pixels_2 = NULL;
|
||||
dev_warn(&dev->pdev->dev,
|
||||
"Could not allocate space for cursors. Not doing hardware cursors.\n");
|
||||
} else {
|
||||
mdev->cursor.pixels_current = mdev->cursor.pixels_1;
|
||||
mdev->cursor.pixels_prev = mdev->cursor.pixels_2;
|
||||
}
|
||||
mdev->cursor.pixels_current = NULL;
|
||||
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user