drm/aperture: Convert drivers to aperture interfaces

Mass-convert all drivers from FB helpers to aperture interfaces. No
functional changes besides checking for returned errno codes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210412131043.5787-3-tzimmermann@suse.de
This commit is contained in:
Thomas Zimmermann
2021-04-12 15:10:42 +02:00
parent 2916059147
commit 6848c291a5
19 changed files with 67 additions and 56 deletions

View File

@@ -31,6 +31,7 @@
#include <linux/pci.h>
#include <drm/drm.h>
#include <drm/drm_aperture.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_file.h>
@@ -50,13 +51,16 @@ static int virtio_gpu_pci_quirk(struct drm_device *dev, struct virtio_device *vd
const char *pname = dev_name(&pdev->dev);
bool vga = (pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA;
char unique[20];
int ret;
DRM_INFO("pci: %s detected at %s\n",
vga ? "virtio-vga" : "virtio-gpu-pci",
pname);
if (vga)
drm_fb_helper_remove_conflicting_pci_framebuffers(pdev,
"virtiodrmfb");
if (vga) {
ret = drm_aperture_remove_conflicting_pci_framebuffers(pdev, "virtiodrmfb");
if (ret)
return ret;
}
/*
* Normally the drm_dev_set_unique() call is done by core DRM.