public inbox for linux-fbdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/6] fbdev: au1100fb: support COMPILE_TEST and fix multi-device support
@ 2026-02-08 17:57 Uwe Kleine-König
  2026-02-08 17:57 ` [PATCH v3 1/6] fbdev: au1100fb: Don't store device specific data in global variables Uwe Kleine-König
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2026-02-08 17:57 UTC (permalink / raw)
  To: Helge Deller; +Cc: Chen Ni, linux-fbdev, dri-devel

Hello,

changes since
v2 that is available at
https://lore.kernel.org/linux-fbdev/cover.1770483674.git.u.kleine-koenig@baylibre.com:

 - Remove fbregs again
 - Added a few more %d -> %zu conversions that were hidden for the
   compiler by print_dbg() being a noop, but Helge noticed anyhow.
 - patches #4 and #6 are new. #6 was used instead of defining DEBUG to 1
   for compile testing, that uncovered the additional issue fixed in
   patch #4.

Uwe Kleine-König (6):
  fbdev: au1100fb: Don't store device specific data in global variables
  fbdev: au1100fb: Mark several local functions as static
  fbdev: au1100fb: Use %zu to printk a value of type size_t
  fbdev: au1100fb: Use %pad to printk a value of type dma_addr_t
  fbdev: au1100fb: Make driver compilable on non-mips platforms
  fbdev: au1100fb: Replace custom printk wrappers by pr_*

 drivers/video/fbdev/Kconfig    |   3 +-
 drivers/video/fbdev/au1100fb.c | 130 +++++++++++++++++----------------
 drivers/video/fbdev/au1100fb.h |  17 ++---
 3 files changed, 73 insertions(+), 77 deletions(-)

base-commit: 0636e6205beed850d985276dc56fd73d785bea5c
-- 
2.47.3


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v3 1/6] fbdev: au1100fb: Don't store device specific data in global variables
  2026-02-08 17:57 [PATCH v3 0/6] fbdev: au1100fb: support COMPILE_TEST and fix multi-device support Uwe Kleine-König
@ 2026-02-08 17:57 ` Uwe Kleine-König
  2026-02-08 17:57 ` [PATCH v3 2/6] fbdev: au1100fb: Mark several local functions as static Uwe Kleine-König
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2026-02-08 17:57 UTC (permalink / raw)
  To: Helge Deller; +Cc: Chen Ni, linux-fbdev, dri-devel

Using global data to store device specific data is a bad pattern that
breaks if there is more than one device. So expand driver data and drop
the global variables.

While there is probably no machine that has two or more au1100fb
devices, this makes the driver a better template for new drivers and
saves some memory if there is no such bound device.

bloat-o-meter reports (for ARCH=arm allmodconfig + CONFIG_FB_AU1100=y
and ignoring the rename of the init function):

	add/remove: 1/4 grow/shrink: 2/2 up/down: 1360/-4800 (-3440)
	Function                                     old     new   delta
	au1100fb_drv_probe                          2648    3328    +680
	$a                                         12808   13484    +676
	au1100fb_drv_resume                          404     400      -4
	au1100fb_fix                                  68       -     -68
	au1100fb_var                                 160       -    -160
	fbregs                                      2048       -   -2048
	$d                                          9525    7009   -2516
	Total: Before=38664, After=35224, chg -8.90%

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
I think this doesn't need a Fixes line, but if you want, it would be:

	Fixes: 3b495f2bb749 ("Au1100 FB driver uplift for 2.6.")
	Fixes: f77f50ca1a23 ("[PATCH] au1100fb: add power management support")
---
 drivers/video/fbdev/au1100fb.c | 65 +++++++++++++++-------------------
 drivers/video/fbdev/au1100fb.h |  5 +++
 2 files changed, 34 insertions(+), 36 deletions(-)

diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
index feaa1061c436..7bc224a8455c 100644
--- a/drivers/video/fbdev/au1100fb.c
+++ b/drivers/video/fbdev/au1100fb.c
@@ -84,21 +84,6 @@ struct fb_bitfield rgb_bitfields[][4] =
 	{ { 8, 4, 0 },  { 4, 4, 0 }, { 0, 4, 0 }, { 0, 0, 0 } },
 };
 
-static struct fb_fix_screeninfo au1100fb_fix = {
-	.id		= "AU1100 FB",
-	.xpanstep 	= 1,
-	.ypanstep 	= 1,
-	.type		= FB_TYPE_PACKED_PIXELS,
-	.accel		= FB_ACCEL_NONE,
-};
-
-static struct fb_var_screeninfo au1100fb_var = {
-	.activate	= FB_ACTIVATE_NOW,
-	.height		= -1,
-	.width		= -1,
-	.vmode		= FB_VMODE_NONINTERLACED,
-};
-
 /* fb_blank
  * Blank the screen. Depending on the mode, the screen will be
  * activated with the backlight color, or desactivated
@@ -432,19 +417,26 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 		return -EFAULT;
 	}
 
-	au1100fb_fix.mmio_start = regs_res->start;
-	au1100fb_fix.mmio_len = resource_size(regs_res);
+	fbdev->info.fix = (struct fb_fix_screeninfo) {
+		.mmio_start = regs_res->start,
+		.mmio_len = resource_size(regs_res),
+		.id = "AU1100 FB",
+		.xpanstep = 1,
+		.ypanstep = 1,
+		.type = FB_TYPE_PACKED_PIXELS,
+		.accel = FB_ACCEL_NONE,
+	};
 
 	if (!devm_request_mem_region(&dev->dev,
-				     au1100fb_fix.mmio_start,
-				     au1100fb_fix.mmio_len,
+				     fbdev->info.fix.mmio_start,
+				     fbdev->info.fix.mmio_len,
 				     DRIVER_NAME)) {
 		print_err("fail to lock memory region at 0x%08lx",
-				au1100fb_fix.mmio_start);
+			  fbdev->info.fix.mmio_start);
 		return -EBUSY;
 	}
 
-	fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(au1100fb_fix.mmio_start);
+	fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
 
 	print_dbg("Register memory map at %p", fbdev->regs);
 	print_dbg("phys=0x%08x, size=%d", fbdev->regs_phys, fbdev->regs_len);
@@ -469,22 +461,27 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 		return -ENOMEM;
 	}
 
-	au1100fb_fix.smem_start = fbdev->fb_phys;
-	au1100fb_fix.smem_len = fbdev->fb_len;
+	fbdev->info.fix.smem_start = fbdev->fb_phys;
+	fbdev->info.fix.smem_len = fbdev->fb_len;
 
 	print_dbg("Framebuffer memory map at %p", fbdev->fb_mem);
 	print_dbg("phys=0x%08x, size=%dK", fbdev->fb_phys, fbdev->fb_len / 1024);
 
 	/* load the panel info into the var struct */
-	au1100fb_var.bits_per_pixel = fbdev->panel->bpp;
-	au1100fb_var.xres = fbdev->panel->xres;
-	au1100fb_var.xres_virtual = au1100fb_var.xres;
-	au1100fb_var.yres = fbdev->panel->yres;
-	au1100fb_var.yres_virtual = au1100fb_var.yres;
+	fbdev->info.var = (struct fb_var_screeninfo) {
+		.activate = FB_ACTIVATE_NOW,
+		.height = -1,
+		.width = -1,
+		.vmode = FB_VMODE_NONINTERLACED,
+		.bits_per_pixel = fbdev->panel->bpp,
+		.xres = fbdev->panel->xres,
+		.xres_virtual = fbdev->panel->xres,
+		.yres = fbdev->panel->yres,
+		.yres_virtual = fbdev->panel->yres,
+	};
 
 	fbdev->info.screen_base = fbdev->fb_mem;
 	fbdev->info.fbops = &au1100fb_ops;
-	fbdev->info.fix = au1100fb_fix;
 
 	fbdev->info.pseudo_palette =
 		devm_kcalloc(&dev->dev, 16, sizeof(u32), GFP_KERNEL);
@@ -497,8 +494,6 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 		return -EFAULT;
 	}
 
-	fbdev->info.var = au1100fb_var;
-
 	/* Set h/w registers */
 	au1100fb_setmode(fbdev);
 
@@ -545,9 +540,7 @@ void au1100fb_drv_remove(struct platform_device *dev)
 }
 
 #ifdef CONFIG_PM
-static struct au1100fb_regs fbregs;
-
-int au1100fb_drv_suspend(struct platform_device *dev, pm_message_t state)
+static int au1100fb_drv_suspend(struct platform_device *dev, pm_message_t state)
 {
 	struct au1100fb_device *fbdev = platform_get_drvdata(dev);
 
@@ -559,7 +552,7 @@ int au1100fb_drv_suspend(struct platform_device *dev, pm_message_t state)
 
 	clk_disable(fbdev->lcdclk);
 
-	memcpy(&fbregs, fbdev->regs, sizeof(struct au1100fb_regs));
+	memcpy(&fbdev->pm_regs, fbdev->regs, sizeof(struct au1100fb_regs));
 
 	return 0;
 }
@@ -572,7 +565,7 @@ int au1100fb_drv_resume(struct platform_device *dev)
 	if (!fbdev)
 		return 0;
 
-	memcpy(fbdev->regs, &fbregs, sizeof(struct au1100fb_regs));
+	memcpy(fbdev->regs, &fbdev->pm_regs, sizeof(struct au1100fb_regs));
 
 	ret = clk_enable(fbdev->lcdclk);
 	if (ret)
diff --git a/drivers/video/fbdev/au1100fb.h b/drivers/video/fbdev/au1100fb.h
index 79f4048726f1..dc53d063fcc3 100644
--- a/drivers/video/fbdev/au1100fb.h
+++ b/drivers/video/fbdev/au1100fb.h
@@ -105,6 +105,11 @@ struct au1100fb_device {
 	size_t       		regs_len;
 	unsigned int 		regs_phys;
 
+#ifdef CONFIG_PM
+	/* stores the register values during suspend */
+	struct au1100fb_regs 	pm_regs;
+#endif
+
 	unsigned char* 		fb_mem;		/* FrameBuffer memory map */
 	size_t	      		fb_len;
 	dma_addr_t    		fb_phys;
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 2/6] fbdev: au1100fb: Mark several local functions as static
  2026-02-08 17:57 [PATCH v3 0/6] fbdev: au1100fb: support COMPILE_TEST and fix multi-device support Uwe Kleine-König
  2026-02-08 17:57 ` [PATCH v3 1/6] fbdev: au1100fb: Don't store device specific data in global variables Uwe Kleine-König
