Re: [PATCH] fbdev: udl: Make CONFIG_FB_DEVICE optional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thomas,

On 10/28/24 09:41, Thomas Zimmermann wrote:
Am 25.10.24 um 17:37 schrieb Helge Deller:
On 10/25/24 11:25, Gonzalo Silvalde Blanco wrote:
The fb_udl driver currently depends on CONFIG_FB_DEVICE to create sysfs
entries and access framebuffer device information. This patch wraps the
relevant code blocks with #ifdef CONFIG_FB_DEVICE, allowing the driver to
be built and used even if CONFIG_FB_DEVICE is not selected.

The sysfs setting only controls access to certain framebuffer attributes
and is not required for the basic display functionality to work correctly.
(For information on DisplayLink devices and their Linux support, see:
https://wiki.archlinux.org/title/DisplayLink).

Tested by building with and without CONFIG_FB_DEVICE, both of which
compiled and ran without issues.

Gonzalo, I don't like this patch very much.

It adds lots of #ifdefs around functions like dev_dbg().
Instead of ifdefs, aren't there other possibilities, e.g.
using fb_dbg() if appropriate?
Or using any other generic dbg() info or simply dropping the line?

I talked Gonzalo into sending this patch. I think dev_dbg() calls
should be replaced with fb_dbg(), same for _info() and _err(). That's
probably worth doing anyway.

Yes, but I doubt every of those calls can be replaced...

But more important:
This is a fbdev driver and currently depends on CONFIG_FB_DEVICE.
If I'm right, the only reason to disable CONFIG_FB_DEVICE is if
you want fbdev output at bootup, but otherwise just want to use DRM.

It's unrelated to booting. CONFIG_FB_DEVICE enables/disables
userspace interfaces (/dev/fb*, /sys/graphics/fb*). Even without,
there's still fbcon that runs on top of the fbdev driver.

Sure, I meant that if people enable a fdev driver, they most likely
want /dev/fb as well ..... unless they want to use mostly DRM drivers.

But then, doesn't there exist a native DRM driver for this graphics
card which can be used instead?
If so, I suggest to not change this fbdev driver at all.

Or can we talk about removing udlfb entirely? I tried before, but
there was one person still using it. [1] He had concerns about udl's
(the DRM driver) stability. I think DRM's udl has matured enough and
is in better shape than udlfb. Maybe we can try again.> [1] https://lore.kernel.org/dri-devel/20201130125200.10416-1-tzimmermann@xxxxxxx/

The stability was one of the issues, but IMHO the *main* issue he mentions is this:

The framebuffer driver is faster, it keeps back buffer and updates only
data that differ between the front and back buffer. The DRM driver doesn't
have such optimization, it will update everything in a given rectangle -
this increases USB traffic and makes video playback more jerky.

That's exactly the main concern I'm regularily bringing up and which
IMHO is the main reason we still have many fbdev drivers.
You added support for some of those graphics cards with native DRM
drivers, but all of them are unaccelerated. This hurts a lot on old
machines and as such specific cards are ugly slowly with DRM.
A good example for this is the kvm drm graphics driver which is sluggish
and slow when using KVM.

I'm happy to get rid of the fbdev drivers, but for that DRM really needs
to allow some sort of native fillrect, copyarea and imageblt operations so
that we can get performance back on the old cards when implementing them
as DRM driver.

Helge




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux