Message ID | 20240930130921.689876-9-tzimmermann@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm: Remove DRM aperture helpers | expand |
Hi, On 2024/9/30 21:03, Thomas Zimmermann wrote: > 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. Okay! Sometimes the aperture_remove_conflicting_devices() is more easier to use, as it doesn't need direct reference to the struct drm_driver. The third argument of aperture_remove_conflicting_devices() does not get used, so we can actually pass a casual string. > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> > Cc: Sui Jingfeng <suijingfeng@loongson.cn> Acked-by: Sui Jingfeng <sui.jingfeng@linux.dev> > --- > drivers/gpu/drm/loongson/lsdc_drv.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/loongson/lsdc_drv.c b/drivers/gpu/drm/loongson/lsdc_drv.c > index a19dce35c839..b350bdcf1645 100644 > --- a/drivers/gpu/drm/loongson/lsdc_drv.c > +++ b/drivers/gpu/drm/loongson/lsdc_drv.c > @@ -3,10 +3,10 @@ > * Copyright (C) 2023 Loongson Technology Corporation Limited > */ > > +#include <linux/aperture.h> > #include <linux/pci.h> > #include <linux/vgaarb.h> > > -#include <drm/drm_aperture.h> > #include <drm/drm_atomic.h> > #include <drm/drm_atomic_helper.h> > #include <drm/drm_client_setup.h> > @@ -215,9 +215,9 @@ lsdc_create_device(struct pci_dev *pdev, > return ERR_PTR(ret); > } > > - ret = drm_aperture_remove_conflicting_framebuffers(ldev->vram_base, > - ldev->vram_size, > - driver); > + ret = aperture_remove_conflicting_devices(ldev->vram_base, > + ldev->vram_size, > + driver->name); > if (ret) { > drm_err(ddev, "Remove firmware framebuffers failed: %d\n", ret); > return ERR_PTR(ret);
diff --git a/drivers/gpu/drm/loongson/lsdc_drv.c b/drivers/gpu/drm/loongson/lsdc_drv.c index a19dce35c839..b350bdcf1645 100644 --- a/drivers/gpu/drm/loongson/lsdc_drv.c +++ b/drivers/gpu/drm/loongson/lsdc_drv.c @@ -3,10 +3,10 @@ * Copyright (C) 2023 Loongson Technology Corporation Limited */ +#include <linux/aperture.h> #include <linux/pci.h> #include <linux/vgaarb.h> -#include <drm/drm_aperture.h> #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_client_setup.h> @@ -215,9 +215,9 @@ lsdc_create_device(struct pci_dev *pdev, return ERR_PTR(ret); } - ret = drm_aperture_remove_conflicting_framebuffers(ldev->vram_base, - ldev->vram_size, - driver); + ret = aperture_remove_conflicting_devices(ldev->vram_base, + ldev->vram_size, + driver->name); if (ret) { drm_err(ddev, "Remove firmware framebuffers failed: %d\n", ret); return ERR_PTR(ret);
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: Sui Jingfeng <suijingfeng@loongson.cn> --- drivers/gpu/drm/loongson/lsdc_drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)