drm/rockchip: Use video aperture helpers
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 30 Sep 2024 13:03:14 +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: Sandy Huang <hjc@rock-chips.com>
Cc: "Heiko Stübner" <heiko@sntech.de>
Cc: Andy Yan <andy.yan@rock-chips.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-17-tzimmermann@suse.de
drivers/gpu/drm/rockchip/rockchip_drm_drv.c

index 4e08004..2560b0e 100644 (file)
@@ -6,6 +6,7 @@
  * based on exynos_drm_drv.c
  */
 
+#include <linux/aperture.h>
 #include <linux/dma-mapping.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
@@ -16,7 +17,6 @@
 #include <linux/console.h>
 #include <linux/iommu.h>
 
-#include <drm/drm_aperture.h>
 #include <drm/drm_client_setup.h>
 #include <drm/drm_drv.h>
 #include <drm/drm_fbdev_dma.h>
@@ -146,7 +146,7 @@ static int rockchip_drm_bind(struct device *dev)
        int ret;
 
        /* Remove existing drivers that may own the framebuffer memory. */
-       ret = drm_aperture_remove_framebuffers(&rockchip_drm_driver);
+       ret = aperture_remove_all_conflicting_devices(rockchip_drm_driver.name);
        if (ret) {
                DRM_DEV_ERROR(dev,
                              "Failed to remove existing framebuffers - %d.\n",