Skip to content

Commit

Permalink
fbdev: Garbage collect fbdev scrolling acceleration, part 1 (from TOD…
Browse files Browse the repository at this point in the history
…O list)

Scroll acceleration is disabled in fbcon by hard-wiring
p->scrollmode = SCROLL_REDRAW. Remove the obsolete code in fbcon.c
and fbdev/core/

Signed-off-by: Claudio Suarez <cssk@net-c.es>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/YVXTYqszZix9TxjJ@gineta.localdomain
  • Loading branch information
Claudio Suarez authored and Thomas Zimmermann committed Oct 13, 2021
1 parent cd06ab2 commit b3ec8cd
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 678 deletions.
13 changes: 8 additions & 5 deletions Documentation/gpu/todo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -314,16 +314,19 @@ Level: Advanced
Garbage collect fbdev scrolling acceleration
--------------------------------------------

Scroll acceleration is disabled in fbcon by hard-wiring p->scrollmode =
SCROLL_REDRAW. There's a ton of code this will allow us to remove:
Scroll acceleration has been disabled in fbcon. Now it works as the old
SCROLL_REDRAW mode. A ton of code was removed in fbcon.c and the hook bmove was
removed from fbcon_ops.
Remaining tasks:

- lots of code in fbcon.c

- a bunch of the hooks in fbcon_ops, maybe the remaining hooks could be called
- a bunch of the hooks in fbcon_ops could be removed or simplified by calling
directly instead of the function table (with a switch on p->rotate)

- fb_copyarea is unused after this, and can be deleted from all drivers

- after that, fb_copyarea can be deleted from fb_ops in include/linux/fb.h as
well as cfb_copyarea

Note that not all acceleration code can be deleted, since clearing and cursor
support is still accelerated, which might be good candidates for further
deletion projects.
Expand Down
16 changes: 0 additions & 16 deletions drivers/video/fbdev/core/bitblit.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,6 @@ static void update_attr(u8 *dst, u8 *src, int attribute,
}
}

static void bit_bmove(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int dy, int dx, int height, int width)
{
struct fb_copyarea area;

area.sx = sx * vc->vc_font.width;
area.sy = sy * vc->vc_font.height;
area.dx = dx * vc->vc_font.width;
area.dy = dy * vc->vc_font.height;
area.height = height * vc->vc_font.height;
area.width = width * vc->vc_font.width;

info->fbops->fb_copyarea(info, &area);
}

static void bit_clear(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int height, int width)
{
Expand Down Expand Up @@ -393,7 +378,6 @@ static int bit_update_start(struct fb_info *info)

void fbcon_set_bitops(struct fbcon_ops *ops)
{
ops->bmove = bit_bmove;
ops->clear = bit_clear;
ops->putcs = bit_putcs;
ops->clear_margins = bit_clear_margins;
Expand Down
Loading

0 comments on commit b3ec8cd

Please sign in to comment.