While USB-C and DisplayPort have taken over most external displays these days, plenty of all-in-one USB docks still use DisplayLink. Not every device supports DP ALT mode, and some devices (like several of Apple's M chips) don't support more than one external display over DisplayPort, making it a necessity to fall back to alternatives like DisplayLink.
Uh I think I think that's way too mean to the email. From a random web form they got some technical information, a useful CC, and offer to have a call. Not bad at all!
Also, my basic theory about hardware problems is that the problem is less that they won't share the docs, and more that even the internal docs suck. When you essentially co-evolve devices and software through many revisions of each over many years, it's easy to get a complete mess that nobody understands.
(Of course, in this specific case, DisplayLink was new, so it's maybe less of a problem.)
Looking at the answer, I wouldn't call it unhelpful. They were planning to release a source for the library that would essentially implement all the needed data interfaces? That's more than helpful and at least they responded.
I tried contacting Nuvoton for example about their documentation for some of their super I/O chips which lack Linux support (they do document a bunch of their chips pretty well, but for some weird reason not all).
Not only I got no details, I literally didn't even get a response from them at all. So above case is hugely better.
While adding pause / resume functionality certainly solves the problem, it does seem like not the best possible solution. Firstly, it's a rather far-reaching change. Prior to this work TTY updates always succeeded, but now the kernel has to be aware that they can fail just in case userspace is talking to a DisplayLink (which the article acknowledges are increasingly rare)? We have a new type of wait queue (or wait type) for "waiting on TTY operation"?
Secondly, the parallel with serial (heh) links isn't great because with a serial link you have no idea what the other side is doing with the data, so you can't make any assumptions. But for a TTY you know its dimensions and furthermore you're the one doing the terminal emulation, so a) there's a bound (and quite a small one) on the amount of data you need to buffer and b) you know exactly how the data is going to be presented because you're the one doing the presentation. So there is an opportunity here to be more efficient than just forcing userspace to halt. A good analogy would be an X terminal emulator which faithfully draws every line of text, even if it's scrolling past hundreds of times faster than a human could read, versus one which updates its buffer as fast as possible, even if it's only redrawing at the display refresh rate -- the latter performs much better because it only shows the data that ultimately matters!
In particular, non-DisplayLink TTY drivers behave more like that performant X terminal emulator, because they're writing directly to graphics memory. Treating DisplayLink like a serial terminal makes it slower than it should be in the event of a lot of data being written; it is doing all its updates, even if they are immediately overwritten.
A more performant approach would be to store two text buffers, one for the current state (ie what DisplayLink is dipslaying) and another for the desired state. Diff the two to determine what to update when the DisplayLink is ready again.
It seems like this is basically what happens in graphics mode anyway, with dirty rects (which would just become larger dirty rects basically until the DL is ready for more commands) -- i.e. you have to buffer anyway for efficient blit / readback etc.
If diffing textmode feels too much like policy, make a user-space component. Or do what graphics mode does and use just one buffer with a bounded set of dirty rects.
In other words, it seems like a solution which came from "we are deep in the bowels of the device driver, what is simplest possible thing we can do?" and there's nothing wrong with that, but it does end up moving complexity elsewhere somewhat.