@ 2026-02-08 17:57 ` Uwe Kleine-König
  2026-02-08 17:58 ` [PATCH v3 3/6] fbdev: au1100fb: Use %zu to printk a value of type size_t Uwe Kleine-König
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2026-02-08 17:57 UTC (permalink / raw)
  To: Helge Deller; +Cc: Chen Ni, linux-fbdev, dri-devel

This fixes several (fatal) compiler warnings à la

	drivers/video/fbdev/au1100fb.c:530:6: error: no previous prototype for ‘au1100fb_drv_remove’ [-Werror=missing-prototypes]
	  523 | void au1100fb_drv_remove(struct platform_device *dev)
	      |      ^~~~~~~~~~~~~~~~~~~

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 drivers/video/fbdev/au1100fb.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
index 7bc224a8455c..b1da51683de7 100644
--- a/drivers/video/fbdev/au1100fb.c
+++ b/drivers/video/fbdev/au1100fb.c
@@ -120,7 +120,7 @@ static int au1100fb_fb_blank(int blank_mode, struct fb_info *fbi)
  * Set hardware with var settings. This will enable the controller with a specific
  * mode, normally validated with the fb_check_var method
 	 */
-int au1100fb_setmode(struct au1100fb_device *fbdev)
+static int au1100fb_setmode(struct au1100fb_device *fbdev)
 {
 	struct fb_info *info;
 	u32 words;
@@ -219,7 +219,7 @@ int au1100fb_setmode(struct au1100fb_device *fbdev)
 /* fb_setcolreg
  * Set color in LCD palette.
  */
-int au1100fb_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *fbi)
+static int au1100fb_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *fbi)
 {
 	struct au1100fb_device *fbdev;
 	u32 *palette;
@@ -278,7 +278,7 @@ int au1100fb_fb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned
 /* fb_pan_display
  * Pan display in x and/or y as specified
  */
-int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fbi)
+static int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fbi)
 {
 	struct au1100fb_device *fbdev;
 	int dy;
@@ -325,7 +325,7 @@ int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *fbi)
  * Map video memory in user space. We don't use the generic fb_mmap method mainly
  * to allow the use of the TLB streaming flag (CCA=6)
  */
-int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
+static int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
 {
 	struct au1100fb_device *fbdev = to_au1100fb_device(fbi);
 
@@ -517,7 +517,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 	return -ENODEV;
 }
 
-void au1100fb_drv_remove(struct platform_device *dev)
+static void au1100fb_drv_remove(struct platform_device *dev)
 {
 	struct au1100fb_device *fbdev = NULL;
 
@@ -557,7 +557,7 @@ static int au1100fb_drv_suspend(struct platform_device *dev, pm_message_t state)
 	return 0;
 }
 
-int au1100fb_drv_resume(struct platform_device *dev)
+static int au1100fb_drv_resume(struct platform_device *dev)
 {
 	struct au1100fb_device *fbdev = platform_get_drvdata(dev);
 	int ret;
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 3/6] fbdev: au1100fb: Use %zu to printk a value of type size_t
  2026-02-08 17:57 [PATCH v3 0/6] fbdev: au1100fb: support COMPILE_TEST and fix multi-device support Uwe Kleine-König
  2026-02-08 17:57 ` [PATCH v3 1/6] fbdev: au1100fb: Don't store device specific data in global variables Uwe Kleine-König
  2026-02-08 17:57 ` [PATCH v3 2/6] fbdev: au1100fb: Mark several local functions as static Uwe Kleine-König
