Re: [PATCH] fbdev/clcd: Delete the old CLCD driver

2023-12-12 Thread Helge Deller

On 12/12/23 15:18, Linus Walleij wrote:

We have managed to ascertain that all users of the old FBDEV
code that are out of tree are now gone.

The new DRM driver can be found in drivers/gpu/drm/pl111/.

The remaining out of tree user was the ARM FVP emulation
platform, running Android. Thanks to changes in Android
versions 13 and 14, Android can now use the DRM driver when
being emulated under FVP. Some final patches are being put
in place to make it fully featured.

This is essentially a revert of the partial revert in
commit 112c35237c72 ("Partially revert "video: fbdev: amba-clcd: Retire elder CLCD 
driver"")

Signed-off-by: Linus Walleij 


applied.

Thanks!
Helge



---
  MAINTAINERS |   5 -
  drivers/video/fbdev/Kconfig |  18 -
  drivers/video/fbdev/Makefile|   1 -
  drivers/video/fbdev/amba-clcd.c | 984 
  include/linux/amba/clcd-regs.h  |  87 
  include/linux/amba/clcd.h   | 290 
  6 files changed, 1385 deletions(-)




[PATCH] fbdev/clcd: Delete the old CLCD driver

2023-12-12 Thread Linus Walleij
We have managed to ascertain that all users of the old FBDEV
code that are out of tree are now gone.

The new DRM driver can be found in drivers/gpu/drm/pl111/.

The remaining out of tree user was the ARM FVP emulation
platform, running Android. Thanks to changes in Android
versions 13 and 14, Android can now use the DRM driver when
being emulated under FVP. Some final patches are being put
in place to make it fully featured.

This is essentially a revert of the partial revert in
commit 112c35237c72 ("Partially revert "video: fbdev: amba-clcd: Retire elder 
CLCD driver"")

Signed-off-by: Linus Walleij 
---
 MAINTAINERS |   5 -
 drivers/video/fbdev/Kconfig |  18 -
 drivers/video/fbdev/Makefile|   1 -
 drivers/video/fbdev/amba-clcd.c | 984 
 include/linux/amba/clcd-regs.h  |  87 
 include/linux/amba/clcd.h   | 290 
 6 files changed, 1385 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 97f51d5ec1cf..9233599ea369 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1696,11 +1696,6 @@ S:   Odd Fixes
 F: drivers/amba/
 F: include/linux/amba/bus.h
 
-ARM PRIMECELL CLCD PL110 DRIVER
-M: Russell King 
-S: Odd Fixes
-F: drivers/video/fbdev/amba-clcd.*
-
 ARM PRIMECELL KMI PL050 DRIVER
 M: Russell King 
 S: Odd Fixes
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 53693c826ebd..aaf0eec16fdf 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -116,24 +116,6 @@ config FB_PM2_FIFO_DISCONNECT
help
  Support the Permedia2 FIFO disconnect feature.
 
-config FB_ARMCLCD
-   tristate "ARM PrimeCell PL110 support"
-   depends on ARM || ARM64 || COMPILE_TEST
-   depends on FB && ARM_AMBA && HAS_IOMEM
-   select FB_IOMEM_HELPERS
-   select FB_MODE_HELPERS if OF
-   select VIDEOMODE_HELPERS if OF
-   select BACKLIGHT_CLASS_DEVICE if OF
-   help
- This framebuffer device driver is for the ARM PrimeCell PL110
- Colour LCD controller.  ARM PrimeCells provide the building
- blocks for System on a Chip devices.
-
- If you want to compile this as a module (=code which can be
- inserted into and removed from the running kernel), say M
- here and read .  The module
- will be called amba-clcd.
-
 config FB_ACORN
bool "Acorn VIDC support"
depends on (FB = y) && ARM && ARCH_ACORN
diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile
index 8e15220152bd..c6e3d4647e0a 100644
--- a/drivers/video/fbdev/Makefile
+++ b/drivers/video/fbdev/Makefile
@@ -75,7 +75,6 @@ obj-$(CONFIG_FB_HIT)  += hitfb.o
 obj-$(CONFIG_FB_ATMEL)   += atmel_lcdfb.o
 obj-$(CONFIG_FB_PVR2) += pvr2fb.o
 obj-$(CONFIG_FB_VOODOO1)  += sstfb.o
-obj-$(CONFIG_FB_ARMCLCD) += amba-clcd.o
 obj-$(CONFIG_FB_GOLDFISH) += goldfishfb.o
 obj-$(CONFIG_FB_68328)+= 68328fb.o
 obj-$(CONFIG_FB_GBE)  += gbefb.o
diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
deleted file mode 100644
index 0399db369e70..
--- a/drivers/video/fbdev/amba-clcd.c
+++ /dev/null
@@ -1,984 +0,0 @@
-/*
- *  linux/drivers/video/amba-clcd.c
- *
- * Copyright (C) 2001 ARM Limited, by David A Rusling
- * Updated to 2.5, Deep Blue Solutions Ltd.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file COPYING in the main directory of this archive
- * for more details.
- *
- *  ARM PrimeCell PL110 Color LCD Controller
- */
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#define to_clcd(info)  container_of(info, struct clcd_fb, fb)
-
-/* This is limited to 16 characters when displayed by X startup */
-static const char *clcd_name = "CLCD FB";
-
-static inline void clcdfb_set_start(struct clcd_fb *fb)
-{
-   unsigned long ustart = fb->fb.fix.smem_start;
-   unsigned long lstart;
-
-   ustart += fb->fb.var.yoffset * fb->fb.fix.line_length;
-   lstart = ustart + fb->fb.var.yres * fb->fb.fix.line_length / 2;
-
-   writel(ustart, fb->regs + CLCD_UBAS);
-   writel(lstart, fb->regs + CLCD_LBAS);
-}
-
-static void clcdfb_disable(struct clcd_fb *fb)
-{
-   u32 val;
-
-   if (fb->board->disable)
-   fb->board->disable(fb);
-
-   if (fb->panel->backlight) {
-   fb->panel->backlight->props.power = FB_BLANK_POWERDOWN;
-   backlight_update_status(fb->panel->backlight);
-   }
-
-   val = readl(fb->regs + fb->off_cntl);
-   if (val & CNTL_LCDPWR) {
-   val &= ~CNTL_LCDPWR;
-   writel(val, fb->regs + fb->off_cntl);
-
-   msleep(20);
-   }
-   if (val & CNTL_LCDEN) {
-