* [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops
@ 2023-08-06 11:58 Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 01/11] fbdev/sbus: Build sbuslib.o if CONFIG_FB_SBUS has been selected Thomas Zimmermann
` (11 more replies)
0 siblings, 12 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2023-08-06 11:58 UTC (permalink / raw)
To: deller, sam, javierm, davem
Cc: sparclinux, linux-fbdev, dri-devel, Thomas Zimmermann
Add initializer macros for struct fb_ops of drivers that operate
on SBUS-based framebuffers. Also add a Kconfig token to select the
correct dependencies.
All drivers for SBUS-based framebuffers use the regular helpers
for framebuffers in I/O memory (fb_io_*() and cfb_*()). Each driver
provides its own implementation of mmap and ioctls around common
helpers from sbuslib.o. Patches 1 to 3 clean up the code a bit and
add a initializer macros that set up struct fb_ops correctly.
Patches 4 to 11 convert the drivers. Each patch slightly renames
the driver's mmap and ioctl functions so that it matches the name
pattern of sbuslib.o.
Like the other fbdev initializer macros, the SBUS helpers are
easily grep-able. In a later patch, they can be left to empty values
if the rsp. functionality, such as file I/O or console, has been
disabled.
There are no functional changes. The helpers set the defaults that
the drivers already use. The fb_io_*() functions that the initializer
macro sets are the defaults if struct fb_ops.fb_read or .fb_write are
NULL. After all drivers have been updated to set them explicitly, the
defaults can be dropped and the functions can be made optional.
Build-tested on sparc64.
Thomas Zimmermann (11):
fbdev/sbus: Build sbuslib.o if CONFIG_FB_SBUS has been selected
fbdev/sbus: Forward declare all necessary structures in header
fbdev/sbus: Add initializer macros and Kconfig tokens for SBUS support
fbdev/bw2: Use initializer macro for struct fb_ops
fbdev/cg14: Use initializer macro for struct fb_ops
fbdev/cg3: Use initializer macro for struct fb_ops
fbdev/cg6: Use initializer macro for struct fb_ops
fbdev/ffb: Use initializer macro for struct fb_ops
fbdev/leo: Use initializer macro for struct fb_ops
fbdev/p9100: Use initializer macro for struct fb_ops
fbdev/tcx: Use initializer macro for struct fb_ops
drivers/video/fbdev/Kconfig | 30 ++++++++++++----------------
drivers/video/fbdev/Makefile | 17 ++++++++--------
drivers/video/fbdev/bw2.c | 17 +++++-----------
drivers/video/fbdev/cg14.c | 19 ++++++------------
drivers/video/fbdev/cg3.c | 17 +++++-----------
drivers/video/fbdev/cg6.c | 17 ++++++++--------
drivers/video/fbdev/ffb.c | 17 ++++++++--------
drivers/video/fbdev/leo.c | 19 ++++++------------
drivers/video/fbdev/p9100.c | 18 +++++------------
drivers/video/fbdev/sbuslib.h | 37 ++++++++++++++++++++++++++++++++++-
drivers/video/fbdev/tcx.c | 20 ++++++-------------
11 files changed, 106 insertions(+), 122 deletions(-)
--
2.41.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 01/11] fbdev/sbus: Build sbuslib.o if CONFIG_FB_SBUS has been selected
2023-08-06 11:58 [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops Thomas Zimmermann
@ 2023-08-06 11:58 ` Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 02/11] fbdev/sbus: Forward declare all necessary structures in header Thomas Zimmermann
` (10 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2023-08-06 11:58 UTC (permalink / raw)
To: deller, sam, javierm, davem
Cc: sparclinux, linux-fbdev, dri-devel, Thomas Zimmermann
Avoid duplicate listings of sbuslib.o in the Makefile by building
it if CONFIG_FB_SBUS has been selected. Remove the object file from
the various drivers' build rules.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/video/fbdev/Makefile | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile
index e6b0ae094b8b..b864ed308e74 100644
--- a/drivers/video/fbdev/Makefile
+++ b/drivers/video/fbdev/Makefile
@@ -8,6 +8,7 @@
obj-y += core/
obj-$(CONFIG_FB_MACMODES) += macmodes.o
+obj-$(CONFIG_FB_SBUS) += sbuslib.o
obj-$(CONFIG_FB_WMT_GE_ROPS) += wmt_ge_rops.o
# Hardware specific drivers go first
@@ -45,14 +46,14 @@ obj-$(CONFIG_FB_LE80578) += vermilion/
obj-$(CONFIG_FB_S3) += s3fb.o
obj-$(CONFIG_FB_ARK) += arkfb.o
obj-$(CONFIG_FB_STI) += stifb.o
-obj-$(CONFIG_FB_FFB) += ffb.o sbuslib.o
-obj-$(CONFIG_FB_CG6) += cg6.o sbuslib.o
-obj-$(CONFIG_FB_CG3) += cg3.o sbuslib.o
-obj-$(CONFIG_FB_BW2) += bw2.o sbuslib.o
-obj-$(CONFIG_FB_CG14) += cg14.o sbuslib.o
-obj-$(CONFIG_FB_P9100) += p9100.o sbuslib.o
-obj-$(CONFIG_FB_TCX) += tcx.o sbuslib.o
-obj-$(CONFIG_FB_LEO) += leo.o sbuslib.o
+obj-$(CONFIG_FB_FFB) += ffb.o
+obj-$(CONFIG_FB_CG6) += cg6.o
+obj-$(CONFIG_FB_CG3) += cg3.o
+obj-$(CONFIG_FB_BW2) += bw2.o
+obj-$(CONFIG_FB_CG14) += cg14.o
+obj-$(CONFIG_FB_P9100) += p9100.o
+obj-$(CONFIG_FB_TCX) += tcx.o
+obj-$(CONFIG_FB_LEO) += leo.o
obj-$(CONFIG_FB_ACORN) += acornfb.o
obj-$(CONFIG_FB_ATARI) += atafb.o c2p_iplan2.o atafb_mfb.o \
atafb_iplan2p2.o atafb_iplan2p4.o atafb_iplan2p8.o
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 02/11] fbdev/sbus: Forward declare all necessary structures in header
2023-08-06 11:58 [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 01/11] fbdev/sbus: Build sbuslib.o if CONFIG_FB_SBUS has been selected Thomas Zimmermann
@ 2023-08-06 11:58 ` Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 03/11] fbdev/sbus: Add initializer macros and Kconfig tokens for SBUS support Thomas Zimmermann
` (9 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2023-08-06 11:58 UTC (permalink / raw)
To: deller, sam, javierm, davem
Cc: sparclinux, linux-fbdev, dri-devel, Thomas Zimmermann
In sbuslib.h, declare all of the header file's structs at the
top. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/video/fbdev/sbuslib.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/sbuslib.h b/drivers/video/fbdev/sbuslib.h
index a6b9a2467646..02ac1282903b 100644
--- a/drivers/video/fbdev/sbuslib.h
+++ b/drivers/video/fbdev/sbuslib.h
@@ -3,6 +3,11 @@
#ifndef _SBUSLIB_H
#define _SBUSLIB_H
+struct device_node;
+struct fb_info;
+struct fb_var_screeninfo;
+struct vm_area_struct;
+
struct sbus_mmap_map {
unsigned long voff;
unsigned long poff;
@@ -14,7 +19,6 @@ struct sbus_mmap_map {
extern void sbusfb_fill_var(struct fb_var_screeninfo *var,
struct device_node *dp, int bpp);
-struct vm_area_struct;
extern int sbusfb_mmap_helper(struct sbus_mmap_map *map,
unsigned long physbase, unsigned long fbsize,
unsigned long iospace,
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 03/11] fbdev/sbus: Add initializer macros and Kconfig tokens for SBUS support
2023-08-06 11:58 [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 01/11] fbdev/sbus: Build sbuslib.o if CONFIG_FB_SBUS has been selected Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 02/11] fbdev/sbus: Forward declare all necessary structures in header Thomas Zimmermann
@ 2023-08-06 11:58 ` Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 04/11] fbdev/bw2: Use initializer macro for struct fb_ops Thomas Zimmermann
` (8 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2023-08-06 11:58 UTC (permalink / raw)
To: deller, sam, javierm, davem
Cc: sparclinux, linux-fbdev, dri-devel, Thomas Zimmermann
Add macros to initialize struct fb_ops for drivers that support
framebuffers on Sparc's SBUS. Also add a Kconfig token that selects
the necessary helpers.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/video/fbdev/Kconfig | 6 ++++++
drivers/video/fbdev/sbuslib.h | 31 +++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+)
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 5d93ecc01f6a..fd5bd284c0f8 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -518,6 +518,12 @@ config FB_SBUS
help
Say Y if you want support for SBUS or UPA based frame buffer device.
+config FB_SBUS_HELPERS
+ bool
+ select FB_CFB_COPYAREA
+ select FB_CFB_FILLRECT
+ select FB_CFB_IMAGEBLIT
+
config FB_BW2
bool "BWtwo support"
depends on (FB = y) && (SPARC && FB_SBUS)
diff --git a/drivers/video/fbdev/sbuslib.h b/drivers/video/fbdev/sbuslib.h
index 02ac1282903b..6466b4cbcd7b 100644
--- a/drivers/video/fbdev/sbuslib.h
+++ b/drivers/video/fbdev/sbuslib.h
@@ -29,4 +29,35 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg);
+/*
+ * Initialize struct fb_ops for SBUS I/O.
+ */
+
+#define __FB_DEFAULT_SBUS_OPS_RDWR(__prefix) \
+ .fb_read = fb_io_read, \
+ .fb_write = fb_io_write
+
+#define __FB_DEFAULT_SBUS_OPS_DRAW(__prefix) \
+ .fb_fillrect = cfb_fillrect, \
+ .fb_copyarea = cfb_copyarea, \
+ .fb_imageblit = cfb_imageblit
+
+#ifdef CONFIG_COMPAT
+#define __FB_DEFAULT_SBUS_OPS_IOCTL(__prefix) \
+ .fb_ioctl = __prefix ## _sbusfb_ioctl, \
+ .fb_compat_ioctl = sbusfb_compat_ioctl
+#else
+#define __FB_DEFAULT_SBUS_OPS_IOCTL(__prefix) \
+ .fb_ioctl = __prefix ## _sbusfb_ioctl
+#endif
+
+#define __FB_DEFAULT_SBUS_OPS_MMAP(__prefix) \
+ .fb_mmap = __prefix ## _sbusfb_mmap
+
+#define FB_DEFAULT_SBUS_OPS(__prefix) \
+ __FB_DEFAULT_SBUS_OPS_RDWR(__prefix), \
+ __FB_DEFAULT_SBUS_OPS_DRAW(__prefix), \
+ __FB_DEFAULT_SBUS_OPS_IOCTL(__prefix), \
+ __FB_DEFAULT_SBUS_OPS_MMAP(__prefix)
+
#endif /* _SBUSLIB_H */
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 04/11] fbdev/bw2: Use initializer macro for struct fb_ops
2023-08-06 11:58 [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops Thomas Zimmermann
` (2 preceding siblings ...)
2023-08-06 11:58 ` [PATCH 03/11] fbdev/sbus: Add initializer macros and Kconfig tokens for SBUS support Thomas Zimmermann
@ 2023-08-06 11:58 ` Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 05/11] fbdev/cg14: " Thomas Zimmermann
` (7 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2023-08-06 11:58 UTC (permalink / raw)
To: deller, sam, javierm, davem
Cc: sparclinux, linux-fbdev, dri-devel, Thomas Zimmermann
Initialize struct fb_ops to the correct default values with the
macro FB_DEFAULT_SBUS_OPS(). Rename the ioctl and mmap callbacks
to use the infix _sbusfb_. This makes them fit the SBUS helpers'
naming pattern. Also make the driver depend on FB_SBUS_HELPERS,
which selects the correct modules.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/video/fbdev/Kconfig | 4 +---
drivers/video/fbdev/bw2.c | 17 +++++------------
2 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index fd5bd284c0f8..7e4710defc32 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -527,9 +527,7 @@ config FB_SBUS_HELPERS
config FB_BW2
bool "BWtwo support"
depends on (FB = y) && (SPARC && FB_SBUS)
- select FB_CFB_FILLRECT
- select FB_CFB_COPYAREA
- select FB_CFB_IMAGEBLIT
+ select FB_SBUS_HELPERS
help
This is the frame buffer device driver for the BWtwo frame buffer.
diff --git a/drivers/video/fbdev/bw2.c b/drivers/video/fbdev/bw2.c
index de34f1f333e2..eaab51be74f8 100644
--- a/drivers/video/fbdev/bw2.c
+++ b/drivers/video/fbdev/bw2.c
@@ -31,8 +31,8 @@
static int bw2_blank(int, struct fb_info *);
-static int bw2_mmap(struct fb_info *, struct vm_area_struct *);
-static int bw2_ioctl(struct fb_info *, unsigned int, unsigned long);
+static int bw2_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
+static int bw2_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
/*
* Frame buffer operations
@@ -40,15 +40,8 @@ static int bw2_ioctl(struct fb_info *, unsigned int, unsigned long);
static const struct fb_ops bw2_ops = {
.owner = THIS_MODULE,
+ FB_DEFAULT_SBUS_OPS(bw2),
.fb_blank = bw2_blank,
- .fb_fillrect = cfb_fillrect,
- .fb_copyarea = cfb_copyarea,
- .fb_imageblit = cfb_imageblit,
- .fb_mmap = bw2_mmap,
- .fb_ioctl = bw2_ioctl,
-#ifdef CONFIG_COMPAT
- .fb_compat_ioctl = sbusfb_compat_ioctl,
-#endif
};
/* OBio addresses for the bwtwo registers */
@@ -161,7 +154,7 @@ static struct sbus_mmap_map bw2_mmap_map[] = {
{ .size = 0 }
};
-static int bw2_mmap(struct fb_info *info, struct vm_area_struct *vma)
+static int bw2_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
struct bw2_par *par = (struct bw2_par *)info->par;
@@ -171,7 +164,7 @@ static int bw2_mmap(struct fb_info *info, struct vm_area_struct *vma)
vma);
}
-static int bw2_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
+static int bw2_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
return sbusfb_ioctl_helper(cmd, arg, info,
FBTYPE_SUN2BW, 1, info->fix.smem_len);
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 05/11] fbdev/cg14: Use initializer macro for struct fb_ops
2023-08-06 11:58 [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops Thomas Zimmermann
` (3 preceding siblings ...)
2023-08-06 11:58 ` [PATCH 04/11] fbdev/bw2: Use initializer macro for struct fb_ops Thomas Zimmermann
@ 2023-08-06 11:58 ` Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 06/11] fbdev/cg3: " Thomas Zimmermann
` (6 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2023-08-06 11:58 UTC (permalink / raw)
To: deller, sam, javierm, davem
Cc: sparclinux, linux-fbdev, dri-devel, Thomas Zimmermann
Initialize struct fb_ops to the correct default values with the
macro FB_DEFAULT_SBUS_OPS(). Rename the ioctl and mmap callbacks
to use the infix _sbusfb_. This makes them fit the SBUS helpers'
naming pattern. Also make the driver depend on FB_SBUS_HELPERS,
which selects the correct modules.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/video/fbdev/Kconfig | 4 +---
drivers/video/fbdev/cg14.c | 19 ++++++-------------
2 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 7e4710defc32..02f163984679 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -571,9 +571,7 @@ config FB_TCX
config FB_CG14
bool "CGfourteen (SX) support"
depends on FB_SBUS
- select FB_CFB_FILLRECT
- select FB_CFB_COPYAREA
- select FB_CFB_IMAGEBLIT
+ select FB_SBUS_HELPERS
help
This is the frame buffer device driver for the CGfourteen frame
buffer on Desktop SPARCsystems with the SX graphics option.
diff --git a/drivers/video/fbdev/cg14.c b/drivers/video/fbdev/cg14.c
index c0336c051c24..c161b2af8933 100644
--- a/drivers/video/fbdev/cg14.c
+++ b/drivers/video/fbdev/cg14.c
@@ -31,27 +31,20 @@
static int cg14_setcolreg(unsigned, unsigned, unsigned, unsigned,
unsigned, struct fb_info *);
-
-static int cg14_mmap(struct fb_info *, struct vm_area_struct *);
-static int cg14_ioctl(struct fb_info *, unsigned int, unsigned long);
static int cg14_pan_display(struct fb_var_screeninfo *, struct fb_info *);
+static int cg14_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
+static int cg14_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
+
/*
* Frame buffer operations
*/
static const struct fb_ops cg14_ops = {
.owner = THIS_MODULE,
+ FB_DEFAULT_SBUS_OPS(cg14),
.fb_setcolreg = cg14_setcolreg,
.fb_pan_display = cg14_pan_display,
- .fb_fillrect = cfb_fillrect,
- .fb_copyarea = cfb_copyarea,
- .fb_imageblit = cfb_imageblit,
- .fb_mmap = cg14_mmap,
- .fb_ioctl = cg14_ioctl,
-#ifdef CONFIG_COMPAT
- .fb_compat_ioctl = sbusfb_compat_ioctl,
-#endif
};
#define CG14_MCR_INTENABLE_SHIFT 7
@@ -265,7 +258,7 @@ static int cg14_setcolreg(unsigned regno,
return 0;
}
-static int cg14_mmap(struct fb_info *info, struct vm_area_struct *vma)
+static int cg14_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
struct cg14_par *par = (struct cg14_par *) info->par;
@@ -274,7 +267,7 @@ static int cg14_mmap(struct fb_info *info, struct vm_area_struct *vma)
par->iospace, vma);
}
-static int cg14_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
+static int cg14_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
struct cg14_par *par = (struct cg14_par *) info->par;
struct cg14_regs __iomem *regs = par->regs;
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 06/11] fbdev/cg3: Use initializer macro for struct fb_ops
2023-08-06 11:58 [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops Thomas Zimmermann
` (4 preceding siblings ...)
2023-08-06 11:58 ` [PATCH 05/11] fbdev/cg14: " Thomas Zimmermann
@ 2023-08-06 11:58 ` Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 07/11] fbdev/cg6: " Thomas Zimmermann
` (5 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2023-08-06 11:58 UTC (permalink / raw)
To: deller, sam, javierm, davem
Cc: sparclinux, linux-fbdev, dri-devel, Thomas Zimmermann
Initialize struct fb_ops to the correct default values with the
macro FB_DEFAULT_SBUS_OPS(). Rename the ioctl and mmap callbacks
to use the infix _sbusfb_. This makes them fit the SBUS helpers'
naming pattern. Also make the driver depend on FB_SBUS_HELPERS,
which selects the correct modules.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/video/fbdev/Kconfig | 4 +---
drivers/video/fbdev/cg3.c | 17 +++++------------
2 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 02f163984679..dfc601db65a4 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -534,9 +534,7 @@ config FB_BW2
config FB_CG3
bool "CGthree support"
depends on (FB = y) && (SPARC && FB_SBUS)
- select FB_CFB_FILLRECT
- select FB_CFB_COPYAREA
- select FB_CFB_IMAGEBLIT
+ select FB_SBUS_HELPERS
help
This is the frame buffer device driver for the CGthree frame buffer.
diff --git a/drivers/video/fbdev/cg3.c b/drivers/video/fbdev/cg3.c
index 0a897d5be334..5e1f1b9a81b6 100644
--- a/drivers/video/fbdev/cg3.c
+++ b/drivers/video/fbdev/cg3.c
@@ -33,8 +33,8 @@ static int cg3_setcolreg(unsigned, unsigned, unsigned, unsigned,
unsigned, struct fb_info *);
static int cg3_blank(int, struct fb_info *);
-static int cg3_mmap(struct fb_info *, struct vm_area_struct *);
-static int cg3_ioctl(struct fb_info *, unsigned int, unsigned long);
+static int cg3_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
+static int cg3_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
/*
* Frame buffer operations
@@ -42,16 +42,9 @@ static int cg3_ioctl(struct fb_info *, unsigned int, unsigned long);
static const struct fb_ops cg3_ops = {
.owner = THIS_MODULE,
+ FB_DEFAULT_SBUS_OPS(cg3),
.fb_setcolreg = cg3_setcolreg,
.fb_blank = cg3_blank,
- .fb_fillrect = cfb_fillrect,
- .fb_copyarea = cfb_copyarea,
- .fb_imageblit = cfb_imageblit,
- .fb_mmap = cg3_mmap,
- .fb_ioctl = cg3_ioctl,
-#ifdef CONFIG_COMPAT
- .fb_compat_ioctl = sbusfb_compat_ioctl,
-#endif
};
@@ -225,7 +218,7 @@ static struct sbus_mmap_map cg3_mmap_map[] = {
{ .size = 0 }
};
-static int cg3_mmap(struct fb_info *info, struct vm_area_struct *vma)
+static int cg3_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
struct cg3_par *par = (struct cg3_par *)info->par;
@@ -235,7 +228,7 @@ static int cg3_mmap(struct fb_info *info, struct vm_area_struct *vma)
vma);
}
-static int cg3_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
+static int cg3_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
return sbusfb_ioctl_helper(cmd, arg, info,
FBTYPE_SUN3COLOR, 8, info->fix.smem_len);
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 07/11] fbdev/cg6: Use initializer macro for struct fb_ops
2023-08-06 11:58 [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops Thomas Zimmermann
` (5 preceding siblings ...)
2023-08-06 11:58 ` [PATCH 06/11] fbdev/cg3: " Thomas Zimmermann
@ 2023-08-06 11:58 ` Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 08/11] fbdev/ffb: " Thomas Zimmermann
` (4 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2023-08-06 11:58 UTC (permalink / raw)
To: deller, sam, javierm, davem
Cc: sparclinux, linux-fbdev, dri-devel, Thomas Zimmermann
Initialize struct fb_ops to the correct default values with the
internal __FB_DEFAULT_SBUS_OPS_*() macros. Rename the ioctl and
mmap callbacks to use the infix _sbusfb_. This makes them fit the
SBUS helpers' naming pattern.
It is not possible to use set all defaults via FB_DEAFULT_SBUS_OPS(),
as cg6 provides its own implementation of fb_fillrect, fb_copyarea,
and fb_imageblit. Hence we also avoid FB_SBUS_HELPERS, but let the
driver select its dependencies individually instead.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/video/fbdev/cg6.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/video/fbdev/cg6.c b/drivers/video/fbdev/cg6.c
index 8ef6ac9132f3..69d3ce50948d 100644
--- a/drivers/video/fbdev/cg6.c
+++ b/drivers/video/fbdev/cg6.c
@@ -37,16 +37,18 @@ static void cg6_imageblit(struct fb_info *, const struct fb_image *);
static void cg6_fillrect(struct fb_info *, const struct fb_fillrect *);
static void cg6_copyarea(struct fb_info *info, const struct fb_copyarea *area);
static int cg6_sync(struct fb_info *);
-static int cg6_mmap(struct fb_info *, struct vm_area_struct *);
-static int cg6_ioctl(struct fb_info *, unsigned int, unsigned long);
static int cg6_pan_display(struct fb_var_screeninfo *, struct fb_info *);
+static int cg6_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
+static int cg6_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
+
/*
* Frame buffer operations
*/
static const struct fb_ops cg6_ops = {
.owner = THIS_MODULE,
+ __FB_DEFAULT_SBUS_OPS_RDWR(cg6),
.fb_setcolreg = cg6_setcolreg,
.fb_blank = cg6_blank,
.fb_pan_display = cg6_pan_display,
@@ -54,11 +56,8 @@ static const struct fb_ops cg6_ops = {
.fb_copyarea = cg6_copyarea,
.fb_imageblit = cg6_imageblit,
.fb_sync = cg6_sync,
- .fb_mmap = cg6_mmap,
- .fb_ioctl = cg6_ioctl,
-#ifdef CONFIG_COMPAT
- .fb_compat_ioctl = sbusfb_compat_ioctl,
-#endif
+ __FB_DEFAULT_SBUS_OPS_IOCTL(cg6),
+ __FB_DEFAULT_SBUS_OPS_MMAP(cg6),
};
/* Offset of interesting structures in the OBIO space */
@@ -590,7 +589,7 @@ static struct sbus_mmap_map cg6_mmap_map[] = {
{ .size = 0 }
};
-static int cg6_mmap(struct fb_info *info, struct vm_area_struct *vma)
+static int cg6_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
struct cg6_par *par = (struct cg6_par *)info->par;
@@ -599,7 +598,7 @@ static int cg6_mmap(struct fb_info *info, struct vm_area_struct *vma)
par->which_io, vma);
}
-static int cg6_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
+static int cg6_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
return sbusfb_ioctl_helper(cmd, arg, info,
FBTYPE_SUNFAST_COLOR, 8, info->fix.smem_len);
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 08/11] fbdev/ffb: Use initializer macro for struct fb_ops
2023-08-06 11:58 [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops Thomas Zimmermann
` (6 preceding siblings ...)
2023-08-06 11:58 ` [PATCH 07/11] fbdev/cg6: " Thomas Zimmermann
@ 2023-08-06 11:58 ` Thomas Zimmermann
2023-08-06 11:59 ` [PATCH 09/11] fbdev/leo: " Thomas Zimmermann
` (3 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2023-08-06 11:58 UTC (permalink / raw)
To: deller, sam, javierm, davem
Cc: sparclinux, linux-fbdev, dri-devel, Thomas Zimmermann
Initialize struct fb_ops to the correct default values with the
internal __FB_DEFAULT_SBUS_OPS_*() macros. Rename the ioctl and
mmap callbacks to use the infix _sbusfb_. This makes them fit the
SBUS helpers' naming pattern.
It is not possible to use set all defaults via FB_DEAFULT_SBUS_OPS(),
as ffb provides its own implementation of fb_fillrect, fb_copyarea,
and fb_imageblit. Hence we also avoid FB_SBUS_HELPERS, but let the
driver select its dependencies individually instead.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/video/fbdev/ffb.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/video/fbdev/ffb.c b/drivers/video/fbdev/ffb.c
index e3a9bb7e9dea..2a0f5337e091 100644
--- a/drivers/video/fbdev/ffb.c
+++ b/drivers/video/fbdev/ffb.c
@@ -37,16 +37,18 @@ static void ffb_imageblit(struct fb_info *, const struct fb_image *);
static void ffb_fillrect(struct fb_info *, const struct fb_fillrect *);
static void ffb_copyarea(struct fb_info *, const struct fb_copyarea *);
static int ffb_sync(struct fb_info *);
-static int ffb_mmap(struct fb_info *, struct vm_area_struct *);
-static int ffb_ioctl(struct fb_info *, unsigned int, unsigned long);
static int ffb_pan_display(struct fb_var_screeninfo *, struct fb_info *);
+static int ffb_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
+static int ffb_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
+
/*
* Frame buffer operations
*/
static const struct fb_ops ffb_ops = {
.owner = THIS_MODULE,
+ __FB_DEFAULT_SBUS_OPS_RDWR(ffb),
.fb_setcolreg = ffb_setcolreg,
.fb_blank = ffb_blank,
.fb_pan_display = ffb_pan_display,
@@ -54,11 +56,8 @@ static const struct fb_ops ffb_ops = {
.fb_copyarea = ffb_copyarea,
.fb_imageblit = ffb_imageblit,
.fb_sync = ffb_sync,
- .fb_mmap = ffb_mmap,
- .fb_ioctl = ffb_ioctl,
-#ifdef CONFIG_COMPAT
- .fb_compat_ioctl = sbusfb_compat_ioctl,
-#endif
+ __FB_DEFAULT_SBUS_OPS_IOCTL(ffb),
+ __FB_DEFAULT_SBUS_OPS_MMAP(ffb),
};
/* Register layout and definitions */
@@ -850,7 +849,7 @@ static struct sbus_mmap_map ffb_mmap_map[] = {
{ .size = 0 }
};
-static int ffb_mmap(struct fb_info *info, struct vm_area_struct *vma)
+static int ffb_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
struct ffb_par *par = (struct ffb_par *)info->par;
@@ -859,7 +858,7 @@ static int ffb_mmap(struct fb_info *info, struct vm_area_struct *vma)
0, vma);
}
-static int ffb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
+static int ffb_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
struct ffb_par *par = (struct ffb_par *)info->par;
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 09/11] fbdev/leo: Use initializer macro for struct fb_ops
2023-08-06 11:58 [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops Thomas Zimmermann
` (7 preceding siblings ...)
2023-08-06 11:58 ` [PATCH 08/11] fbdev/ffb: " Thomas Zimmermann
@ 2023-08-06 11:59 ` Thomas Zimmermann
2023-08-06 11:59 ` [PATCH 10/11] fbdev/p9100: " Thomas Zimmermann
` (2 subsequent siblings)
11 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2023-08-06 11:59 UTC (permalink / raw)
To: deller, sam, javierm, davem
Cc: sparclinux, linux-fbdev, dri-devel, Thomas Zimmermann
Initialize struct fb_ops to the correct default values with the
macro FB_DEFAULT_SBUS_OPS(). Rename the ioctl and mmap callbacks
to use the infix _sbusfb_. This makes them fit the SBUS helpers'
naming pattern. Also make the driver depend on FB_SBUS_HELPERS,
which selects the correct modules.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/video/fbdev/Kconfig | 4 +---
drivers/video/fbdev/leo.c | 19 ++++++-------------
2 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index dfc601db65a4..3bade062ac3f 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -587,9 +587,7 @@ config FB_P9100
config FB_LEO
bool "Leo (ZX) support"
depends on FB_SBUS
- select FB_CFB_FILLRECT
- select FB_CFB_COPYAREA
- select FB_CFB_IMAGEBLIT
+ select FB_SBUS_HELPERS
help
This is the frame buffer device driver for the SBUS-based Sun ZX
(leo) frame buffer cards.
diff --git a/drivers/video/fbdev/leo.c b/drivers/video/fbdev/leo.c
index 2f725cd7633a..7cf525c76079 100644
--- a/drivers/video/fbdev/leo.c
+++ b/drivers/video/fbdev/leo.c
@@ -31,28 +31,21 @@
static int leo_setcolreg(unsigned, unsigned, unsigned, unsigned,
unsigned, struct fb_info *);
static int leo_blank(int, struct fb_info *);
-
-static int leo_mmap(struct fb_info *, struct vm_area_struct *);
-static int leo_ioctl(struct fb_info *, unsigned int, unsigned long);
static int leo_pan_display(struct fb_var_screeninfo *, struct fb_info *);
+static int leo_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
+static int leo_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
+
/*
* Frame buffer operations
*/
static const struct fb_ops leo_ops = {
.owner = THIS_MODULE,
+ FB_DEFAULT_SBUS_OPS(leo),
.fb_setcolreg = leo_setcolreg,
.fb_blank = leo_blank,
.fb_pan_display = leo_pan_display,
- .fb_fillrect = cfb_fillrect,
- .fb_copyarea = cfb_copyarea,
- .fb_imageblit = cfb_imageblit,
- .fb_mmap = leo_mmap,
- .fb_ioctl = leo_ioctl,
-#ifdef CONFIG_COMPAT
- .fb_compat_ioctl = sbusfb_compat_ioctl,
-#endif
};
#define LEO_OFF_LC_SS0_KRN 0x00200000UL
@@ -414,7 +407,7 @@ static struct sbus_mmap_map leo_mmap_map[] = {
{ .size = 0 }
};
-static int leo_mmap(struct fb_info *info, struct vm_area_struct *vma)
+static int leo_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
struct leo_par *par = (struct leo_par *)info->par;
@@ -423,7 +416,7 @@ static int leo_mmap(struct fb_info *info, struct vm_area_struct *vma)
par->which_io, vma);
}
-static int leo_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
+static int leo_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
return sbusfb_ioctl_helper(cmd, arg, info,
FBTYPE_SUNLEO, 32, info->fix.smem_len);
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 10/11] fbdev/p9100: Use initializer macro for struct fb_ops
2023-08-06 11:58 [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops Thomas Zimmermann
` (8 preceding siblings ...)
2023-08-06 11:59 ` [PATCH 09/11] fbdev/leo: " Thomas Zimmermann
@ 2023-08-06 11:59 ` Thomas Zimmermann
2023-08-06 11:59 ` [PATCH 11/11] fbdev/tcx: " Thomas Zimmermann
2023-08-07 17:11 ` [PATCH 00/11] fbdev/sbus: Initializers " Sam Ravnborg
11 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2023-08-06 11:59 UTC (permalink / raw)
To: deller, sam, javierm, davem
Cc: sparclinux, linux-fbdev, dri-devel, Thomas Zimmermann
Initialize struct fb_ops to the correct default values with the
macro FB_DEFAULT_SBUS_OPS(). Rename the ioctl and mmap callbacks
to use the infix _sbusfb_. This makes them fit the SBUS helpers'
naming pattern. Also make the driver depend on FB_SBUS_HELPERS,
which selects the correct modules.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/video/fbdev/Kconfig | 4 +---
drivers/video/fbdev/p9100.c | 18 +++++-------------
2 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 3bade062ac3f..ae2b0c07223f 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -577,9 +577,7 @@ config FB_CG14
config FB_P9100
bool "P9100 (Sparcbook 3 only) support"
depends on FB_SBUS
- select FB_CFB_FILLRECT
- select FB_CFB_COPYAREA
- select FB_CFB_IMAGEBLIT
+ select FB_SBUS_HELPERS
help
This is the frame buffer device driver for the P9100 card
supported on Sparcbook 3 machines.
diff --git a/drivers/video/fbdev/p9100.c b/drivers/video/fbdev/p9100.c
index ca06886d9578..e1356f8a866e 100644
--- a/drivers/video/fbdev/p9100.c
+++ b/drivers/video/fbdev/p9100.c
@@ -31,8 +31,8 @@ static int p9100_setcolreg(unsigned, unsigned, unsigned, unsigned,
unsigned, struct fb_info *);
static int p9100_blank(int, struct fb_info *);
-static int p9100_mmap(struct fb_info *, struct vm_area_struct *);
-static int p9100_ioctl(struct fb_info *, unsigned int, unsigned long);
+static int p9100_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
+static int p9100_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
/*
* Frame buffer operations
@@ -40,16 +40,9 @@ static int p9100_ioctl(struct fb_info *, unsigned int, unsigned long);
static const struct fb_ops p9100_ops = {
.owner = THIS_MODULE,
+ FB_DEFAULT_SBUS_OPS(p9100),
.fb_setcolreg = p9100_setcolreg,
.fb_blank = p9100_blank,
- .fb_fillrect = cfb_fillrect,
- .fb_copyarea = cfb_copyarea,
- .fb_imageblit = cfb_imageblit,
- .fb_mmap = p9100_mmap,
- .fb_ioctl = p9100_ioctl,
-#ifdef CONFIG_COMPAT
- .fb_compat_ioctl = sbusfb_compat_ioctl,
-#endif
};
/* P9100 control registers */
@@ -218,7 +211,7 @@ static struct sbus_mmap_map p9100_mmap_map[] = {
{ 0, 0, 0 }
};
-static int p9100_mmap(struct fb_info *info, struct vm_area_struct *vma)
+static int p9100_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
struct p9100_par *par = (struct p9100_par *)info->par;
@@ -227,8 +220,7 @@ static int p9100_mmap(struct fb_info *info, struct vm_area_struct *vma)
par->which_io, vma);
}
-static int p9100_ioctl(struct fb_info *info, unsigned int cmd,
- unsigned long arg)
+static int p9100_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
/* Make it look like a cg3. */
return sbusfb_ioctl_helper(cmd, arg, info,
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 11/11] fbdev/tcx: Use initializer macro for struct fb_ops
2023-08-06 11:58 [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops Thomas Zimmermann
` (9 preceding siblings ...)
2023-08-06 11:59 ` [PATCH 10/11] fbdev/p9100: " Thomas Zimmermann
@ 2023-08-06 11:59 ` Thomas Zimmermann
2023-08-07 17:11 ` [PATCH 00/11] fbdev/sbus: Initializers " Sam Ravnborg
11 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2023-08-06 11:59 UTC (permalink / raw)
To: deller, sam, javierm, davem
Cc: sparclinux, linux-fbdev, dri-devel, Thomas Zimmermann
Initialize struct fb_ops to the correct default values with the
macro FB_DEFAULT_SBUS_OPS(). Rename the ioctl and mmap callbacks
to use the infix _sbusfb_. This makes them fit the SBUS helpers'
naming pattern. Also make the driver depend on FB_SBUS_HELPERS,
which selects the correct modules.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/video/fbdev/Kconfig | 4 +---
drivers/video/fbdev/tcx.c | 20 ++++++--------------
2 files changed, 7 insertions(+), 17 deletions(-)
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index ae2b0c07223f..79b1e4e542e7 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -559,9 +559,7 @@ config FB_FFB
config FB_TCX
bool "TCX (SS4/SS5 only) support"
depends on FB_SBUS
- select FB_CFB_FILLRECT
- select FB_CFB_COPYAREA
- select FB_CFB_IMAGEBLIT
+ select FB_SBUS_HELPERS
help
This is the frame buffer device driver for the TCX 24/8bit frame
buffer.
diff --git a/drivers/video/fbdev/tcx.c b/drivers/video/fbdev/tcx.c
index 7fb8179a8f41..fe7b7bc77eda 100644
--- a/drivers/video/fbdev/tcx.c
+++ b/drivers/video/fbdev/tcx.c
@@ -32,28 +32,21 @@
static int tcx_setcolreg(unsigned, unsigned, unsigned, unsigned,
unsigned, struct fb_info *);
static int tcx_blank(int, struct fb_info *);
-
-static int tcx_mmap(struct fb_info *, struct vm_area_struct *);
-static int tcx_ioctl(struct fb_info *, unsigned int, unsigned long);
static int tcx_pan_display(struct fb_var_screeninfo *, struct fb_info *);
+static int tcx_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma);
+static int tcx_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg);
+
/*
* Frame buffer operations
*/
static const struct fb_ops tcx_ops = {
.owner = THIS_MODULE,
+ FB_DEFAULT_SBUS_OPS(tcx),
.fb_setcolreg = tcx_setcolreg,
.fb_blank = tcx_blank,
.fb_pan_display = tcx_pan_display,
- .fb_fillrect = cfb_fillrect,
- .fb_copyarea = cfb_copyarea,
- .fb_imageblit = cfb_imageblit,
- .fb_mmap = tcx_mmap,
- .fb_ioctl = tcx_ioctl,
-#ifdef CONFIG_COMPAT
- .fb_compat_ioctl = sbusfb_compat_ioctl,
-#endif
};
/* THC definitions */
@@ -299,7 +292,7 @@ static struct sbus_mmap_map __tcx_mmap_map[TCX_MMAP_ENTRIES] = {
{ .size = 0 }
};
-static int tcx_mmap(struct fb_info *info, struct vm_area_struct *vma)
+static int tcx_sbusfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
{
struct tcx_par *par = (struct tcx_par *)info->par;
@@ -308,8 +301,7 @@ static int tcx_mmap(struct fb_info *info, struct vm_area_struct *vma)
par->which_io, vma);
}
-static int tcx_ioctl(struct fb_info *info, unsigned int cmd,
- unsigned long arg)
+static int tcx_sbusfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
struct tcx_par *par = (struct tcx_par *) info->par;
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops
2023-08-06 11:58 [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops Thomas Zimmermann
` (10 preceding siblings ...)
2023-08-06 11:59 ` [PATCH 11/11] fbdev/tcx: " Thomas Zimmermann
@ 2023-08-07 17:11 ` Sam Ravnborg
2023-08-28 8:51 ` Thomas Zimmermann
11 siblings, 1 reply; 14+ messages in thread
From: Sam Ravnborg @ 2023-08-07 17:11 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: deller, javierm, davem, sparclinux, linux-fbdev, dri-devel
Hi Thomas,
On Sun, Aug 06, 2023 at 01:58:51PM +0200, Thomas Zimmermann wrote:
> Add initializer macros for struct fb_ops of drivers that operate
> on SBUS-based framebuffers. Also add a Kconfig token to select the
> correct dependencies.
>
> All drivers for SBUS-based framebuffers use the regular helpers
> for framebuffers in I/O memory (fb_io_*() and cfb_*()). Each driver
> provides its own implementation of mmap and ioctls around common
> helpers from sbuslib.o. Patches 1 to 3 clean up the code a bit and
> add a initializer macros that set up struct fb_ops correctly.
>
> Patches 4 to 11 convert the drivers. Each patch slightly renames
> the driver's mmap and ioctl functions so that it matches the name
> pattern of sbuslib.o.
>
> Like the other fbdev initializer macros, the SBUS helpers are
> easily grep-able. In a later patch, they can be left to empty values
> if the rsp. functionality, such as file I/O or console, has been
> disabled.
>
> There are no functional changes. The helpers set the defaults that
> the drivers already use. The fb_io_*() functions that the initializer
> macro sets are the defaults if struct fb_ops.fb_read or .fb_write are
> NULL. After all drivers have been updated to set them explicitly, the
> defaults can be dropped and the functions can be made optional.
I have looked thought it all and it looks good.
I throw it after my sparc32 build setup - also OK.
cg6 and ffb uses their own imageblit and friends, but this is nicely
handled in the patches.
I also like how you managed to handle the compat case.
All are:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Sam
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops
2023-08-07 17:11 ` [PATCH 00/11] fbdev/sbus: Initializers " Sam Ravnborg
@ 2023-08-28 8:51 ` Thomas Zimmermann
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2023-08-28 8:51 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-fbdev, deller, javierm, dri-devel, sparclinux, davem
[-- Attachment #1.1: Type: text/plain, Size: 469 bytes --]
Hi Sam
Am 07.08.23 um 19:11 schrieb Sam Ravnborg:
...
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
I completely missed your review. Thanks a lot. I've now pushed the
patches to drm-misc-next.
Best regards
Thomas
>
> Sam
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2023-08-28 8:52 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-06 11:58 [PATCH 00/11] fbdev/sbus: Initializers for struct fb_ops Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 01/11] fbdev/sbus: Build sbuslib.o if CONFIG_FB_SBUS has been selected Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 02/11] fbdev/sbus: Forward declare all necessary structures in header Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 03/11] fbdev/sbus: Add initializer macros and Kconfig tokens for SBUS support Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 04/11] fbdev/bw2: Use initializer macro for struct fb_ops Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 05/11] fbdev/cg14: " Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 06/11] fbdev/cg3: " Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 07/11] fbdev/cg6: " Thomas Zimmermann
2023-08-06 11:58 ` [PATCH 08/11] fbdev/ffb: " Thomas Zimmermann
2023-08-06 11:59 ` [PATCH 09/11] fbdev/leo: " Thomas Zimmermann
2023-08-06 11:59 ` [PATCH 10/11] fbdev/p9100: " Thomas Zimmermann
2023-08-06 11:59 ` [PATCH 11/11] fbdev/tcx: " Thomas Zimmermann
2023-08-07 17:11 ` [PATCH 00/11] fbdev/sbus: Initializers " Sam Ravnborg
2023-08-28 8:51 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).