@ 2026-02-08 17:58 ` Uwe Kleine-König
  2026-02-08 19:21   ` Helge Deller
  2026-02-08 17:58 ` [PATCH v3 4/6] fbdev: au1100fb: Use %pad to printk a value of type dma_addr_t Uwe Kleine-König
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Uwe Kleine-König @ 2026-02-08 17:58 UTC (permalink / raw)
  To: Helge Deller; +Cc: Chen Ni, linux-fbdev, dri-devel

%zu is the dedicated type for size_t. %d only works on 32bit
architectures where size_t is typedef'd to be unsigned int. (And then
the signedness doesn't fit, but `gcc -Wformat` doesn't stumble over this.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 drivers/video/fbdev/au1100fb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
index b1da51683de7..914f371a614c 100644
--- a/drivers/video/fbdev/au1100fb.c
+++ b/drivers/video/fbdev/au1100fb.c
@@ -439,7 +439,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 	fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
 
 	print_dbg("Register memory map at %p", fbdev->regs);
-	print_dbg("phys=0x%08x, size=%d", fbdev->regs_phys, fbdev->regs_len);
+	print_dbg("phys=0x%08x, size=%zu", fbdev->regs_phys, fbdev->regs_len);
 
 	c = clk_get(NULL, "lcd_intclk");
 	if (!IS_ERR(c)) {
@@ -456,7 +456,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 					    PAGE_ALIGN(fbdev->fb_len),
 					    &fbdev->fb_phys, GFP_KERNEL);
 	if (!fbdev->fb_mem) {
-		print_err("fail to allocate framebuffer (size: %dK))",
+		print_err("fail to allocate framebuffer (size: %zuK))",
 			  fbdev->fb_len / 1024);
 		return -ENOMEM;
 	}
@@ -465,7 +465,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 	fbdev->info.fix.smem_len = fbdev->fb_len;
 
 	print_dbg("Framebuffer memory map at %p", fbdev->fb_mem);
-	print_dbg("phys=0x%08x, size=%dK", fbdev->fb_phys, fbdev->fb_len / 1024);
+	print_dbg("phys=0x%08x, size=%zuK", &fbdev->fb_phys, fbdev->fb_len / 1024);
 
 	/* load the panel info into the var struct */
 	fbdev->info.var = (struct fb_var_screeninfo) {
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 4/6] fbdev: au1100fb: Use %pad to printk a value of type dma_addr_t
  2026-02-08 17:57 [PATCH v3 0/6] fbdev: au1100fb: support COMPILE_TEST and fix multi-device support Uwe Kleine-König
                   ` (2 preceding siblings ...)
  2026-02-08 17:58 ` [PATCH v3 3/6] fbdev: au1100fb: Use %zu to printk a value of type size_t Uwe Kleine-König
@ 2026-02-08 17:58 ` Uwe Kleine-König
  2026-02-08 17:58 ` [PATCH v3 5/6] fbdev: au1100fb: Make driver compilable on non-mips platforms Uwe Kleine-König
  2026-02-08 17:58 ` [PATCH v3 6/6] fbdev: au1100fb: Replace custom printk wrappers by pr_* Uwe Kleine-König
  5 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2026-02-08 17:58 UTC (permalink / raw)
  To: Helge Deller; +Cc: Chen Ni, linux-fbdev, dri-devel

The size of a dma_addr_t variable varies among different architectures.
The save way to emit such a value is using the %pad format. This
prepares allowing this driver to be compiled on non-mips platforms.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 drivers/video/fbdev/au1100fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
index 914f371a614c..e43687ac74a1 100644
--- a/drivers/video/fbdev/au1100fb.c
+++ b/drivers/video/fbdev/au1100fb.c
@@ -465,7 +465,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 	fbdev->info.fix.smem_len = fbdev->fb_len;
 
 	print_dbg("Framebuffer memory map at %p", fbdev->fb_mem);
-	print_dbg("phys=0x%08x, size=%zuK", &fbdev->fb_phys, fbdev->fb_len / 1024);
+	print_dbg("phys=0x%pad, size=%zuK", &fbdev->fb_phys, fbdev->fb_len / 1024);
 
 	/* load the panel info into the var struct */
 	fbdev->info.var = (struct fb_var_screeninfo) {
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 5/6] fbdev: au1100fb: Make driver compilable on non-mips platforms
  2026-02-08 17:57 [PATCH v3 0/6] fbdev: au1100fb: support COMPILE_TEST and fix multi-device support Uwe Kleine-König
                   ` (3 preceding siblings ...)
  2026-02-08 17:58 ` [PATCH v3 4/6] fbdev: au1100fb: Use %pad to printk a value of type dma_addr_t Uwe Kleine-König
@ 2026-02-08 17:58 ` Uwe Kleine-König
  2026-02-09  6:30   ` kernel test robot
  2026-02-09  9:16   ` kernel test robot
  2026-02-08 17:58 ` [PATCH v3 6/6] fbdev: au1100fb: Replace custom printk wrappers by pr_* Uwe Kleine-König
  5 siblings, 2 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2026-02-08 17:58 UTC (permalink / raw)
  To: Helge Deller; +Cc: Chen Ni, linux-fbdev, dri-devel

The header asm/mach-au1x00/au1000.h is unused apart from pulling in
<linux/delay.h> (for mdelay()) and <linux/io.h> (for KSEG1ADDR()). Then
the only platform specific part in the driver is the usage of the KSEG1ADDR
macro, which for the non-mips case can be stubbed.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 drivers/video/fbdev/Kconfig    |  3 ++-
 drivers/video/fbdev/au1100fb.c | 12 ++++++++++--
 drivers/video/fbdev/au1100fb.h |  2 --
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 45733522ff48..4514c42db9fa 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -1345,7 +1345,8 @@ endchoice
 
 config FB_AU1100
 	bool "Au1100 LCD Driver"
-	depends on (FB = y) && MIPS_ALCHEMY
+	depends on FB
+	depends on MIPS_ALCHEMY || COMPILE_TEST
 	select FB_IOMEM_HELPERS
 	help
 	  This is the framebuffer driver for the AMD Au1100 SOC.  It can drive
diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
index e43687ac74a1..782f70c3a98f 100644
--- a/drivers/video/fbdev/au1100fb.c
+++ b/drivers/video/fbdev/au1100fb.c
@@ -42,6 +42,8 @@
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  */
 #include <linux/clk.h>
+#include <linux/delay.h>
+#include <linux/io.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -55,12 +57,15 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
-#include <asm/mach-au1x00/au1000.h>
-
 #define DEBUG 0
 
 #include "au1100fb.h"
 
+#if defined(CONFIG_COMPILE_TEST) && !defined(CONFIG_MIPS)
+/* This is only defined to be able to compile this driver on non-mips platforms */
+#define KSEG1ADDR(x) (x)
+#endif
+
 #define DRIVER_NAME "au1100fb"
 #define DRIVER_DESC "LCD controller driver for AU1100 processors"
 
@@ -331,7 +336,10 @@ static int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
 
 	vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
 
+#ifndef CONFIG_S390
+	/* On s390 pgprot_val() is a function and thus not a lvalue */
 	pgprot_val(vma->vm_page_prot) |= (6 << 9); //CCA=6
+#endif
 
 	return dma_mmap_coherent(fbdev->dev, vma, fbdev->fb_mem, fbdev->fb_phys,
 			fbdev->fb_len);
diff --git a/drivers/video/fbdev/au1100fb.h b/drivers/video/fbdev/au1100fb.h
index dc53d063fcc3..998328cd16a2 100644
--- a/drivers/video/fbdev/au1100fb.h
+++ b/drivers/video/fbdev/au1100fb.h
@@ -30,8 +30,6 @@
 #ifndef _AU1100LCD_H
 #define _AU1100LCD_H
 
-#include <asm/mach-au1x00/au1000.h>
-
 #define print_err(f, arg...) printk(KERN_ERR DRIVER_NAME ": " f "\n", ## arg)
 #define print_warn(f, arg...) printk(KERN_WARNING DRIVER_NAME ": " f "\n", ## arg)
 #define print_info(f, arg...) printk(KERN_INFO DRIVER_NAME ": " f "\n", ## arg)
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 6/6] fbdev: au1100fb: Replace custom printk wrappers by pr_*
  2026-02-08 17:57 [PATCH v3 0/6] fbdev: au1100fb: support COMPILE_TEST and fix multi-device support Uwe Kleine-König
                   ` (4 preceding siblings ...)
  2026-02-08 17:58 ` [PATCH v3 5/6] fbdev: au1100fb: Make driver compilable on non-mips platforms Uwe Kleine-König
