[PATCH 2/2] Revert "fbcon: Disable accelerated scrolling"
Helge Deller
deller at gmx.de
Wed Jan 19 15:18:35 UTC 2022
On 1/19/22 15:34, Daniel Vetter wrote:
> On Wed, Jan 19, 2022 at 3:01 PM Linus Torvalds
> <torvalds at linux-foundation.org> wrote:
>>
>> On Wed, Jan 19, 2022 at 2:29 PM Helge Deller <deller at gmx.de> wrote:
>>>
>>>>>
>>>>> Ah, no, that was just the soft scrollback code I was thinking of, which
>>>
>>> Right.
>>> That was commit 973c096f6a85 and it was about vgacon, not fbcon.
>>
>> No, fbcon had some bug too, although I've paged out the details. See
>> commit 50145474f6ef ("fbcon: remove soft scrollback code").
>
> tbh I've paged it all out too.
>
>> If I remember correctly (and it's entirely possible that I don't), the
>> whole "softback_lines" logic had serious problems with resizing the
>> console (or maybe changing the font size).
>
> Yeah that pile of reverts was my motiviation to look into this and see
> what else we could rip out most likely and still have an fbcon that
> works as well as it does right now for almost all users (which is not
> so great, but oh well).
>
>> There may have been some other bad interaction with
>> foreground/background consoles too, I forget.
>
> Irrespective of this code being buggy or not buggy I think the bigger
> pictures, and really the reason I want to see as much code ditched
> from the fbdev/fbcon stack as we possible can, are very clear:
>
> - it's full of bugs
I'm sure that there are bugs. Not just in fbcon/fbdev.
Other than that, if there are bugs I'm sure they are independend
of the question if you use hardware acceleration or not.
> - there's no test coverage/CI to speak of
> - it's very arcane code which is damn hard to understand and fix issues within
> - the locking is busted (largely thanks to console_lock, and the
> effort to make that reasonable from -rt folks has been slowly creeping
> forward for years).
>
> Iow this subsystem is firmly stuck in the 90s, and I think it's best
> to just leave it there. There's also not been anyone actually capable
> and willing to put in the work to change this (pretty much all actual
> changes/fixes have been done by drm folks anyway, like me having a
> small pet project to make the fbdev vs fbcon locking slightly less
> busted).
Yes, drm folks fixed a lot of bugs in the generic fbcon code.
I think everyone is thankful for this.
> The other side is that being a maintainer is about collaboration, and
> this entire fbdev maintainership takeover has been a demonstration of
> anything but that. MAINTAINERS entry was a bit confusing since defacto
> drm has been maintaining it for years, but for the above reasons we've
> done that by just aggressively deleting stuff that isn't absolutely
> needed - hence why I figured "orphaned" is a reasonable description of
> the state of things. This entire affair of rushing in a maintainer
> change over the w/e and then being greeted by a lot of wtf mails next
> Monday does leave a rather sour aftertaste. Plus that thread shows a
> lot of misunderstandings of what's all been going on and what drm can
> and cannot do by Helge, which doesn't improve the entire "we need
> fbdev back" argument.
I'm happy to *really* maintain fbdev code & drivers.
Up to now only those parts which were still needed by drm (like fbcon)
were fixed & "maintained" by drm folks.
Nearly all other patches sent to the fbdev list were ignored and even new
submissions for fbdev drivers were denied.
Now in next step really important infrastructure for fbdev-drivers was
ripped out of fbcon, like suddenly denying fbdev-drivers to use hardware
acceleration.
According to the docs the next step would have been to drop even more
code from the fbdev drivers.
This is not what "maintain" really is about.
> But if the overall consensus is that that fbdev needs to be brought
> back to it's full 90s glory then I think we need a copy of that code
> for drm drivers (should work out if we intercept fb_open() and put our
> own file_ops in there, maybe some more fun with fbcon), so that at
> least for anything modern using drm driver we can keep on maintaining
> that compat support code.
It's not about to keep something alive or to stop future developments.
It's about fairness and not actively breaking other parts of the kernel
for no good reason.
> And with maintaining here I don't mean build a museum around it, but
> actually try to keep/move the thing towards a state where we can still
> tell distros that enabling it is an ok thing to do and not just a CVE
> subscription (well it is that too right now, but at least we can fix a
> lot of them by just deleting code).
>
> I think until that mess is sorted out resurrecting code that's not
> strictly needed is just not a bright idea.
That's wrong.
It's strictly needed by more than 35 fbdev drivers and as such
you introduced a regression for those.
> Also wrt the issue at hand of "fbcon scrolling": The way to actually
> do that with some speed is to render into a fully cached shadow buffer
> and upload changed areas with a timer. Not with hw accelerated
> scrolling, at least not if we just don't have full scale development
> teams for each driver because creating 2d accel that doesn't suck is
> really hard. drm fbdev compat helpers give you that shadow buffer for
> free (well you got to set some options).
>
> Unfortunately just ditching fbdev/fbcon compat is not an option for
> many distros still, althought things are very slowly moving towards
> that. Until we've arrived there I can't just pretend to not care about
> what's going on in drivers/video.
I'm happy to take care about it.
That's why I stepped up as maintainer.
Helge
More information about the dri-devel
mailing list