kernel_optimize_test/Documentation
Helge Deller 460f6b1a23 Revert "fbcon: Disable accelerated scrolling"
commit 87ab9f6b7417349aa197a6c7098d4fdd4beebb74 upstream.

This reverts commit 39aead8373b3c20bb5965c024dfb51a94e526151.

Revert the first (of 2) commits which disabled scrolling acceleration in
fbcon/fbdev.  It introduced a regression for fbdev-supported graphic cards
because of the performance penalty by doing screen scrolling by software
instead of using the existing graphic card 2D hardware acceleration.

Console scrolling acceleration was disabled by dropping code which
checked at runtime the driver hardware capabilities for the
BINFO_HWACCEL_COPYAREA or FBINFO_HWACCEL_FILLRECT flags and if set, it
enabled scrollmode SCROLL_MOVE which uses hardware acceleration to move
screen contents.  After dropping those checks scrollmode was hard-wired
to SCROLL_REDRAW instead, which forces all graphic cards to redraw every
character at the new screen position when scrolling.

This change effectively disabled all hardware-based scrolling acceleration for
ALL drivers, because now all kind of 2D hardware acceleration (bitblt,
fillrect) in the drivers isn't used any longer.

The original commit message mentions that only 3 DRM drivers (nouveau, omapdrm
and gma500) used hardware acceleration in the past and thus code for checking
and using scrolling acceleration is obsolete.

This statement is NOT TRUE, because beside the DRM drivers there are around 35
other fbdev drivers which depend on fbdev/fbcon and still provide hardware
acceleration for fbdev/fbcon.

The original commit message also states that syzbot found lots of bugs in fbcon
and thus it's "often the solution to just delete code and remove features".
This is true, and the bugs - which actually affected all users of fbcon,
including DRM - were fixed, or code was dropped like e.g. the support for
software scrollback in vgacon (commit 973c096f6a).

So to further analyze which bugs were found by syzbot, I've looked through all
patches in drivers/video which were tagged with syzbot or syzkaller back to
year 2005. The vast majority fixed the reported issues on a higher level, e.g.
when screen is to be resized, or when font size is to be changed. The few ones
which touched driver code fixed a real driver bug, e.g. by adding a check.

But NONE of those patches touched code of either the SCROLL_MOVE or the
SCROLL_REDRAW case.

That means, there was no real reason why SCROLL_MOVE had to be ripped-out and
just SCROLL_REDRAW had to be used instead. The only reason I can imagine so far
was that SCROLL_MOVE wasn't used by DRM and as such it was assumed that it
could go away. That argument completely missed the fact that SCROLL_MOVE is
still heavily used by fbdev (non-DRM) drivers.

Some people mention that using memcpy() instead of the hardware acceleration is
pretty much the same speed. But that's not true, at least not for older graphic
cards and machines where we see speed decreases by factor 10 and more and thus
this change leads to console responsiveness way worse than before.

That's why the original commit is to be reverted. By reverting we
reintroduce hardware-based scrolling acceleration and fix the
performance regression for fbdev drivers.

There isn't any impact on DRM when reverting those patches.