@ 2026-02-08 17:58 ` Uwe Kleine-König
  5 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2026-02-08 17:58 UTC (permalink / raw)
  To: Helge Deller; +Cc: Chen Ni, linux-fbdev, dri-devel

The global wrappers also have the advantage to do stricter format
checking, so the pr_devel formats are also checked if DEBUG is not
defined. The global variants only check for DEBUG being defined and not
its actual value, to the #define to zero is dropped, too.

There is only a slight semantic change as the (by default disabled)
debug output doesn't contain __FILE__ any more.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 drivers/video/fbdev/au1100fb.c | 41 +++++++++++++++++-----------------
 drivers/video/fbdev/au1100fb.h | 10 ---------
 2 files changed, 21 insertions(+), 30 deletions(-)

diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
index 782f70c3a98f..86aafa4f0966 100644
--- a/drivers/video/fbdev/au1100fb.c
+++ b/drivers/video/fbdev/au1100fb.c
@@ -41,6 +41,9 @@
  *  with this program; if not, write  to the Free Software Foundation, Inc.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  */
+
+#define pr_fmt(fmt) "au1100fb:" fmt "\n"
+
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/io.h>
@@ -57,8 +60,6 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
-#define DEBUG 0
-
 #include "au1100fb.h"
 
 #if defined(CONFIG_COMPILE_TEST) && !defined(CONFIG_MIPS)
@@ -97,7 +98,7 @@ static int au1100fb_fb_blank(int blank_mode, struct fb_info *fbi)
 {
 	struct au1100fb_device *fbdev = to_au1100fb_device(fbi);
 
-	print_dbg("fb_blank %d %p", blank_mode, fbi);
+	pr_devel("fb_blank %d %p", blank_mode, fbi);
 
 	switch (blank_mode) {
 
@@ -290,7 +291,7 @@ static int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info
 
 	fbdev = to_au1100fb_device(fbi);
 
-	print_dbg("fb_pan_display %p %p", var, fbi);
+	pr_devel("fb_pan_display %p %p", var, fbi);
 
 	if (!var || !fbdev) {
 		return -EINVAL;
@@ -301,13 +302,13 @@ static int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info
 		return -EINVAL;
 	}
 
-	print_dbg("fb_pan_display 2 %p %p", var, fbi);
+	pr_devel("fb_pan_display 2 %p %p", var, fbi);
 	dy = var->yoffset - fbi->var.yoffset;
 	if (dy) {
 
 		u32 dmaaddr;
 
-		print_dbg("Panning screen of %d lines", dy);
+		pr_devel("Panning screen of %d lines", dy);
 
 		dmaaddr = fbdev->regs->lcd_dmaaddr0;
 		dmaaddr += (fbi->fix.line_length * dy);
@@ -321,7 +322,7 @@ static int au1100fb_fb_pan_display(struct fb_var_screeninfo *var, struct fb_info
 			fbdev->regs->lcd_dmaaddr0 = LCD_DMA_SA_N(dmaaddr);
 	}
 	}
-	print_dbg("fb_pan_display 3 %p %p", var, fbi);
+	pr_devel("fb_pan_display 3 %p %p", var, fbi);
 
 	return 0;
 }
@@ -364,7 +365,7 @@ static int au1100fb_setup(struct au1100fb_device *fbdev)
 	int num_panels = ARRAY_SIZE(known_lcd_panels);
 
 	if (num_panels <= 0) {
-		print_err("No LCD panels supported by driver!");
+		pr_err("No LCD panels supported by driver!");
 		return -ENODEV;
 	}
 
@@ -387,16 +388,16 @@ static int au1100fb_setup(struct au1100fb_device *fbdev)
 				}
 			}
 			if (i >= num_panels) {
-				print_warn("Panel '%s' not supported!", this_opt);
+				pr_warn("Panel '%s' not supported!", this_opt);
 				return -ENODEV;
 			}
 		}
 		/* Unsupported option */
 		else
-			print_warn("Unsupported option \"%s\"", this_opt);
+			pr_warn("Unsupported option \"%s\"", this_opt);
 	}
 
-	print_info("Panel=%s", fbdev->panel->name);
+	pr_info("Panel=%s", fbdev->panel->name);
 
 	return 0;
 }
@@ -421,7 +422,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 	/* Allocate region for our registers and map them */
 	regs_res = platform_get_resource(dev, IORESOURCE_MEM, 0);
 	if (!regs_res) {
-		print_err("fail to retrieve registers resource");
+		pr_err("fail to retrieve registers resource");
 		return -EFAULT;
 	}
 
@@ -439,15 +440,15 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 				     fbdev->info.fix.mmio_start,
 				     fbdev->info.fix.mmio_len,
 				     DRIVER_NAME)) {
-		print_err("fail to lock memory region at 0x%08lx",
+		pr_err("fail to lock memory region at 0x%08lx",
 			  fbdev->info.fix.mmio_start);
 		return -EBUSY;
 	}
 
 	fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
 
-	print_dbg("Register memory map at %p", fbdev->regs);
-	print_dbg("phys=0x%08x, size=%zu", fbdev->regs_phys, fbdev->regs_len);
+	pr_devel("Register memory map at %p", fbdev->regs);
+	pr_devel("phys=0x%08x, size=%zu", fbdev->regs_phys, fbdev->regs_len);
 
 	c = clk_get(NULL, "lcd_intclk");
 	if (!IS_ERR(c)) {
@@ -464,7 +465,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 					    PAGE_ALIGN(fbdev->fb_len),
 					    &fbdev->fb_phys, GFP_KERNEL);
 	if (!fbdev->fb_mem) {
-		print_err("fail to allocate framebuffer (size: %zuK))",
+		pr_err("fail to allocate framebuffer (size: %zuK))",
 			  fbdev->fb_len / 1024);
 		return -ENOMEM;
 	}
@@ -472,8 +473,8 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 	fbdev->info.fix.smem_start = fbdev->fb_phys;
 	fbdev->info.fix.smem_len = fbdev->fb_len;
 
-	print_dbg("Framebuffer memory map at %p", fbdev->fb_mem);
-	print_dbg("phys=0x%pad, size=%zuK", &fbdev->fb_phys, fbdev->fb_len / 1024);
+	pr_devel("Framebuffer memory map at %p", fbdev->fb_mem);
+	pr_devel("phys=0x%pad, size=%zuK", &fbdev->fb_phys, fbdev->fb_len / 1024);
 
 	/* load the panel info into the var struct */
 	fbdev->info.var = (struct fb_var_screeninfo) {
@@ -497,7 +498,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 		return -ENOMEM;
 
 	if (fb_alloc_cmap(&fbdev->info.cmap, AU1100_LCD_NBR_PALETTE_ENTRIES, 0) < 0) {
-		print_err("Fail to allocate colormap (%d entries)",
+		pr_err("Fail to allocate colormap (%d entries)",
 			   AU1100_LCD_NBR_PALETTE_ENTRIES);
 		return -EFAULT;
 	}
@@ -507,7 +508,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
 
 	/* Register new framebuffer */
 	if (register_framebuffer(&fbdev->info) < 0) {
-		print_err("cannot register new framebuffer");
+		pr_err("cannot register new framebuffer");
 		goto failed;
 	}
 
diff --git a/drivers/video/fbdev/au1100fb.h b/drivers/video/fbdev/au1100fb.h
index 998328cd16a2..9b70208128a8 100644
--- a/drivers/video/fbdev/au1100fb.h
+++ b/drivers/video/fbdev/au1100fb.h
@@ -30,16 +30,6 @@
 #ifndef _AU1100LCD_H
 #define _AU1100LCD_H
 
-#define print_err(f, arg...) printk(KERN_ERR DRIVER_NAME ": " f "\n", ## arg)
-#define print_warn(f, arg...) printk(KERN_WARNING DRIVER_NAME ": " f "\n", ## arg)
-#define print_info(f, arg...) printk(KERN_INFO DRIVER_NAME ": " f "\n", ## arg)
-
-#if DEBUG
-#define print_dbg(f, arg...) printk(__FILE__ ": " f "\n", ## arg)
-#else
-#define print_dbg(f, arg...) do {} while (0)
-#endif
-
 #if defined(__BIG_ENDIAN)
 #define LCD_CONTROL_DEFAULT_PO LCD_CONTROL_PO_11
 #else
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v3 3/6] fbdev: au1100fb: Use %zu to printk a value of type size_t
  2026-02-08 17:58 ` [PATCH v3 3/6] fbdev: au1100fb: Use %zu to printk a value of type size_t Uwe Kleine-König
