drm/virtgpu: Use video aperture helpers
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 30 Sep 2024 13:03:23 +0000 (15:03 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 14 Oct 2024 13:28:48 +0000 (15:28 +0200)
DRM's aperture functions have long been implemented as helpers
under drivers/video/ for use with fbdev. Avoid the DRM wrappers by
calling the video functions directly.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Gurchetan Singh <gurchetansingh@chromium.org>
Cc: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240930130921.689876-26-tzimmermann@suse.de
drivers/gpu/drm/virtio/virtgpu_drv.c

index 1e08d91a4d17e1dee4a4fea5ba82a5ac8564ccf5..ffca6e2e1c9a1461ec383510968ca4df11d450f0 100644 (file)
  * OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <linux/aperture.h>
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/poll.h>
 #include <linux/wait.h>
 
 #include <drm/drm.h>
-#include <drm/drm_aperture.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_client_setup.h>
 #include <drm/drm_drv.h>
@@ -59,7 +59,7 @@ static int virtio_gpu_pci_quirk(struct drm_device *dev)
                 vga ? "virtio-vga" : "virtio-gpu-pci",
                 pname);
        if (vga) {
-               ret = drm_aperture_remove_conflicting_pci_framebuffers(pdev, &driver);
+               ret = aperture_remove_conflicting_pci_devices(pdev, driver.name);
                if (ret)
                        return ret;
        }