Re: [PATCH v2 6/9] drm/mgag200: Constify ioreadX() iomem argument (as in generic implementation)

2020-01-08 Thread Thomas Zimmermann
gt; so they can be converted to a "const" version for const-safety and > consistency among architectures. > > Signed-off-by: Krzysztof Kozlowski Reviewed-by: Thomas Zimmermann > --- > drivers/gpu/drm/mgag200/mgag200_drv.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 del

Re: [RESEND PATCH v2 6/9] drm/mgag200: Constify ioreadX() iomem argument (as in generic implementation)

2020-03-12 Thread Thomas Zimmermann
ead32(((const void __iomem *)mdev->rmmio) + (reg)) > #define WREG32(reg, v) iowrite32(v, ((void __iomem *)mdev->rmmio) + (reg)) > > #define ATTR_INDEX 0x1fc0 > -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 904

Re: [RESEND PATCH v2 6/9] drm/mgag200: Constify ioreadX() iomem argument (as in generic implementation)

2020-03-24 Thread Thomas Zimmermann
Hi Am 14.03.20 um 11:59 schrieb Krzysztof Kozlowski: > On Thu, Mar 12, 2020 at 11:49:05AM +0100, Thomas Zimmermann wrote: >> Hi Krzysztof, >> >> I just received a resend email from 3 weeks ago :/ >> >> Do you want me to merge the mgag200 patch into drm-misc