@ 2026-02-08 19:21   ` Helge Deller
  2026-02-08 19:24     ` Helge Deller
  0 siblings, 1 reply; 13+ messages in thread
From: Helge Deller @ 2026-02-08 19:21 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Chen Ni, linux-fbdev, dri-devel

On 2/8/26 18:58, Uwe Kleine-König wrote:
> %zu is the dedicated type for size_t. %d only works on 32bit
> architectures where size_t is typedef'd to be unsigned int. (And then
> the signedness doesn't fit, but `gcc -Wformat` doesn't stumble over this.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
>   drivers/video/fbdev/au1100fb.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
> index b1da51683de7..914f371a614c 100644
> --- a/drivers/video/fbdev/au1100fb.c
> +++ b/drivers/video/fbdev/au1100fb.c
> @@ -439,7 +439,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
>   	fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
>   
>   	print_dbg("Register memory map at %p", fbdev->regs);
> -	print_dbg("phys=0x%08x, size=%d", fbdev->regs_phys, fbdev->regs_len);
> +	print_dbg("phys=0x%08x, size=%zu", fbdev->regs_phys, fbdev->regs_len);
>   
>   	c = clk_get(NULL, "lcd_intclk");
>   	if (!IS_ERR(c)) {
> @@ -456,7 +456,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
>   					    PAGE_ALIGN(fbdev->fb_len),
>   					    &fbdev->fb_phys, GFP_KERNEL);
>   	if (!fbdev->fb_mem) {
> -		print_err("fail to allocate framebuffer (size: %dK))",
> +		print_err("fail to allocate framebuffer (size: %zuK))",
>   			  fbdev->fb_len / 1024);
>   		return -ENOMEM;
>   	}
> @@ -465,7 +465,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
>   	fbdev->info.fix.smem_len = fbdev->fb_len;
>   
>   	print_dbg("Framebuffer memory map at %p", fbdev->fb_mem);
> -	print_dbg("phys=0x%08x, size=%dK", fbdev->fb_phys, fbdev->fb_len / 1024);
> +	print_dbg("phys=0x%08x, size=%zuK", &fbdev->fb_phys, fbdev->fb_len / 1024);

The & seems to be wrong.

Helge

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3 3/6] fbdev: au1100fb: Use %zu to printk a value of type size_t
  2026-02-08 19:21   ` Helge Deller
@ 2026-02-08 19:24     ` Helge Deller
  2026-02-09  7:33       ` Uwe Kleine-König
  0 siblings, 1 reply; 13+ messages in thread
From: Helge Deller @ 2026-02-08 19:24 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Chen Ni, linux-fbdev, dri-devel

On 2/8/26 20:21, Helge Deller wrote:
> On 2/8/26 18:58, Uwe Kleine-König wrote:
>> %zu is the dedicated type for size_t. %d only works on 32bit
>> architectures where size_t is typedef'd to be unsigned int. (And then
>> the signedness doesn't fit, but `gcc -Wformat` doesn't stumble over this.
>>
>> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
>> ---
>>   drivers/video/fbdev/au1100fb.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
>> index b1da51683de7..914f371a614c 100644
>> --- a/drivers/video/fbdev/au1100fb.c
>> +++ b/drivers/video/fbdev/au1100fb.c
>> @@ -439,7 +439,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
>>       fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
>>       print_dbg("Register memory map at %p", fbdev->regs);
>> -    print_dbg("phys=0x%08x, size=%d", fbdev->regs_phys, fbdev->regs_len);
>> +    print_dbg("phys=0x%08x, size=%zu", fbdev->regs_phys, fbdev->regs_len);
>>       c = clk_get(NULL, "lcd_intclk");
>>       if (!IS_ERR(c)) {
>> @@ -456,7 +456,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
>>                           PAGE_ALIGN(fbdev->fb_len),
>>                           &fbdev->fb_phys, GFP_KERNEL);
>>       if (!fbdev->fb_mem) {
>> -        print_err("fail to allocate framebuffer (size: %dK))",
>> +        print_err("fail to allocate framebuffer (size: %zuK))",
>>                 fbdev->fb_len / 1024);
>>           return -ENOMEM;
>>       }
>> @@ -465,7 +465,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
>>       fbdev->info.fix.smem_len = fbdev->fb_len;
>>       print_dbg("Framebuffer memory map at %p", fbdev->fb_mem);
>> -    print_dbg("phys=0x%08x, size=%dK", fbdev->fb_phys, fbdev->fb_len / 1024);
>> +    print_dbg("phys=0x%08x, size=%zuK", &fbdev->fb_phys, fbdev->fb_len / 1024);
> 
> The & seems to be wrong.

I see you fix it up in patch #4.
Maybe simply merge them?

Helge

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3 5/6] fbdev: au1100fb: Make driver compilable on non-mips platforms
  2026-02-08 17:58 ` [PATCH v3 5/6] fbdev: au1100fb: Make driver compilable on non-mips platforms Uwe Kleine-König
@ 2026-02-09  6:30   ` kernel test robot
  2026-02-09  7:27     ` Uwe Kleine-König
  2026-02-09  9:16   ` kernel test robot
  1 sibling, 1 reply; 13+ messages in thread
From: kernel test robot @ 2026-02-09  6:30 UTC (permalink / raw)
  To: Uwe Kleine-König, Helge Deller
  Cc: oe-kbuild-all, Chen Ni, linux-fbdev, dri-devel

Hi Uwe,

kernel test robot noticed the following build errors:

[auto build test ERROR on 0636e6205beed850d985276dc56fd73d785bea5c]

url:    https://github.com/intel-lab-lkp/linux/commits/Uwe-Kleine-K-nig/fbdev-au1100fb-Don-t-store-device-specific-data-in-global-variables/20260209-015956
base:   0636e6205beed850d985276dc56fd73d785bea5c
patch link:    https://lore.kernel.org/r/67b7aa0157b9cf5de111ab6b2725d207ec98aae9.1770572936.git.u.kleine-koenig%40baylibre.com
patch subject: [PATCH v3 5/6] fbdev: au1100fb: Make driver compilable on non-mips platforms
config: csky-allmodconfig (https://download.01.org/0day-ci/archive/20260209/202602091447.3HeLynhy-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260209/202602091447.3HeLynhy-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602091447.3HeLynhy-lkp@intel.com/

All errors (new ones prefixed by >>):

   csky-linux-ld: drivers/video/fbdev/au1100fb.o: in function `au1100fb_drv_remove':
   au1100fb.c:(.text+0x21c): undefined reference to `unregister_framebuffer'
>> csky-linux-ld: au1100fb.c:(.text+0x224): undefined reference to `fb_dealloc_cmap'
   csky-linux-ld: drivers/video/fbdev/au1100fb.o: in function `au1100fb_fb_mmap':
   au1100fb.c:(.text+0x2bc): undefined reference to `unregister_framebuffer'
   csky-linux-ld: au1100fb.c:(.text+0x2c0): undefined reference to `fb_dealloc_cmap'
   csky-linux-ld: drivers/video/fbdev/au1100fb.o: in function `au1100fb_drv_probe':
   au1100fb.c:(.text+0x540): undefined reference to `fb_get_options'
>> csky-linux-ld: au1100fb.c:(.text+0x6e4): undefined reference to `fb_get_options'
>> csky-linux-ld: au1100fb.c:(.text+0x7bc): undefined reference to `fb_alloc_cmap'
>> csky-linux-ld: au1100fb.c:(.text+0x7d8): undefined reference to `register_framebuffer'
   csky-linux-ld: au1100fb.c:(.text+0x818): undefined reference to `fb_dealloc_cmap'
   csky-linux-ld: au1100fb.c:(.text+0x850): undefined reference to `fb_alloc_cmap'
   csky-linux-ld: au1100fb.c:(.text+0x860): undefined reference to `register_framebuffer'
   csky-linux-ld: au1100fb.c:(.text+0x874): undefined reference to `fb_dealloc_cmap'
