[PATCH 08/28] drm/loongson: Use video aperture helpers
Sui Jingfeng
sui.jingfeng at linux.dev
Fri Oct 4 09:01:55 UTC 2024
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 at suse.de>
> Cc: Sui Jingfeng <suijingfeng at loongson.cn>
Acked-by: Sui Jingfeng <sui.jingfeng at 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);
--
Best regards,
Sui
More information about the Intel-gfx
mailing list