Re: [PATCH v2 02/19] arch/arc: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
Am 06.04.23 um 16:43 schrieb Arnd Bergmann: On Thu, Apr 6, 2023, at 16:30, Thomas Zimmermann wrote: + static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, unsigned long off) { vma->vm_page_prot = pgprot_noncached(

Re: [PATCH v2 01/19] fbdev: Prepare generic architecture helpers

2023-04-17 Thread Thomas Zimmermann
Hi Geert Am 11.04.23 um 10:08 schrieb Geert Uytterhoeven: Hi Thomas, On Thu, Apr 6, 2023 at 4:30 PM Thomas Zimmermann wrote: Generic implementations of fb_pgprotect() and fb_is_primary_device() have been in the source code for a long time. Prepare the header file to make use of them

[PATCH v3 10/19] video: Remove trailing whitespaces

2023-04-17 Thread Thomas Zimmermann
Fix trailing whitespaces. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/console/sticon.c | 4 +- drivers/video/console/sticore.c | 102 ++--- drivers/video/fbdev/sticore.h | 14 +-- drivers/video/fbdev/stifb.c | 156

[PATCH v3 11/19] video: Move HP PARISC STI core code to shared location

2023-04-17 Thread Thomas Zimmermann
. Cleans up the console makefile and prepares PARISC to implement fb_is_primary_device() within the arch/ directory. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/Kconfig| 7 +++ drivers/video/Makefile | 1 + drivers

[PATCH v3 18/19] arch/sparc: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
() Signed-off-by: Thomas Zimmermann Cc: "David S. Miller" --- arch/sparc/include/asm/fb.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/sparc/include/asm/fb.h b/arch/sparc/include/asm/fb.h index 28609f7a965c..689ee5c60054 100644 --- a/arch/spa

[PATCH v3 00/19] arch: Consolidate

2023-04-17 Thread Thomas Zimmermann
* rework fb_pgprotect() on m68k Thomas Zimmermann (19): fbdev: Prepare generic architecture helpers arch/arc: Implement with generic helpers arch/arm: Implement with generic helpers arch/arm64: Implement with generic helpers arch/ia64: Implement with generic helpers arch/loongarch:

[PATCH v3 01/19] fbdev: Prepare generic architecture helpers

2023-04-17 Thread Thomas Zimmermann
from . v3: * include the correct header files v2: * use writecombine mappings by default (Arnd) Signed-off-by: Thomas Zimmermann Acked-by: Arnd Bergmann --- include/asm-generic/fb.h | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git

[PATCH v3 02/19] arch/arc: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
Replace the architecture's fbdev helpers with the generic ones from . On arc, pgprot_writecombine() and pgprot_noncached() are the same; hence no functional changes. v3: * use default implementation for fb_pgprotect() (Arnd) Signed-off-by: Thomas Zimmermann Cc: Vineet Gupta --- arch

[PATCH v3 07/19] arch/m68k: Merge variants of fb_pgprotect() into single function

2023-04-17 Thread Thomas Zimmermann
Merge all variants of fb_pgprotect() into a single function body. There are two different cases for MMU systems. For non-MMU systems, the function body will be empty. No functional changes, but this will help with the switch to . Signed-off-by: Thomas Zimmermann Reviewed-by: Geert Uytterhoeven

[PATCH v3 06/19] arch/loongarch: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
Replace the architecture's fbdev helpers with the generic ones from . No functional changes. v2: * use default implementation for fb_pgprotect() (Arnd) Signed-off-by: Thomas Zimmermann Cc: Huacai Chen Cc: WANG Xuerui --- arch/loongarch/include/asm/fb.h | 15 +-- 1 file

Re: [PATCH v3 16/19] arch/sh: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
Hi Am 17.04.23 um 15:02 schrieb John Paul Adrian Glaubitz: Hi Thomas! On Mon, 2023-04-17 at 14:56 +0200, Thomas Zimmermann wrote: Replace the architecture's fbdev helpers with the generic ones from . No functional changes. v2: * use default implementation for fb_pgprotect() (Arnd

[PATCH v3 15/19] arch/powerpc: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Acked-by: Michael Ellerman --- arch/powerpc/include/asm/fb.h | 8 +++- 1 file changed, 3

[PATCH v3 09/19] arch/mips: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Thomas Bogendoerfer --- arch/mips/include/asm/fb.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/mips/include/asm/fb.h

Re: [PATCH v3 16/19] arch/sh: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
Am 17.04.23 um 16:06 schrieb Thomas Zimmermann: Hi Am 17.04.23 um 15:02 schrieb John Paul Adrian Glaubitz: Hi Thomas! On Mon, 2023-04-17 at 14:56 +0200, Thomas Zimmermann wrote: Replace the architecture's fbdev helpers with the generic ones from . No functional changes. v2: * use

[PATCH v3 08/19] arch/m68k: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. v2: * provide empty fb_pgprotect() on non-MMU systems Signed-off-by: Thomas Zimmermann Cc: Geert Uytterhoeven Acked-by: Geert Uytterhoeven --- arch/m68k/include/asm/fb.h | 10

[PATCH v3 04/19] arch/arm64: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
Replace the architecture's fbdev helpers with the generic ones from . No functional changes. v2: * use default implementation for fb_pgprotect() (Arnd) Signed-off-by: Thomas Zimmermann Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/fb.h | 15 +-- 1 file

[PATCH v3 05/19] arch/ia64: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann --- arch/ia64/include/asm/fb.h | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/ia64/include/asm/fb.h b/arch/ia64/include/asm

[PATCH v3 16/19] arch/sh: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
Replace the architecture's fbdev helpers with the generic ones from . No functional changes. v2: * use default implementation for fb_pgprotect() (Arnd) Signed-off-by: Thomas Zimmermann Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz --- arch/sh/include/asm/fb.h | 15

[PATCH v3 17/19] arch/sparc: Implement fb_is_primary_device() in source file

2023-04-17 Thread Thomas Zimmermann
Other architectures implment fb_is_primary_device() in a source file. Do the same on sparc. No functional changes, but allows to remove several include statement from . v2: * don't include in header file Signed-off-by: Thomas Zimmermann Cc: "David S. Miller" --- arch/spar

[PATCH v3 14/19] arch/parisc: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
Replace the architecture's fbdev helpers with the generic ones from . On PARISC, pgprot_writecombine() and pgprot_noncached() are the same; hence no functional changes. v3: * use default implementation for fb_pgprotect() (Arnd) Signed-off-by: Thomas Zimmermann Cc: "James E.J. Bott

[PATCH v3 12/19] arch/parisc: Remove trailing whitespaces

2023-04-17 Thread Thomas Zimmermann
Fix trailing whitespaces. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "James E.J. Bottomley" Cc: Helge Deller --- arch/parisc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index a2

[PATCH v3 13/19] arch/parisc: Implement fb_is_primary_device() under arch/parisc

2023-04-17 Thread Thomas Zimmermann
Move PARISC's implementation of fb_is_primary_device() into the architecture directory. This the place of the declaration and where other architectures implement this function. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "James E.J. Bottomley" Cc: Helge Deller --- a

[PATCH v3 19/19] arch/x86: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
Include and set the required preprocessor tokens correctly. x86 now implements its own set of fb helpers, but still follows the overall pattern of the other files. v3: * clarified commit message Signed-off-by: Thomas Zimmermann Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov

Re: [PATCH v3 16/19] arch/sh: Implement with generic helpers

2023-04-17 Thread Thomas Zimmermann
Hi Am 17.04.23 um 16:13 schrieb John Paul Adrian Glaubitz: Hi Thomas! On Mon, 2023-04-17 at 16:06 +0200, Thomas Zimmermann wrote: Hi Am 17.04.23 um 15:02 schrieb John Paul Adrian Glaubitz: Hi Thomas! On Mon, 2023-04-17 at 14:56 +0200, Thomas Zimmermann wrote: Replace the architecture's

Re: [PATCH 0/5] fbdev: Move framebuffer I/O helpers to

2023-04-27 Thread Thomas Zimmermann
Hi Sam Am 26.04.23 um 21:21 schrieb Sam Ravnborg: Hi Thomas. On Wed, Apr 26, 2023 at 03:04:15PM +0200, Thomas Zimmermann wrote: Fbdev provides helpers for framebuffer I/O, such as fb_readl(), fb_writel() or fb_memcpy_to_fb(). The implementation of each helper depends on the architecture. It's

[PATCH 3/5] fbdev: Include in various drivers

2023-04-26 Thread Thomas Zimmermann
The code uses writel() and similar I/O-memory helpers. Include the header file to get the declarations. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/arcfb.c | 1 + drivers/video/fbdev/aty/atyfb.h | 2 ++ drivers/video/fbdev/wmt_ge_rops.c | 2 ++ 3 files changed, 5 insertions

[PATCH 5/5] fbdev: Move framebuffer I/O helpers into

2023-04-26 Thread Thomas Zimmermann
, loongarch and m68k operate on system memory. As framebuffer memory is declared with volatile __iomem, the helpers add a __force cast to avoid warnings. Sparc uses SBus to connect framebuffer devices. It provides respective implementations of the framebuffer I/O helpers. Signed-off-by: Thomas

[PATCH 4/5] fbdev: Include via

2023-04-26 Thread Thomas Zimmermann
into . Prepare this change by first adding an include statement for to . Include in all source files that use the framebuffer I/O helpers, so that they still get the necessary I/O functions. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/arkfb.c | 2 ++ drivers/video/fbdev/aty

[PATCH 1/5] fbdev/matrox: Remove trailing whitespaces

2023-04-26 Thread Thomas Zimmermann
Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/matrox/matroxfb_accel.c | 6 +++--- drivers/video/fbdev/matrox/matroxfb_base.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/matrox/matroxfb_accel.c

[PATCH 2/5] ipu-v3: Include

2023-04-26 Thread Thomas Zimmermann
The code uses readl() and writel(). Include the header file to get the declarations. Signed-off-by: Thomas Zimmermann --- drivers/gpu/ipu-v3/ipu-prv.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/ipu-v3/ipu-prv.h b/drivers/gpu/ipu-v3/ipu-prv.h index 291ac1bab66d..d4621b1ea7f1

[PATCH 0/5] fbdev: Move framebuffer I/O helpers to

2023-04-26 Thread Thomas Zimmermann
, such as x86-64, arm, aarch64, ppc64, parisc, m64k, mips and sparc. Thomas Zimmermann (5): fbdev/matrox: Remove trailing whitespaces ipu-v3: Include fbdev: Include in various drivers fbdev: Include via fbdev: Move framebuffer I/O helpers into arch/arc/include/asm/fb.h | 29

Re: [PATCH v3 00/19] arch: Consolidate

2023-04-18 Thread Thomas Zimmermann
Hi Am 17.04.23 um 16:12 schrieb Arnd Bergmann: On Mon, Apr 17, 2023, at 14:56, Thomas Zimmermann wrote: Various architectures provide with helpers for fbdev framebuffer devices. Share the contained code where possible. There is already , which implements generic (as in 'empty') functions

Re: [PATCH v2 5/5] fbdev: Define framebuffer I/O from Linux' I/O functions

2023-04-29 Thread Thomas Zimmermann
Hi Sam Am 28.04.23 um 18:54 schrieb Sam Ravnborg: Hi Thomas, On Fri, Apr 28, 2023 at 04:18:38PM +0200, Thomas Zimmermann wrote: I'd be happy to have fb_() wrappers that are I/O helpers without ordering guarantees. I'd just wouldn't want them in How about throwing them into a new drm_fb.h

Re: [PATCH v2 5/5] fbdev: Define framebuffer I/O from Linux' I/O functions

2023-04-29 Thread Thomas Zimmermann
Hi Am 28.04.23 um 15:17 schrieb Arnd Bergmann: On Fri, Apr 28, 2023, at 13:27, Geert Uytterhoeven wrote: On Fri, Apr 28, 2023 at 2:18 PM Robin Murphy wrote: On 2023-04-28 10:27, Thomas Zimmermann wrote: - -#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__

[PATCH v2 5/5] fbdev: Define framebuffer I/O from Linux' I/O functions

2023-04-28 Thread Thomas Zimmermann
, we can use those instead. We leave a TODO item to replace all fb_() functions with their regular I/O counterparts throughout the fbdev drivers. Signed-off-by: Thomas Zimmermann --- include/linux/fb.h | 63 +++--- 1 file changed, 15 insertions(+), 48

[PATCH v2 4/5] fbdev: Include in drivers

2023-04-28 Thread Thomas Zimmermann
helpers. Prepare this change by adding an include statement for to all source files that use the framebuffer I/O helpers. They will still get declarations of the I/O functions even after has been cleaned up. Driver source files that already include convert to . Signed-off-by: Thomas Zimmermann

[PATCH v2 0/5] fbdev: Use regular I/O function for framebuffers

2023-04-28 Thread Thomas Zimmermann
and remove the fbdev-specific defines. The patchset has been built for a variety of platforms, such as x86-64, arm, aarch64, ppc64, parisc, m64k, mips and sparc. v2: * use Linux I/O helpers (Sam, Arnd) Thomas Zimmermann (5): fbdev/matrox: Remove trailing whitespaces ipu-v3: Include

[PATCH v2 1/5] fbdev/matrox: Remove trailing whitespaces

2023-04-28 Thread Thomas Zimmermann
Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/matrox/matroxfb_accel.c | 6 +++--- drivers/video/fbdev/matrox/matroxfb_base.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/matrox/matroxfb_accel.c

[PATCH v2 3/5] fbdev: Include in various drivers

2023-04-28 Thread Thomas Zimmermann
The code uses writel() and similar I/O-memory helpers. Include the header file to get the declarations. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/arcfb.c | 1 + drivers/video/fbdev/aty/atyfb.h | 2 ++ drivers/video/fbdev/wmt_ge_rops.c | 2 ++ 3 files changed, 5 insertions

[PATCH v2 2/5] ipu-v3: Include

2023-04-28 Thread Thomas Zimmermann
The code uses readl() and writel(). Include the header file to get the declarations. Signed-off-by: Thomas Zimmermann --- drivers/gpu/ipu-v3/ipu-prv.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/ipu-v3/ipu-prv.h b/drivers/gpu/ipu-v3/ipu-prv.h index 291ac1bab66d..d4621b1ea7f1

[PATCH v3 4/6] fbdev: Include via

2023-05-02 Thread Thomas Zimmermann
into . Prepare this change by first adding an include statement for to . Include in all source files that use the framebuffer I/O helpers, so that they still get the necessary I/O functions. v3: * fix grammar in commit message Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/arkfb.c

[PATCH v3 6/6] fbdev: Rename fb_mem*() helpers

2023-05-02 Thread Thomas Zimmermann
Update the names of the fb_mem*() helpers to be consistent with their regular counterparts. Hence, fb_memset() now becomes fb_memset_io(), fb_memcpy_fromfb() now becomes fb_memcpy_fromio() and fb_memcpy_tofb() becomes fb_memcpy_toio(). No functional changes. Signed-off-by: Thomas Zimmermann

[PATCH v3 0/6] fbdev: Move framebuffer I/O helpers to

2023-05-02 Thread Thomas Zimmermann
built for a variety of platforms, such as x86-64, arm, aarch64, ppc64, parisc, m64k, mips and sparc. v3: * add the new helpers in * support reordering and native byte order (Geert, Arnd) v2: * use Linux I/O helpers (Sam, Arnd) Thomas Zimmermann (6): fbdev/matrox: Remove

[PATCH v3 1/6] fbdev/matrox: Remove trailing whitespaces

2023-05-02 Thread Thomas Zimmermann
Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg --- drivers/video/fbdev/matrox/matroxfb_accel.c | 6 +++--- drivers/video/fbdev/matrox/matroxfb_base.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/video

[PATCH v3 5/6] fbdev: Move framebuffer I/O helpers into

2023-05-02 Thread Thomas Zimmermann
* support reordering and native byte order (Geert, Arnd) Signed-off-by: Thomas Zimmermann --- include/asm-generic/fb.h | 101 +++ include/linux/fb.h | 53 2 files changed, 101 insertions(+), 53 deletions(-) diff --git a/include/asm-generic

[PATCH v3 3/6] fbdev: Include in various drivers

2023-05-02 Thread Thomas Zimmermann
The code uses writel() and similar I/O-memory helpers. Include the header file to get the declarations. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg --- drivers/video/fbdev/arcfb.c | 1 + drivers/video/fbdev/aty/atyfb.h | 2 ++ drivers/video/fbdev/wmt_ge_rops.c | 2 ++ 3

[PATCH v3 2/6] ipu-v3: Include

2023-05-02 Thread Thomas Zimmermann
The code uses readl() and writel(). Include the header file to get the declarations. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg --- drivers/gpu/ipu-v3/ipu-prv.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/ipu-v3/ipu-prv.h b/drivers/gpu/ipu-v3/ipu-prv.h index

Re: [PATCH 01/18] fbdev: Prepare generic architecture helpers

2023-04-06 Thread Thomas Zimmermann
Hi Am 05.04.23 um 17:53 schrieb Arnd Bergmann: On Wed, Apr 5, 2023, at 17:05, Thomas Zimmermann wrote: Generic implementations of fb_pgprotect() and fb_is_primary_device() have been in the source code for a long time. Prepare the header file to make use of them. Improve the code by using

[PATCH v2 10/19] video: Remove trailing whitespaces

2023-04-06 Thread Thomas Zimmermann
Fix trailing whitespaces. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/console/sticon.c | 4 +- drivers/video/console/sticore.c | 102 ++--- drivers/video/fbdev/sticore.h | 14 +-- drivers/video/fbdev/stifb.c | 156

[PATCH v2 15/19] arch/powerpc: Implement with generic helpers

2023-04-06 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy --- arch/powerpc/include/asm/fb.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions

[PATCH v2 18/19] arch/sparc: Implement with generic helpers

2023-04-06 Thread Thomas Zimmermann
Include for correctness. Sparc does provide it's own implementation of the contained functions. v2: * restore the original fb_pgprotect() Signed-off-by: Thomas Zimmermann Cc: "David S. Miller" --- arch/sparc/include/asm/fb.h | 7 +-- 1 file changed, 5 insertions(+), 2

[PATCH v2 17/19] arch/sparc: Implement fb_is_primary_device() in source file

2023-04-06 Thread Thomas Zimmermann
Other architectures implment fb_is_primary_device() in a source file. Do the same on sparc. No functional changes, but allows to remove several include statement from . v2: * don't include in header file Signed-off-by: Thomas Zimmermann Cc: "David S. Miller" --- arch/spar

[PATCH v2 16/19] arch/sh: Implement with generic helpers

2023-04-06 Thread Thomas Zimmermann
Replace the architecture's fbdev helpers with the generic ones from . No functional changes. v2: * use default implementation for fb_pgprotect() (Arnd) Signed-off-by: Thomas Zimmermann Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz --- arch/sh/include/asm/fb.h | 15

[PATCH v2 19/19] arch/x86: Implement with generic helpers

2023-04-06 Thread Thomas Zimmermann
Include and set the required preprocessor tokens correctly. x86 now implements its own set of fb helpers, but still follows the overall pattern. Signed-off-by: Thomas Zimmermann Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" ---

[PATCH v2 01/19] fbdev: Prepare generic architecture helpers

2023-04-06 Thread Thomas Zimmermann
from . v2: * use writecombine mappings by default (Arnd) Signed-off-by: Thomas Zimmermann --- include/asm-generic/fb.h | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/fb.h b/include/asm-generic/fb.h index f9f18101ed36

[PATCH v2 00/19] arch: Consolidate

2023-04-06 Thread Thomas Zimmermann
avoid some include statements in the header file. Built on arm, arm64, m68k, mips, parisc, powerpc, sparc and x86. v2: * make writecombine the default mapping mode (Arnd) * rework fb_pgprotect() on m68k Thomas Zimmermann (19): fbdev: Prepare generic architecture helpers arch/arc:

[PATCH v2 02/19] arch/arc: Implement with generic helpers

2023-04-06 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Vineet Gupta --- arch/arc/include/asm/fb.h | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arc/include/asm/fb.h b/arch

[PATCH v2 12/19] arch/parisc: Remove trailing whitespaces

2023-04-06 Thread Thomas Zimmermann
Fix trailing whitespaces. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "James E.J. Bottomley" Cc: Helge Deller --- arch/parisc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index a2

[PATCH v2 13/19] arch/parisc: Implement fb_is_primary_device() under arch/parisc

2023-04-06 Thread Thomas Zimmermann
Move PARISC's implementation of fb_is_primary_device() into the architecture directory. This the place of the declaration and where other architectures implement this function. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "James E.J. Bottomley" Cc: Helge Deller --- a

[PATCH v2 05/19] arch/ia64: Implement with generic helpers

2023-04-06 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann --- arch/ia64/include/asm/fb.h | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/ia64/include/asm/fb.h b/arch/ia64/include/asm

[PATCH v2 06/19] arch/loongarch: Implement with generic helpers

2023-04-06 Thread Thomas Zimmermann
Replace the architecture's fbdev helpers with the generic ones from . No functional changes. v2: * use default implementation for fb_pgprotect() (Arnd) Signed-off-by: Thomas Zimmermann Cc: Huacai Chen Cc: WANG Xuerui --- arch/loongarch/include/asm/fb.h | 15 +-- 1 file

[PATCH v2 09/19] arch/mips: Implement with generic helpers

2023-04-06 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Thomas Bogendoerfer --- arch/mips/include/asm/fb.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/mips/include/asm/fb.h

[PATCH v2 11/19] video: Move HP PARISC STI core code to shared location

2023-04-06 Thread Thomas Zimmermann
. Cleans up the console makefile and prepares PARISC to implement fb_is_primary_device() within the arch/ directory. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/Kconfig| 7 +++ drivers/video/Makefile | 1 + drivers

[PATCH v2 08/19] arch/m68k: Implement with generic helpers

2023-04-06 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. v2: * provide empty fb_pgprotect() on non-MMU systems Signed-off-by: Thomas Zimmermann Cc: Geert Uytterhoeven --- arch/m68k/include/asm/fb.h | 10 -- 1 file changed, 4

[PATCH v2 04/19] arch/arm64: Implement with generic helpers

2023-04-06 Thread Thomas Zimmermann
Replace the architecture's fbdev helpers with the generic ones from . No functional changes. v2: * use default implementation for fb_pgprotect() (Arnd) Signed-off-by: Thomas Zimmermann Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/fb.h | 15 +-- 1 file

[PATCH v2 07/19] arch/m68k: Merge variants of fb_pgprotect() into single function

2023-04-06 Thread Thomas Zimmermann
Merge all variants of fb_pgprotect() into a single function body. There are two different cases for MMU systems. For non-MMU systems, the function body will be empty. No functional changes, but this will help with the switch to . Signed-off-by: Thomas Zimmermann --- arch/m68k/include/asm/fb.h

[PATCH v2 03/19] arch/arm: Implement with generic helpers

2023-04-06 Thread Thomas Zimmermann
Replace the architecture's fbdev helpers with the generic ones from . No functional changes. v2: * use default implementation for fb_pgprotect() (Arnd) Signed-off-by: Thomas Zimmermann Cc: Russell King --- arch/arm/include/asm/fb.h | 15 +-- 1 file changed, 1 insertion

[PATCH 04/18] arch/arm64: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/fb.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/arm64

[PATCH 05/18] arch/ia64: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann --- arch/ia64/include/asm/fb.h | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/ia64/include/asm/fb.h b/arch/ia64/include/asm

[PATCH 14/18] arch/powerpc: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy --- arch/powerpc/include/asm/fb.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions

[PATCH 09/18] video: Remove trailing whitespaces

2023-04-05 Thread Thomas Zimmermann
Fix trailing whitespaces. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/console/sticon.c | 4 +- drivers/video/console/sticore.c | 102 ++--- drivers/video/fbdev/sticore.h | 14 +-- drivers/video/fbdev/stifb.c | 156

[PATCH 15/18] arch/sh: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz --- arch/sh/include/asm/fb.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions

[PATCH 08/18] arch/mips: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Thomas Bogendoerfer --- arch/mips/include/asm/fb.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/mips/include/asm/fb.h

[PATCH 00/18] arch: Consolidate

2023-04-05 Thread Thomas Zimmermann
avoid some include statements in the header file. Built on arm, arm64, m68k, mips, parisc, powerpc, sparc and x86. Thomas Zimmermann (18): fbdev: Prepare generic architecture helpers arch/arc: Implement with generic helpers arch/arm: Implement with generic helpers arch/arm64: Implement wi

[PATCH 10/18] video: Move HP PARISC STI core code to shared location

2023-04-05 Thread Thomas Zimmermann
. Cleans up the console makefile and prepares PARISC to implement fb_is_primary_device() within the arch/ directory. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/Kconfig| 7 +++ drivers/video/Makefile | 1 + drivers

[PATCH 16/18] arch/sparc: Implement fb_is_primary_device() in source file

2023-04-05 Thread Thomas Zimmermann
Other architectures implment fb_is_primary_device() in a source file. Do the same on sparc. No functional changes, but allows to remove several include statement from . Signed-off-by: Thomas Zimmermann Cc: "David S. Miller" --- arch/sparc/Makefile | 1 + arch/sparc/includ

[PATCH 12/18] arch/parisc: Implement fb_is_primary_device() under arch/parisc

2023-04-05 Thread Thomas Zimmermann
Move PARISC's implementation of fb_is_primary_device() into the architecture directory. This the place of the declaration and where other architectures implement this function. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "James E.J. Bottomley" Cc: Helge Deller --- a

[PATCH 07/18] arch/m68k: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Also use the generic helper for fb_pgprotect() on systems without MMU. Signed-off-by: Thomas Zimmermann Cc: Geert Uytterhoeven --- arch/m68k/include/asm/fb.h | 10 +++--- 1 file changed, 3

[PATCH 13/18] arch/parisc: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from on systems without CONFIG_STI_CORE. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "James E.J. Bottomley" Cc: Helge Deller --- arch/parisc/include/asm/fb.h | 15 --- 1 file

[PATCH 17/18] arch/sparc: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_pgprotect() with the generic one from on 32-bit builds. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "David S. Miller" --- arch/sparc/include/asm/fb.h | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/spa

[PATCH 11/18] arch/parisc: Remove trailing whitespaces

2023-04-05 Thread Thomas Zimmermann
Fix trailing whitespaces. No functional changes. Signed-off-by: Thomas Zimmermann Cc: "James E.J. Bottomley" Cc: Helge Deller --- arch/parisc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index a2

[PATCH 18/18] arch/x86: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Include and set the required preprocessor tokens correctly. x86 now implements its own set of fb helpers, but still follows the overall pattern. Signed-off-by: Thomas Zimmermann Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" ---

Re: [PATCH 01/18] fbdev: Prepare generic architecture helpers

2023-04-05 Thread Thomas Zimmermann
Hi Am 05.04.23 um 17:53 schrieb Arnd Bergmann: On Wed, Apr 5, 2023, at 17:05, Thomas Zimmermann wrote: Generic implementations of fb_pgprotect() and fb_is_primary_device() have been in the source code for a long time. Prepare the header file to make use of them. Improve the code by using

[PATCH 06/18] arch/loongarch: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Huacai Chen Cc: WANG Xuerui --- arch/loongarch/include/asm/fb.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch

[PATCH 01/18] fbdev: Prepare generic architecture helpers

2023-04-05 Thread Thomas Zimmermann
by preprocessor guards. Architectures that provide a symbol need to define a preprocessor token of the same name and value. Otherwise the header file will provide a generic implementation. This pattern has been taken from . Signed-off-by: Thomas Zimmermann --- include/asm-generic/fb.h | 20

[PATCH 03/18] arch/arm: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Russell King --- arch/arm/include/asm/fb.h | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/arm/include/asm/fb.h b/arch

[PATCH 02/18] arch/arc: Implement with generic helpers

2023-04-05 Thread Thomas Zimmermann
Replace the architecture's fb_is_primary_device() with the generic one from . No functional changes. Signed-off-by: Thomas Zimmermann Cc: Vineet Gupta --- arch/arc/include/asm/fb.h | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arc/include/asm/fb.h b/arch

Re: [PATCH v2 4/5] fbdev: Include in drivers

2023-04-28 Thread Thomas Zimmermann
Hi Sam Am 28.04.23 um 15:07 schrieb Sam Ravnborg: On Fri, Apr 28, 2023 at 11:27:10AM +0200, Thomas Zimmermann wrote: Fbdev's main header file, , includes to get declarations of I/O helper functions. From these declaratons, it later defines framebuffer I/O helpers, such as fb_{read,write}[bwlq

Re: [PATCH v2 5/5] fbdev: Define framebuffer I/O from Linux' I/O functions

2023-04-28 Thread Thomas Zimmermann
Hi Robin, Geert Am 28.04.23 um 14:27 schrieb Geert Uytterhoeven: On Fri, Apr 28, 2023 at 2:18 PM Robin Murphy wrote: On 2023-04-28 10:27, Thomas Zimmermann wrote: Implement framebuffer I/O helpers, such as fb_read*() and fb_write*() with Linux' regular I/O functions. Remove all ifdef cases

Re: [PATCH v2 5/5] fbdev: Define framebuffer I/O from Linux' I/O functions

2023-04-28 Thread Thomas Zimmermann
Hi Am 28.04.23 um 15:12 schrieb Sam Ravnborg: Hi Thomas, On Fri, Apr 28, 2023 at 11:27:11AM +0200, Thomas Zimmermann wrote: Implement framebuffer I/O helpers, such as fb_read*() and fb_write*() with Linux' regular I/O functions. Remove all ifdef cases for the various architectures. Most

Re: [PATCH v2 5/5] fbdev: Define framebuffer I/O from Linux' I/O functions

2023-04-28 Thread Thomas Zimmermann
, Geert -- 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) OpenPGP_signature Description: OpenPGP digital signature

[PATCH v4 3/6] fbdev: Include in various drivers

2023-05-04 Thread Thomas Zimmermann
The code uses writel() and similar I/O-memory helpers. Include the header file to get the declarations. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg --- drivers/video/fbdev/arcfb.c | 1 + drivers/video/fbdev/aty/atyfb.h | 2 ++ drivers/video/fbdev/wmt_ge_rops.c | 2 ++ 3

[PATCH v4 6/6] fbdev: Rename fb_mem*() helpers

2023-05-04 Thread Thomas Zimmermann
Update the names of the fb_mem*() helpers to be consistent with their regular counterparts. Hence, fb_memset() now becomes fb_memset_io(), fb_memcpy_fromfb() now becomes fb_memcpy_fromio() and fb_memcpy_tofb() becomes fb_memcpy_toio(). No functional changes. Signed-off-by: Thomas Zimmermann

[PATCH v4 2/6] ipu-v3: Include

2023-05-04 Thread Thomas Zimmermann
The code uses readl() and writel(). Include the header file to get the declarations. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg --- drivers/gpu/ipu-v3/ipu-prv.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/ipu-v3/ipu-prv.h b/drivers/gpu/ipu-v3/ipu-prv.h index

[PATCH v4 4/6] fbdev: Include instead of

2023-05-04 Thread Thomas Zimmermann
Replace include statements for with . Fixes the coding style: if a header is available in asm/ and linux/, it is preferable to include the header from linux/. This only affects a few source files, most of which already include . Suggested-by: Sam Ravnborg Signed-off-by: Thomas Zimmermann

[PATCH v4 5/6] fbdev: Move framebuffer I/O helpers into

2023-05-04 Thread Thomas Zimmermann
to keep current semantics (Arnd) v3: * implement all architectures with generic helpers * support reordering and native byte order (Geert, Arnd) Signed-off-by: Thomas Zimmermann --- arch/ia64/include/asm/fb.h | 20 +++ arch/loongarch/include/asm/fb.h | 21

[PATCH v4 1/6] fbdev/matrox: Remove trailing whitespaces

2023-05-04 Thread Thomas Zimmermann
Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg --- drivers/video/fbdev/matrox/matroxfb_accel.c | 6 +++--- drivers/video/fbdev/matrox/matroxfb_base.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/video

  1   2   >