>> csky-linux-ld: drivers/video/fbdev/au1100fb.o:(.rodata+0xc): undefined reference to `fb_io_read'
>> csky-linux-ld: drivers/video/fbdev/au1100fb.o:(.rodata+0x10): undefined reference to `fb_io_write'
>> csky-linux-ld: drivers/video/fbdev/au1100fb.o:(.rodata+0x2c): undefined reference to `cfb_fillrect'
>> csky-linux-ld: drivers/video/fbdev/au1100fb.o:(.rodata+0x30): undefined reference to `cfb_copyarea'
>> csky-linux-ld: drivers/video/fbdev/au1100fb.o:(.rodata+0x34): undefined reference to `cfb_imageblit'

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3 5/6] fbdev: au1100fb: Make driver compilable on non-mips platforms
  2026-02-09  6:30   ` kernel test robot
@ 2026-02-09  7:27     ` Uwe Kleine-König
  0 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2026-02-09  7:27 UTC (permalink / raw)
  To: kernel test robot
  Cc: Helge Deller, oe-kbuild-all, Chen Ni, linux-fbdev, dri-devel

[-- Attachment #1: Type: text/plain, Size: 3335 bytes --]

Hello,

On Mon, Feb 09, 2026 at 02:30:13PM +0800, kernel test robot wrote:
> kernel test robot noticed the following build errors:
> 
> [auto build test ERROR on 0636e6205beed850d985276dc56fd73d785bea5c]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Uwe-Kleine-K-nig/fbdev-au1100fb-Don-t-store-device-specific-data-in-global-variables/20260209-015956
> base:   0636e6205beed850d985276dc56fd73d785bea5c
> patch link:    https://lore.kernel.org/r/67b7aa0157b9cf5de111ab6b2725d207ec98aae9.1770572936.git.u.kleine-koenig%40baylibre.com
> patch subject: [PATCH v3 5/6] fbdev: au1100fb: Make driver compilable on non-mips platforms
> config: csky-allmodconfig (https://download.01.org/0day-ci/archive/20260209/202602091447.3HeLynhy-lkp@intel.com/config)
> compiler: csky-linux-gcc (GCC) 15.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260209/202602091447.3HeLynhy-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202602091447.3HeLynhy-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    csky-linux-ld: drivers/video/fbdev/au1100fb.o: in function `au1100fb_drv_remove':
>    au1100fb.c:(.text+0x21c): undefined reference to `unregister_framebuffer'
> >> csky-linux-ld: au1100fb.c:(.text+0x224): undefined reference to `fb_dealloc_cmap'
>    csky-linux-ld: drivers/video/fbdev/au1100fb.o: in function `au1100fb_fb_mmap':
>    au1100fb.c:(.text+0x2bc): undefined reference to `unregister_framebuffer'
>    csky-linux-ld: au1100fb.c:(.text+0x2c0): undefined reference to `fb_dealloc_cmap'
>    csky-linux-ld: drivers/video/fbdev/au1100fb.o: in function `au1100fb_drv_probe':
>    au1100fb.c:(.text+0x540): undefined reference to `fb_get_options'
> >> csky-linux-ld: au1100fb.c:(.text+0x6e4): undefined reference to `fb_get_options'
> >> csky-linux-ld: au1100fb.c:(.text+0x7bc): undefined reference to `fb_alloc_cmap'
> >> csky-linux-ld: au1100fb.c:(.text+0x7d8): undefined reference to `register_framebuffer'
>    csky-linux-ld: au1100fb.c:(.text+0x818): undefined reference to `fb_dealloc_cmap'
>    csky-linux-ld: au1100fb.c:(.text+0x850): undefined reference to `fb_alloc_cmap'
>    csky-linux-ld: au1100fb.c:(.text+0x860): undefined reference to `register_framebuffer'
>    csky-linux-ld: au1100fb.c:(.text+0x874): undefined reference to `fb_dealloc_cmap'
> >> csky-linux-ld: drivers/video/fbdev/au1100fb.o:(.rodata+0xc): undefined reference to `fb_io_read'
> >> csky-linux-ld: drivers/video/fbdev/au1100fb.o:(.rodata+0x10): undefined reference to `fb_io_write'
> >> csky-linux-ld: drivers/video/fbdev/au1100fb.o:(.rodata+0x2c): undefined reference to `cfb_fillrect'
> >> csky-linux-ld: drivers/video/fbdev/au1100fb.o:(.rodata+0x30): undefined reference to `cfb_copyarea'
> >> csky-linux-ld: drivers/video/fbdev/au1100fb.o:(.rodata+0x34): undefined reference to `cfb_imageblit'

The problem is that we have CONFIG_FB_AU1100=y but only CONFIG_FB=m in
that config. I thought a bool depending on a tristate implies the latter
to be =y, it seems I'm wrong and FB_AU1100 needs to depend on (FB = y).

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3 3/6] fbdev: au1100fb: Use %zu to printk a value of type size_t
  2026-02-08 19:24     ` Helge Deller
@ 2026-02-09  7:33       ` Uwe Kleine-König
  0 siblings, 0 replies; 13+ messages in thread
From: Uwe Kleine-König @ 2026-02-09  7:33 UTC (permalink / raw)
  To: Helge Deller; +Cc: Chen Ni, linux-fbdev, dri-devel

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

Hello Helge,

On Sun, Feb 08, 2026 at 08:24:43PM +0100, Helge Deller wrote:
> On 2/8/26 20:21, Helge Deller wrote:
> > On 2/8/26 18:58, Uwe Kleine-König wrote:
> > > @@ -465,7 +465,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
> > >       fbdev->info.fix.smem_len = fbdev->fb_len;
> > >       print_dbg("Framebuffer memory map at %p", fbdev->fb_mem);
> > > -    print_dbg("phys=0x%08x, size=%dK", fbdev->fb_phys, fbdev->fb_len / 1024);
> > > +    print_dbg("phys=0x%08x, size=%zuK", &fbdev->fb_phys, fbdev->fb_len / 1024);
> > 
> > The & seems to be wrong.
> 
> I see you fix it up in patch #4.
> Maybe simply merge them?

I see how my compile testing went wrong: I checked that

	make drivers/video/fbdev/

was happy on several archs (but not mips) but only starting with patch
#5 this actually compiled the driver. 🙄

I'll give it another go tomorrow or so.

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v3 5/6] fbdev: au1100fb: Make driver compilable on non-mips platforms
  2026-02-08 17:58 ` [PATCH v3 5/6] fbdev: au1100fb: Make driver compilable on non-mips platforms Uwe Kleine-König
  2026-02-09  6:30   ` kernel test robot
@ 2026-02-09  9:16   ` kernel test robot
  1 sibling, 0 replies; 13+ messages in thread
