diff mbox series

[02/28] drm/arm/hdlcd: Use video aperture helpers

Message ID 20240930130921.689876-3-tzimmermann@suse.de (mailing list archive)
State New, archived
Headers show
Series drm: Remove DRM aperture helpers | expand

Commit Message

Thomas Zimmermann Sept. 30, 2024, 1:03 p.m. UTC
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: Liviu Dudau <liviu.dudau@arm.com>
---
 drivers/gpu/drm/arm/hdlcd_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Liviu Dudau Oct. 2, 2024, 1:48 p.m. UTC | #1
On Mon, Sep 30, 2024 at 03:03:00PM +0200, 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.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Liviu Dudau <liviu.dudau@arm.com>

Acked-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

> ---
>  drivers/gpu/drm/arm/hdlcd_drv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
> index f5d358f3893b..cd4389809d42 100644
> --- a/drivers/gpu/drm/arm/hdlcd_drv.c
> +++ b/drivers/gpu/drm/arm/hdlcd_drv.c
> @@ -9,6 +9,7 @@
>   *  ARM HDLCD Driver
>   */
>  
> +#include <linux/aperture.h>
>  #include <linux/module.h>
>  #include <linux/spinlock.h>
>  #include <linux/clk.h>
> @@ -21,7 +22,6 @@
>  #include <linux/platform_device.h>
>  #include <linux/pm_runtime.h>
>  
> -#include <drm/drm_aperture.h>
>  #include <drm/drm_atomic_helper.h>
>  #include <drm/drm_client_setup.h>
>  #include <drm/drm_crtc.h>
> @@ -287,7 +287,7 @@ static int hdlcd_drm_bind(struct device *dev)
>  	 */
>  	if (hdlcd_read(hdlcd, HDLCD_REG_COMMAND)) {
>  		hdlcd_write(hdlcd, HDLCD_REG_COMMAND, 0);
> -		drm_aperture_remove_framebuffers(&hdlcd_driver);
> +		aperture_remove_all_conflicting_devices(hdlcd_driver.name);
>  	}
>  
>  	drm_mode_config_reset(drm);
> -- 
> 2.46.0
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
index f5d358f3893b..cd4389809d42 100644
--- a/drivers/gpu/drm/arm/hdlcd_drv.c
+++ b/drivers/gpu/drm/arm/hdlcd_drv.c
@@ -9,6 +9,7 @@ 
  *  ARM HDLCD Driver
  */
 
+#include <linux/aperture.h>
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/clk.h>
@@ -21,7 +22,6 @@ 
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 
-#include <drm/drm_aperture.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_client_setup.h>
 #include <drm/drm_crtc.h>
@@ -287,7 +287,7 @@  static int hdlcd_drm_bind(struct device *dev)
 	 */
 	if (hdlcd_read(hdlcd, HDLCD_REG_COMMAND)) {
 		hdlcd_write(hdlcd, HDLCD_REG_COMMAND, 0);
-		drm_aperture_remove_framebuffers(&hdlcd_driver);
+		aperture_remove_all_conflicting_devices(hdlcd_driver.name);
 	}
 
 	drm_mode_config_reset(drm);