Re: [PATCH v3] fbdev: mb862xxfbdrv: Make CONFIG_FB_DEVICE optional

From: Helge Deller
Date: Fri Oct 10 2025 - 08:08:53 EST


On 10/9/25 10:50, Uwe Kleine-König wrote:
Hello Javier,

On Wed, Oct 08, 2025 at 08:36:27PM +0200, Javier Garcia wrote:
This patch wraps the relevant code blocks with `IS_ENABLED(CONFIG_FB_DEVICE)`.

Allows the driver to be used for framebuffer text console, even if
support for the /dev/fb device isn't compiled-in (CONFIG_FB_DEVICE=n).

This align with Documentation/drm/todo.rst

This seems to be Documentation/gpu/todo.rst now...

"Remove driver dependencies on FB_DEVICE">>> I've not the card so I was not able to test it.

I still don't understand why the creation of the dispregs sysfs file
should be conditional on FB_DEVICE.

I think this is because people simply believe it, as it's documented like this
in the todo file. I think this is wrong.

I think the problem was, that device_create_file() has a "struct device *"
pointer as first parameter. Some device drivers probably referenced
the "struct device" pointer of the "/dev/fb" device, which does not exist
when FB_DEVICE isn't enabled. As such, the device_create_file() would fail
during initialization (since the devide ptr is NULL) of the driver and
prevent the driver from working.
That's not the case for this driver here, and probably not for the other
remaining drivers.

Either they have nothing to do with each other, or I'm missing
something.

Right now you are right... it has nothing to do with each other.

The former makes this patch wrong, the latter would be an
indication that the commit log is still non-optimal.
Either way, I've dropped the patch from the git repo for now.
I don't think the patch is wrong, but it's not deemed necessary either.
If someone has that device I'd happy to apply it after some feedback.

In addition, maybe the section from the todo file should be dropped?

Helge