[PATCH RESEND 00/13] fbdev: core: Deduplicate cfb/sys drawing fbops
Thomas Zimmermann
tzimmermann at suse.de
Fri Feb 7 08:12:19 UTC 2025
Hi
Am 07.02.25 um 05:18 schrieb Zsolt Kajtar:
> In 68648ed1f58d98b8e8d994022e5e25331fbfe42a the drawing routines were
> duplicated to have separate I/O and system memory versions.
>
> Later the pixel reversing in 779121e9f17525769c04a00475fd85600c8c04eb
> was only added to the I/O version and not to system.
>
> That's unfortunate as reversing is not something only applicable for
> I/O memory and I happen to need both I/O and system version now.
>
> One option is to bring the system version up to date, but from the
> maintenance perspective it's better to not have two versions in the
> first place.
No it's not. Major code abstractions behind preprocessor tokens are
terrible to maintain. It's also technically not possible to switch
between system and I/O memory at will. These are very different things.
If you want that pixel-reversing feature in sys_ helpers, please
implement it there.
Sorry, but NAK on this series.
Best regards
Thomas
>
> The drawing routines (based on the cfb version) were moved to header
> files. These are now included in both cfb and sys modules. The memory
> access and other minor differences were handled with a few macros.
>
> The last patch adds a separate config option for the system version.
>
> Zsolt Kajtar (13):
> fbdev: core: Copy cfbcopyarea to fb_copyarea
> fbdev: core: Make fb_copyarea generic
> fbdev: core: Use generic copyarea for as cfb_copyarea
> fbdev: core: Use generic copyarea for as sys_copyarea
> fbdev: core: Copy cfbfillrect to fb_fillrect
> fbdev: core: Make fb_fillrect generic
> fbdev: core: Use generic fillrect for as cfb_fillrect
> fbdev: core: Use generic fillrect for as sys_fillrect
> fbdev: core: Copy cfbimgblt to fb_imageblit
> fbdev: core: Make fb_imageblit generic
> fbdev: core: Use generic imageblit for as cfb_imageblit
> fbdev: core: Use generic imageblit for as sys_imageblit
> fbdev: core: Split CFB and SYS pixel reversing configuration
>
> drivers/video/fbdev/core/Kconfig | 10 +-
> drivers/video/fbdev/core/cfbcopyarea.c | 427 +-----------------------
> drivers/video/fbdev/core/cfbfillrect.c | 363 +-------------------
> drivers/video/fbdev/core/cfbimgblt.c | 358 +-------------------
> drivers/video/fbdev/core/fb_copyarea.h | 421 +++++++++++++++++++++++
> drivers/video/fbdev/core/fb_draw.h | 6 +-
> drivers/video/fbdev/core/fb_fillrect.h | 359 ++++++++++++++++++++
> drivers/video/fbdev/core/fb_imageblit.h | 356 ++++++++++++++++++++
> drivers/video/fbdev/core/syscopyarea.c | 358 +-------------------
> drivers/video/fbdev/core/sysfillrect.c | 315 +----------------
> drivers/video/fbdev/core/sysimgblt.c | 326 +-----------------
> 11 files changed, 1208 insertions(+), 2091 deletions(-)
> create mode 100644 drivers/video/fbdev/core/fb_copyarea.h
> create mode 100644 drivers/video/fbdev/core/fb_fillrect.h
> create mode 100644 drivers/video/fbdev/core/fb_imageblit.h
>
--
--
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)
More information about the dri-devel
mailing list