Skip to content

Commit 51aad18

Browse files
committed
Merge tag 'fbdev-for-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev
Pull fbdev updates from Helge Deller: "This includes a major refactoring of the fbcon packed pixel drawing routines, contributed by Zsolt Kajtar. The original version duplicated more or less the same algorithms for both system and i/o memory. The new implementation is more robust, both implementations are now feature complete (e.g. pixel order reversing now supported by both), behaves the same way as it uses the identical code for both variants and adds support for foreign endian framebuffers. The other patches add some parameter checks, static attribute groups for sysfs entries and console fixes: - dummycon: only build module if there are users and fix rows/cols (Arnd Bergmann) - mdacon: rework dependency list (Arnd Bergmann) - lcdcfb, fsl-diu-fb, fbcon: Fix registering and removing of sysfs (Shixiong Ou) - sm501fb: Add some geometry checks (Danila Chernetsov) - omapfb: Remove unused code, add value checks (Leonid Arapov) - au1100fb: Clean up variable assignment (Markus Elfring) - pxafb: use devm_kmemdup*() (Raag Jadav)" * tag 'fbdev-for-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: fsl-diu-fb: add missing device_remove_file() fbcon: Use static attribute groups for sysfs entries fbdev: sm501fb: Add some geometry checks. fbdev: omapfb: Add 'plane' value check fbdev: omapfb: Remove writeback deadcode MAINTAINERS: Add contact info for fbdev packed pixel drawing fbdev: Refactoring the fbcon packed pixel drawing routines fbdev: wmt_ge_rops: Remove fb_draw.h includes fbdev: mach64_cursor: Remove fb_draw.h includes fbdev: Register sysfs groups through device_add_group fbdev: lcdcfb: Register sysfs groups through driver core mdacon: rework dependency list dummycon: fix default rows/cols dummycon: only build module if there are users fbdev: au1100fb: Move a variable assignment behind a null pointer check fbdev: pxafb: use devm_kmemdup*() fbcon: Use correct erase colour for clearing in fbcon fbdev: core: tileblit: Implement missing margin clearing for tileblit
2 parents eff5f16 + 86d16cd commit 51aad18

31 files changed

+1670
-2441
lines changed

MAINTAINERS

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9161,6 +9161,22 @@ S: Odd Fixes
91619161
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
91629162
F: drivers/video/fbdev/core/
91639163

9164+
FRAMEBUFFER DRAWING
9165+
M: Zsolt Kajtar <[email protected]>
9166+
S: Odd Fixes
9167+
F: drivers/video/fbdev/core/cfbcopyarea.c
9168+
F: drivers/video/fbdev/core/cfbfillrect.c
9169+
F: drivers/video/fbdev/core/cfbimgblt.c
9170+
F: drivers/video/fbdev/core/cfbmem.h
9171+
F: drivers/video/fbdev/core/fb_copyarea.h
9172+
F: drivers/video/fbdev/core/fb_draw.h
9173+
F: drivers/video/fbdev/core/fb_fillrect.h
9174+
F: drivers/video/fbdev/core/fb_imageblit.h
9175+
F: drivers/video/fbdev/core/syscopyarea.c
9176+
F: drivers/video/fbdev/core/sysfillrect.c
9177+
F: drivers/video/fbdev/core/sysimgblt.c
9178+
F: drivers/video/fbdev/core/sysmem.h
9179+
91649180
FRAMEBUFFER LAYER
91659181
M: Helge Deller <[email protected]>
91669182

drivers/video/console/Kconfig

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ config VGA_CONSOLE
2424
Say Y.
2525

2626
config MDA_CONSOLE
27-
depends on !M68K && !PARISC && ISA
27+
depends on VGA_CONSOLE && ISA
2828
tristate "MDA text console (dual-headed)"
2929
help
3030
Say Y here if you have an old MDA or monochrome Hercules graphics
@@ -47,12 +47,11 @@ config SGI_NEWPORT_CONSOLE
4747
card of your Indy. Most people say Y here.
4848

4949
config DUMMY_CONSOLE
50-
bool
51-
default y
50+
def_bool VT || VGA_CONSOLE || FRAMEBUFFER_CONSOLE
5251