Signed-off-by: Helge Deller <deller@gmx.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Sven Schnelle <svens@stackframe.org>
Cc: stable@vger.kernel.org # v5.10+
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220202135531.92183-3-deller@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 18:30:40 +01:00
..
ABI counter: stm32-lptimer-cnt: remove iio counter abi 2022-01-27 10:54:08 +01:00
accounting psi: Fix uaf issue when psi trigger is destroyed while being polled 2022-02-05 12:37:55 +01:00
admin-guide Documentation: refer to config RANDOMIZE_BASE for kernel address-space randomization 2022-01-27 10:54:29 +01:00
arm ARM: 9012/1: move device tree mapping out of linear region 2021-05-19 10:13:18 +02:00
arm64 userfaultfd: do not untag user pointers 2021-07-28 14:35:46 +02:00
block block-5.10-2020-10-24 2020-10-24 12:46:42 -07:00
bpf
cdrom
core-api dma-mapping: document dma_{alloc,free}_pages 2020-10-23 12:07:46 +02:00
cpu-freq
crypto
dev-tools linux-kselftest-kunit-fixes-5.10-rc5 2020-11-18 11:57:55 -08:00
devicetree dt-bindings: can: tcan4x5x: fix mram-cfg RX FIFO config 2022-02-01 17:25:48 +01:00
doc-guide
driver-api Documentation: fix firewire.rst ABI file path error 2022-01-27 10:54:29 +01:00
fault-injection lkdtm: replace SCSI_DISPATCH_CMD with SCSI_QUEUE_RQ 2021-09-15 09:50:42 +02:00
fb drm fixes (round two) for 5.10-rc1 2020-10-23 13:56:34 -07:00
features s390 updates for the 5.10 merge window 2020-10-16 12:36:38 -07:00
filesystems fscrypt: allow 256-bit master keys with AES-256-XTS 2021-11-18 14:03:54 +01:00
firmware_class
firmware-guide Documentation: ACPI: Fix data node reference documentation 2022-01-27 10:54:29 +01:00
fpga
gpu Revert "fbcon: Disable accelerated scrolling" 2022-02-08 18:30:40 +01:00
hid
hwmon hwmon: (lm90) Add basic support for TI TMP461 2021-12-29 12:25:59 +01:00
i2c
ia64
ide
iio
infiniband
input
isdn
kbuild Documentation/Kbuild: Remove references to gcc-plugin.sh 2021-12-14 11:32:46 +01:00
kernel-hacking
leds docs: leds: index.rst: add a missing file 2020-11-02 13:45:37 +01:00
litmus-tests
livepatch
locking Documentation/locking/locktypes: Update migrate_disable() bits. 2021-12-14 11:32:42 +01:00
m68k
maintainer
mhi
mips
misc-devices Documentation: remove mic/index from misc-devices/index.rst 2020-11-04 11:38:32 +01:00
netlabel
networking bonding: fix ad_actor_system option setting to default 2021-12-29 12:25:57 +01:00
nios2
nvdimm
openrisc
parisc
PCI
pcmcia
power
powerpc powerpc/64s/syscall: Use pt_regs.trap to distinguish syscall ABI difference between sc and scv syscalls 2021-05-26 12:06:53 +02:00
process docs: networking: drop special stable handling 2021-03-17 17:06:13 +01:00
RCU
riscv
s390
scheduler
scsi scsi: libsas: Introduce a _gfp() variant of event notifiers 2021-03-25 09:04:11 +01:00
security watch_queue: Drop references to /dev/watch_queue 2021-03-04 11:37:59 +01:00
sh
sound ALSA: hda/realtek: Add new alc285-hp-amp-init model 2021-12-29 12:26:00 +01:00
sparc
sphinx tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
sphinx-static
spi
staging
target tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
timers
trace tracing/histogram: Rename "cpu" to "common_cpu" 2021-07-28 14:35:45 +02:00
translations net: switch to the kernel.org patchwork instance 2020-11-11 17:12:00 -08:00
usb
userspace-api media: hevc: Fix dependent slice segment flags 2021-07-14 16:55:51 +02:00
virt KVM: X86: MMU: Use the correct inherited permissions to get shadow page 2021-06-16 12:01:40 +02:00
vm mm/debug_vm_pgtable/basic: add validation for dirtiness after write protect 2021-07-14 16:56:13 +02:00
w1
watchdog
x86 x86/CPU/AMD: Save AMD NodeId as cpu_die_id 2020-12-30 11:54:29 +01:00
xtensa xtensa: fix TLBTEMP area placement 2020-11-16 02:13:15 -08:00
.gitignore
asm-annotations.rst x86/entry: Emit a symbol for register restoring thunk 2021-02-03 23:28:40 +01:00
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py This pull contains a series of warning fixes from Mauro; once applied, the 2020-11-03 13:14:14 -08:00
COPYING-logo
docutils.conf
dontdiff kbuild: generate Module.symvers only when vmlinux exists 2021-05-19 10:12:59 +02:00
index.rst
Kconfig docs: Kconfig/Makefile: add a check for broken ABI files 2020-10-30 13:08:07 +01:00
logo.gif
Makefile A small number of fixes, plus a build tweak to respect the desire for 2020-11-03 09:57:30 -08:00
memory-barriers.txt
SubmittingPatches
watch_queue.rst