From: kernel test robot @ 2026-02-09  9:16 UTC (permalink / raw)
  To: Uwe Kleine-König, Helge Deller
  Cc: oe-kbuild-all, Chen Ni, linux-fbdev, dri-devel

Hi Uwe,

kernel test robot noticed the following build errors:

[auto build test ERROR on 0636e6205beed850d985276dc56fd73d785bea5c]

url:    https://github.com/intel-lab-lkp/linux/commits/Uwe-Kleine-K-nig/fbdev-au1100fb-Don-t-store-device-specific-data-in-global-variables/20260209-015956
base:   0636e6205beed850d985276dc56fd73d785bea5c
patch link:    https://lore.kernel.org/r/67b7aa0157b9cf5de111ab6b2725d207ec98aae9.1770572936.git.u.kleine-koenig%40baylibre.com
patch subject: [PATCH v3 5/6] fbdev: au1100fb: Make driver compilable on non-mips platforms
config: um-randconfig-r072-20260209 (https://download.01.org/0day-ci/archive/20260209/202602091743.HcmQ4SB4-lkp@intel.com/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
smatch version: v0.5.0-8994-gd50c5a4c
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260209/202602091743.HcmQ4SB4-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602091743.HcmQ4SB4-lkp@intel.com/

All errors (new ones prefixed by >>):

   /usr/bin/ld: drivers/video/fbdev/au1100fb.o: in function `au1100fb_setup':
>> drivers/video/fbdev/au1100fb.c:371:(.text+0x1ff): undefined reference to `fb_get_options'
   /usr/bin/ld: drivers/video/fbdev/au1100fb.o: in function `au1100fb_drv_probe':
>> drivers/video/fbdev/au1100fb.c:499:(.text+0xa7e): undefined reference to `fb_alloc_cmap'
>> /usr/bin/ld: drivers/video/fbdev/au1100fb.c:509:(.text+0xac2): undefined reference to `register_framebuffer'
>> /usr/bin/ld: drivers/video/fbdev/au1100fb.c:522:(.text+0xb3e): undefined reference to `fb_dealloc_cmap'
   /usr/bin/ld: drivers/video/fbdev/au1100fb.o: in function `au1100fb_drv_remove':
>> drivers/video/fbdev/au1100fb.c:540:(.text+0xb73): undefined reference to `unregister_framebuffer'
   /usr/bin/ld: drivers/video/fbdev/au1100fb.c:542:(.text+0xb86): undefined reference to `fb_dealloc_cmap'
>> /usr/bin/ld: drivers/video/fbdev/au1100fb.o:(.rodata+0x18): undefined reference to `fb_io_read'
>> /usr/bin/ld: drivers/video/fbdev/au1100fb.o:(.rodata+0x20): undefined reference to `fb_io_write'
>> /usr/bin/ld: drivers/video/fbdev/au1100fb.o:(.rodata+0x58): undefined reference to `cfb_fillrect'
>> /usr/bin/ld: drivers/video/fbdev/au1100fb.o:(.rodata+0x60): undefined reference to `cfb_copyarea'
>> /usr/bin/ld: drivers/video/fbdev/au1100fb.o:(.rodata+0x68): undefined reference to `cfb_imageblit'
   collect2: error: ld returned 1 exit status


vim +371 drivers/video/fbdev/au1100fb.c

^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  360  
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  361  static int au1100fb_setup(struct au1100fb_device *fbdev)
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  362  {
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  363  	char *this_opt, *options;
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  364  	int num_panels = ARRAY_SIZE(known_lcd_panels);
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  365  
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  366  	if (num_panels <= 0) {
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  367  		print_err("No LCD panels supported by driver!");
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  368  		return -ENODEV;
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  369  	}
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  370  
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30 @371  	if (fb_get_options(DRIVER_NAME, &options))
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  372  		return -ENODEV;
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  373  	if (!options)
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  374  		return -ENODEV;
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  375  
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  376  	while ((this_opt = strsep(&options, ",")) != NULL) {
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  377  		/* Panel option */
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  378  		if (!strncmp(this_opt, "panel:", 6)) {
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  379  			int i;
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  380  			this_opt += 6;
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  381  			for (i = 0; i < num_panels; i++) {
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  382  				if (!strncmp(this_opt, known_lcd_panels[i].name,
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  383  					     strlen(this_opt))) {
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  384  					fbdev->panel = &known_lcd_panels[i];
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  385  					fbdev->panel_idx = i;
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  386  					break;
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  387  				}
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  388  			}
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  389  			if (i >= num_panels) {
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  390  				print_warn("Panel '%s' not supported!", this_opt);
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  391  				return -ENODEV;
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  392  			}
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  393  		}
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  394  		/* Unsupported option */
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  395  		else
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  396  			print_warn("Unsupported option \"%s\"", this_opt);
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  397  	}
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  398  
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  399  	print_info("Panel=%s", fbdev->panel->name);
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  400  
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  401  	return 0;
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  402  }
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  403  
48c68c4f1b5424 drivers/video/au1100fb.c       Greg Kroah-Hartman 2012-12-21  404  static int au1100fb_drv_probe(struct platform_device *dev)
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  405  {
46953e6aab262d drivers/video/fbdev/au1100fb.c Markus Elfring     2018-03-28  406  	struct au1100fb_device *fbdev;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  407  	struct resource *regs_res;
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  408  	struct clk *c;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  409  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  410  	/* Allocate new device private */
db66f0252e2f17 drivers/video/fbdev/au1100fb.c Markus Elfring     2018-03-28  411  	fbdev = devm_kzalloc(&dev->dev, sizeof(*fbdev), GFP_KERNEL);
29914badc59b23 drivers/video/fbdev/au1100fb.c Markus Elfring     2018-03-28  412  	if (!fbdev)
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  413  		return -ENOMEM;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  414  
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  415  	if (au1100fb_setup(fbdev))
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  416  		goto failed;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  417  
7a192ec334cab9 drivers/video/au1100fb.c       Ming Lei           2009-02-06  418  	platform_set_drvdata(dev, (void *)fbdev);
67f30ad19c4b32 drivers/video/fbdev/au1100fb.c Christoph Hellwig  2019-04-28  419  	fbdev->dev = &dev->dev;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  420  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  421  	/* Allocate region for our registers and map them */
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  422  	regs_res = platform_get_resource(dev, IORESOURCE_MEM, 0);
d121c3f3cedb84 drivers/video/au1100fb.c       Manuel Lauss       2011-09-30  423  	if (!regs_res) {
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  424  		print_err("fail to retrieve registers resource");
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  425  		return -EFAULT;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  426  	}
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  427  
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  428  	fbdev->info.fix = (struct fb_fix_screeninfo) {
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  429  		.mmio_start = regs_res->start,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  430  		.mmio_len = resource_size(regs_res),
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  431  		.id = "AU1100 FB",
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  432  		.xpanstep = 1,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  433  		.ypanstep = 1,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  434  		.type = FB_TYPE_PACKED_PIXELS,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  435  		.accel = FB_ACCEL_NONE,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  436  	};
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  437  
93019734555f8d drivers/video/au1100fb.c       Manuel Lauss       2012-03-24  438  	if (!devm_request_mem_region(&dev->dev,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  439  				     fbdev->info.fix.mmio_start,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  440  				     fbdev->info.fix.mmio_len,
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  441  				     DRIVER_NAME)) {
c05b7f3d12b945 drivers/video/au1100fb.c       Rodolfo Giometti   2006-05-30  442  		print_err("fail to lock memory region at 0x%08lx",
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  443  			  fbdev->info.fix.mmio_start);
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  444  		return -EBUSY;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  445  	}
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  446  
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  447  	fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  448  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  449  	print_dbg("Register memory map at %p", fbdev->regs);
deee40d267c04a drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  450  	print_dbg("phys=0x%08x, size=%zu", fbdev->regs_phys, fbdev->regs_len);
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  451  
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  452  	c = clk_get(NULL, "lcd_intclk");
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  453  	if (!IS_ERR(c)) {
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  454  		fbdev->lcdclk = c;
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  455  		clk_set_rate(c, 48000000);
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  456  		clk_prepare_enable(c);
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  457  	}
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  458  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  459  	/* Allocate the framebuffer to the maximum screen size * nbr of video buffers */
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  460  	fbdev->fb_len = fbdev->panel->xres * fbdev->panel->yres *
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  461  		  	(fbdev->panel->bpp >> 3) * AU1100FB_NBR_VIDEO_BUFFERS;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  462  
93019734555f8d drivers/video/au1100fb.c       Manuel Lauss       2012-03-24  463  	fbdev->fb_mem = dmam_alloc_coherent(&dev->dev,
1c16697bf9d5b2 drivers/video/au1100fb.c       Julia Lawall       2012-01-21  464  					    PAGE_ALIGN(fbdev->fb_len),
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  465  					    &fbdev->fb_phys, GFP_KERNEL);
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  466  	if (!fbdev->fb_mem) {
deee40d267c04a drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  467  		print_err("fail to allocate framebuffer (size: %zuK))",
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  468  			  fbdev->fb_len / 1024);
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  469  		return -ENOMEM;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  470  	}
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  471  
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  472  	fbdev->info.fix.smem_start = fbdev->fb_phys;
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  473  	fbdev->info.fix.smem_len = fbdev->fb_len;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  474  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  475  	print_dbg("Framebuffer memory map at %p", fbdev->fb_mem);
8a19e8c9c05d78 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  476  	print_dbg("phys=0x%pad, size=%zuK", &fbdev->fb_phys, fbdev->fb_len / 1024);
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  477  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  478  	/* load the panel info into the var struct */
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  479  	fbdev->info.var = (struct fb_var_screeninfo) {
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  480  		.activate = FB_ACTIVATE_NOW,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  481  		.height = -1,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  482  		.width = -1,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  483  		.vmode = FB_VMODE_NONINTERLACED,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  484  		.bits_per_pixel = fbdev->panel->bpp,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  485  		.xres = fbdev->panel->xres,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  486  		.xres_virtual = fbdev->panel->xres,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  487  		.yres = fbdev->panel->yres,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  488  		.yres_virtual = fbdev->panel->yres,
0938c7cf68c618 drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  489  	};
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  490  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  491  	fbdev->info.screen_base = fbdev->fb_mem;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  492  	fbdev->info.fbops = &au1100fb_ops;
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  493  
1c16697bf9d5b2 drivers/video/au1100fb.c       Julia Lawall       2012-01-21  494  	fbdev->info.pseudo_palette =
a86854d0c599b3 drivers/video/fbdev/au1100fb.c Kees Cook          2018-06-12  495  		devm_kcalloc(&dev->dev, 16, sizeof(u32), GFP_KERNEL);
1c16697bf9d5b2 drivers/video/au1100fb.c       Julia Lawall       2012-01-21  496  	if (!fbdev->info.pseudo_palette)
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  497  		return -ENOMEM;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  498  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04 @499  	if (fb_alloc_cmap(&fbdev->info.cmap, AU1100_LCD_NBR_PALETTE_ENTRIES, 0) < 0) {
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  500  		print_err("Fail to allocate colormap (%d entries)",
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  501  			   AU1100_LCD_NBR_PALETTE_ENTRIES);
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  502  		return -EFAULT;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  503  	}
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  504  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  505  	/* Set h/w registers */
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  506  	au1100fb_setmode(fbdev);
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  507  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  508  	/* Register new framebuffer */
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04 @509  	if (register_framebuffer(&fbdev->info) < 0) {
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  510  		print_err("cannot register new framebuffer");
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  511  		goto failed;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  512  	}
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  513  
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  514  	return 0;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  515  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  516  failed:
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  517  	if (fbdev->lcdclk) {
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  518  		clk_disable_unprepare(fbdev->lcdclk);
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  519  		clk_put(fbdev->lcdclk);
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  520  	}
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  521  	if (fbdev->info.cmap.len != 0) {
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04 @522  		fb_dealloc_cmap(&fbdev->info.cmap);
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  523  	}
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  524  
1c16697bf9d5b2 drivers/video/au1100fb.c       Julia Lawall       2012-01-21  525  	return -ENODEV;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  526  }
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  527  
65ead1cf1fc59b drivers/video/fbdev/au1100fb.c Uwe Kleine-König   2026-02-08  528  static void au1100fb_drv_remove(struct platform_device *dev)
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  529  {
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  530  	struct au1100fb_device *fbdev = NULL;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  531  
5a7bbe86b0b99b drivers/video/au1100fb.c       Jingoo Han         2013-09-09  532  	fbdev = platform_get_drvdata(dev);
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  533  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  534  #if !defined(CONFIG_FRAMEBUFFER_CONSOLE) && defined(CONFIG_LOGO)
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  535  	au1100fb_fb_blank(VESA_POWERDOWN, &fbdev->info);
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  536  #endif
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  537  	fbdev->regs->lcd_control &= ~LCD_CONTROL_GO;
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  538  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  539  	/* Clean up all probe data */
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04 @540  	unregister_framebuffer(&fbdev->info);
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  541  
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  542  	fb_dealloc_cmap(&fbdev->info.cmap);
3b495f2bb749b8 drivers/video/au1100fb.c       Pete Popov         2005-04-04  543  
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  544  	if (fbdev->lcdclk) {
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  545  		clk_disable_unprepare(fbdev->lcdclk);
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  546  		clk_put(fbdev->lcdclk);
6b1889c14b4606 drivers/video/fbdev/au1100fb.c Manuel Lauss       2014-07-23  547  	}
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  548  }
^1da177e4c3f41 drivers/video/au1100fb.c       Linus Torvalds     2005-04-16  549  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-02-09  9:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-08 17:57 [PATCH v3 0/6] fbdev: au1100fb: support COMPILE_TEST and fix multi-device support Uwe Kleine-König
2026-02-08 17:57 ` [PATCH v3 1/6] fbdev: au1100fb: Don't store device specific data in global variables Uwe Kleine-König
2026-02-08 17:57 ` [PATCH v3 2/6] fbdev: au1100fb: Mark several local functions as static Uwe Kleine-König
2026-02-08 17:58 ` [PATCH v3 3/6] fbdev: au1100fb: Use %zu to printk a value of type size_t Uwe Kleine-König
2026-02-08 19:21   ` Helge Deller
2026-02-08 19:24     ` Helge Deller
2026-02-09  7:33       ` Uwe Kleine-König
2026-02-08 17:58 ` [PATCH v3 4/6] fbdev: au1100fb: Use %pad to printk a value of type dma_addr_t Uwe Kleine-König
2026-02-08 17:58 ` [PATCH v3 5/6] fbdev: au1100fb: Make driver compilable on non-mips platforms Uwe Kleine-König
2026-02-09  6:30   ` kernel test robot
2026-02-09  7:27     ` Uwe Kleine-König
2026-02-09  9:16   ` kernel test robot
2026-02-08 17:58 ` [PATCH v3 6/6] fbdev: au1100fb: Replace custom printk wrappers by pr_* Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox