drm/tegra: Use video aperture helpers
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 30 Sep 2024 13:03:18 +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: Thierry Reding <thierry.reding@gmail.com>
Cc: Mikko Perttunen <mperttunen@nvidia.com>
Cc: Jonathan Hunter <jonathanh@nvidia.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-21-tzimmermann@suse.de
drivers/gpu/drm/tegra/drm.c

index dd82ab71d4a98864b75ca536be13a8cd246bb344..babcb3958f866cb674f7a00611d26d26254e6916 100644 (file)
@@ -4,6 +4,7 @@
  * Copyright (C) 2012-2016 NVIDIA CORPORATION.  All rights reserved.
  */
 
+#include <linux/aperture.h>
 #include <linux/bitops.h>
 #include <linux/host1x.h>
 #include <linux/idr.h>
@@ -12,7 +13,6 @@
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 
-#include <drm/drm_aperture.h>
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_client_setup.h>
@@ -1258,7 +1258,7 @@ static int host1x_drm_probe(struct host1x_device *dev)
         * will not expose any modesetting features.
         */
        if (drm->mode_config.num_crtc > 0) {
-               err = drm_aperture_remove_framebuffers(&tegra_drm_driver);
+               err = aperture_remove_all_conflicting_devices(tegra_drm_driver.name);
                if (err < 0)
                        goto hub;
        } else {