5352
config DUMMY_CONSOLE_COLUMNS
5453
int "Initial number of console screen columns"
55-
depends on DUMMY_CONSOLE && !ARCH_FOOTBRIDGE
54+
depends on DUMMY_CONSOLE && !(ARCH_FOOTBRIDGE && VGA_CONSOLE)
5655
default 160 if PARISC
5756
default 80
5857
help
@@ -62,7 +61,7 @@ config DUMMY_CONSOLE_COLUMNS
6261

6362
config DUMMY_CONSOLE_ROWS
6463
int "Initial number of console screen rows"
65-
depends on DUMMY_CONSOLE && !ARCH_FOOTBRIDGE
64+
depends on DUMMY_CONSOLE && !(ARCH_FOOTBRIDGE && VGA_CONSOLE)
6665
default 64 if PARISC
6766
default 30 if ARM
6867
default 25

drivers/video/fbdev/aty/mach64_cursor.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <linux/fb.h>
77
#include <linux/init.h>
88
#include <linux/string.h>
9-
#include "../core/fb_draw.h"
109

1110
#include <asm/io.h>
1211

@@ -57,6 +56,12 @@
5756
* definitation and CUR_VERT_POSN must be saturated to zero.
5857
*/
5958

59+
/* compose pixels based on mask */
60+
static inline unsigned long comp(unsigned long set, unsigned long unset, unsigned long mask)
61+
{
62+
return ((set ^ unset) & mask) ^ unset;
63+
}
64+
6065
/*
6166
* Hardware Cursor support.
6267
*/

drivers/video/fbdev/au1100fb.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,15 @@ static int au1100fb_fb_blank(int blank_mode, struct fb_info *fbi)
137137
*/
138138
int au1100fb_setmode(struct au1100fb_device *fbdev)
139139
{
140-
struct fb_info *info = &fbdev->info;
140+
struct fb_info *info;
141141
u32 words;
142142
int index;
143143

144144
if (!fbdev)
145145
return -EINVAL;
146146

147+
info = &fbdev->info;
148+
147149
/* Update var-dependent FB info */
148150
if (panel_is_active(fbdev->panel) || panel_is_color(fbdev->panel)) {
149151
if (info->var.bits_per_pixel <= 8) {

drivers/video/fbdev/core/Kconfig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ config FB_CFB_REV_PIXELS_IN_BYTE
6969
bool
7070
depends on FB_CORE
7171
help
72-
Allow generic frame-buffer functions to work on displays with 1, 2
72+
Allow I/O memory frame-buffer functions to work on displays with 1, 2
7373
and 4 bits per pixel depths which has opposite order of pixels in
7474
byte order to bytes in long order.
7575

@@ -97,6 +97,14 @@ config FB_SYS_IMAGEBLIT
9797
blitting. This is used by drivers that don't provide their own
9898
(accelerated) version and the framebuffer is in system RAM.
9999

100+
config FB_SYS_REV_PIXELS_IN_BYTE
101+
bool
102+
depends on FB_CORE
103+
help
104+
Allow virtual memory frame-buffer functions to work on displays with 1, 2
105+
and 4 bits per pixel depths which has opposite order of pixels in
106+
byte order to bytes in long order.
107+
100108
config FB_PROVIDE_GET_FB_UNMAPPED_AREA
101109
bool
102110
depends on FB

drivers/video/fbdev/core/bitblit.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,11 @@ static void bit_bmove(struct vc_data *vc, struct fb_info *info, int sy,
5959
}
6060

6161
static void bit_clear(struct vc_data *vc, struct fb_info *info, int sy,
62-
int sx, int height, int width)
62+
int sx, int height, int width, int fg, int bg)
6363
{
64-
int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
6564
struct fb_fillrect region;
6665

67-
region.color = attr_bgcol_ec(bgshift, vc, info);
66+
region.color = bg;
6867
region.dx = sx * vc->vc_font.width;
6968
region.dy = sy * vc->vc_font.height;
7069
region.width = width * vc->vc_font.width;

0 commit comments

Comments
 (0)