Re: [PATCH 2/2] Revert "fbcon: Disable accelerated scrolling"

From: Helge Deller
Date: Mon Jan 24 2022 - 06:11:56 EST


On 1/21/22 08:20, Gerd Hoffmann wrote:
>>> So if this really has to come back then I think the pragmatic approach is
>>> to do it behind a CONFIG_FBCON_ACCEL, default n, and with a huge warning
>>> that enabling that shouldn't be done for any distro which only enables
>>> firmware and drm fbdev drivers.
>>
>> Thanks for coming back on this, but quite frankly I don't understand
>> that request. How should that warning look like, something along:
>> "BE WARNED: The framebuffer text console on your non-DRM supported
>> graphic card will then run faster and smoother if you enable this option."
>> That doesn't make sense. People and distros would want to enable that.
>
> Nope. Most distros want disable fbdev drivers rather sooner than later.
> The fbdev drivers enabled in the fedora kernel today:
>
> CONFIG_FB_VGA16=m
> CONFIG_FB_VESA=y
> CONFIG_FB_EFI=y
> CONFIG_FB_SSD1307=m
>
> CONFIG_FB_VESA + CONFIG_FB_EFI will go away soon, with simpledrm taking
> over their role.

That's Ok.
Nevertheless, some distros and platforms will still need fbdev drivers for
various reasons.


>> And if a distro *just* has firmware and drm fbdev drivers enabled,
>> none of the non-DRM graphic cards would be loaded anyway and this code
>> wouldn't be executed anyway.
>
> Yes, exactly. That's why there is no point in compiling that code.

As long as you have a graphic card which is not supported by DRM you still need it.

Here is my proposed way forward:
a) I will resend the patches which reverts the remove-fbcon-hardware-scolling patches
to the mailing lists. I'll adjust the stable tags and update the commit messages.
b) Then after some days I'll include it in the fbdev for-next git branch. That way it's
included in the various build & test chains.
c) If everything is working well, I'll push that change during the next merge window
for kernel 5.18. If problems arise we will need to discuss.

While the patches are in the fbdev git tree we should decide how to exclude code
which is not needed for DRM.

What about this proposal:
a) adding a Kconfig option like:
CONFIG_FB_DRIVERS - enable if you need the fbdev drivers. For DRM-only this should be disabled.
b) Add to every native fbdev driver a "depends on FB_DRIVERS" in the Kconfig files.
c) That way we can use "#if defined(CONFIG_FB_DRIVERS).." to exclude code in fbcon which
isn't needed by DRM.

Thoughts?

Helge