path: root/Documentation/gpu
diff options
authorDaniel Vetter <>2020-10-29 14:22:29 +0100
committerDaniel Vetter <>2020-11-17 11:00:29 +0100
commit39aead8373b3c20bb5965c024dfb51a94e526151 (patch)
treed82fb5ce2e6a5ed098e526ae36f40eab8455eb5c /Documentation/gpu
parentba236455ee750270f33998df57f982433cea4d8e (diff)
fbcon: Disable accelerated scrolling
So ever since syzbot discovered fbcon, we have solid proof that it's full of bugs. And often the solution is to just delete code and remove features, e.g. 50145474f6ef ("fbcon: remove soft scrollback code"). Now the problem is that most modern-ish drivers really only treat fbcon as an dumb kernel console until userspace takes over, and Oops printer for some emergencies. Looking at drm drivers and the basic vesa/efi fbdev drivers shows that only 3 drivers support any kind of acceleration: - nouveau, seems to be enabled by default - omapdrm, when a DMM remapper exists using remapper rewriting for y/xpanning - gma500, but that is getting deleted now for the GTT remapper trick, and the accelerated copyarea never set the FBINFO_HWACCEL_COPYAREA flag, so unused (and could be deleted already I think). No other driver supportes accelerated fbcon. And fbcon is the only user of this accel code (it's not exposed as uapi through ioctls), which means we could garbage collect fairly enormous amounts of code if we kill this. Plus because syzbot only runs on virtual hardware, and none of the drivers for that have acceleration, we'd remove a huge gap in testing. And there's no other even remotely comprehensive testing aside from syzbot. This patch here just disables the acceleration code by always redrawing when scrolling. The plan is that once this has been merged for well over a year in released kernels, we can start to go around and delete a lot of code. v2: - Drop a few more unused local variables, somehow I missed the compiler warnings (Sam) - Fix typo in comment (Jiri) - add a todo entry for the cleanup (Thomas) v3: Remove more unused variables (0day) Reviewed-by: Tomi Valkeinen <> Reviewed-by: Thomas Zimmermann <> Reviewed-by: Greg Kroah-Hartman <> Acked-by: Sam Ravnborg <> Cc: Jiri Slaby <> Cc: Bartlomiej Zolnierkiewicz <> Cc: Greg Kroah-Hartman <> Cc: Linus Torvalds <> Cc: Ben Skeggs <> Cc: Cc: Tomi Valkeinen <> Cc: Daniel Vetter <> Cc: Jiri Slaby <> Cc: "Gustavo A. R. Silva" <> Cc: Tetsuo Handa <> Cc: Peilin Ye <> Cc: George Kennedy <> Cc: Nathan Chancellor <> Cc: Peter Rosin <> Signed-off-by: Daniel Vetter <> Link:
Diffstat (limited to 'Documentation/gpu')
1 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index acca232b025b..94fc76f0ecd4 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -292,6 +292,24 @@ Contact: Daniel Vetter, Noralf Tronnes
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:
+- lots of code in fbcon.c
+- a bunch of the hooks in fbcon_ops, maybe the remaining hooks could be called
+ 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
+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.
+Contact: Daniel Vetter
+Level: Intermediate