Re: [PATCH 08/28] drm/loongson: Use video aperture helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
Cc: Sui Jingfeng <suijingfeng@xxxxxxxxxxx>


Acked-by: Sui Jingfeng <sui.jingfeng@xxxxxxxxx>


---
  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);

--
Best regards,
Sui




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux