drm/fb-helper: improve DRM fbdev emulation device names
Subsystems (2)
PATCH 1/1 drm/fb-helper: improve DRM fbdev emulation device names
Framebuffer devices that are registered by DRM drivers for fbdev emulation have a "drmfb" suffix in their name. But makes them to be quite confusing if a driver already has "drm" in its name:
$ cat /proc/fb 0 rockchipdrmdrmfb
$ cat /proc/fb 0 simpledrmdrmfb
Instead, let's just add a "-fb" suffix to denote that are DRM drivers FB:
$ cat /proc/fb 0 rockchipdrm-fb
$ cat /proc/fb 0 simpledrm-fb
---
drivers/gpu/drm/drm_fb_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_fb_helper.c +1 -1
@@ -1737,7 +1737,7 @@ void drm_fb_helper_fill_info(struct fb_info *info, sizes->fb_width, sizes->fb_height); info->par = fb_helper; -snprintf (info->fix.id,sizeof (info->fix.id),"%sdrmfb" , +snprintf (info->fix.id,sizeof (info->fix.id),"%s-fb" , fb_helper->dev->driver->name); }
Signature · 1 line
2.31.1
Quoted 12 lines · Javier Martinez Canillas
Framebuffer devices that are registered by DRM drivers for fbdev emulation have a "drmfb" suffix in their name. But makes them to be quite confusing if a driver already has "drm" in its name:
$ cat /proc/fb 0 rockchipdrmdrmfb$ cat /proc/fb 0 simpledrmdrmfbInstead, let's just add a "-fb" suffix to denote that are DRM drivers FB:
Quoted 8 lines
$ cat /proc/fb 0 rockchipdrm-fb$ cat /proc/fb 0 simpledrm-fbSuggested-by Peter Robinson <[email protected]>Signed-off-by Javier Martinez Canillas <[email protected]>
So what with all the drivers which do _not_ have drm in their name? Also I'm never sure how much these are uapi or not ...
-Daniel
Quoted 21 lines
---
drivers/gpu/drm/drm_fb_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/drm_fb_helper.c +1
-1@@ -1737,7 +1737,7 @@ void drm_fb_helper_fill_info(struct fb_info *info, sizes->fb_width, sizes->fb_height); info->par = fb_helper; -snprintf (info->fix.id,sizeof (info->fix.id),"%sdrmfb" , +snprintf (info->fix.id,sizeof (info->fix.id),"%s-fb" , fb_helper->dev->driver->name); }Signature · 1 line
2.31.1
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Thomas Zimmermann
maintainerHi
Am 21.05.21 um 17:33 schrieb Daniel Vetter:
Quoted 16 lines · Javier Martinez Canillas
Quoted 15 lines
Framebuffer devices that are registered by DRM drivers for fbdev emulation have a "drmfb" suffix in their name. But makes them to be quite confusing if a driver already has "drm" in its name:
$ cat /proc/fb 0 rockchipdrmdrmfb$ cat /proc/fb 0 simpledrmdrmfbInstead, let's just add a "-fb" suffix to denote that are DRM drivers FB:
$ cat /proc/fb 0 rockchipdrm-fb
Quoted 8 lines
Quoted 5 lines
$ cat /proc/fb 0 simpledrm-fbSuggested-by Peter Robinson <[email protected]>Signed-off-by Javier Martinez Canillas <[email protected]>So what with all the drivers which do _not_ have drm in their name? Also I'm never sure how much these are uapi or not ...
Why do we need a suffix anyway?
Quoted 24 lines
-Daniel
Quoted 21 lines
---
drivers/gpu/drm/drm_fb_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/drm_fb_helper.c +1
-1@@ -1737,7 +1737,7 @@ void drm_fb_helper_fill_info(struct fb_info *info, sizes->fb_width, sizes->fb_height); info->par = fb_helper; -snprintf (info->fix.id,sizeof (info->fix.id),"%sdrmfb" , +snprintf (info->fix.id,sizeof (info->fix.id),"%s-fb" , fb_helper->dev->driver->name); }Signature · 1 line
2.31.1
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
On 5/21/21 6:53 PM, Thomas Zimmermann wrote:
[snip]
Quoted 4 lines
Quoted 3 lines
So what with all the drivers which do _not_ have drm in their name? Also I'm never sure how much these are uapi or not ...
That someone could threat as an uapi is a fair point indeed.
Quoted 2 lines
Why do we need a suffix anyway?
Yes, I thought the same and was torn about posting a patch to just remove the suffix. I don't think users care that much if is a fb device from a fbdev driver or a DRM driver using the fbdev emulation.
Quoted 2 lines
Quoted 2 lines
-Daniel
Best regards,
Signature · 4 lines
Javier Martinez Canillas Software Engineer New Platform Technologies Enablement team RHEL Engineering
Thomas Zimmermann
maintainerHi
Am 21.05.21 um 19:18 schrieb Javier Martinez Canillas:
Quoted 9 lines · Thomas Zimmermann
[snip]
Quoted 4 lines
Quoted 3 lines
So what with all the drivers which do _not_ have drm in their name? Also I'm never sure how much these are uapi or not ...
Quoted 8 lines
That someone could threat as an uapi is a fair point indeed.
Quoted 2 lines
Why do we need a suffix anyway?
Yes, I thought the same and was torn about posting a patch to just remove the suffix. I don't think users care that much if is a fb device from a fbdev driver or a DRM driver using the fbdev emulation.
Yup. I don't see how anything in userspace would depend on the exact name; especially since fbdev emulation only provides basic features. (I'd welcome a counter examples that proves me wrong.)
IMHO we can risk it to remove the suffix entirely. But that needs an ack from Daniel or Dave.
Best regards
Thomas
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
-Daniel
Best regards,
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
Quoted 20 lines · Thomas Zimmermann
Hi
Am 21.05.21 um 19:18 schrieb Javier Martinez Canillas:
Quoted 9 lines · Thomas Zimmermann
[snip]
Quoted 4 lines
Quoted 3 lines
So what with all the drivers which do _not_ have drm in their name? Also I'm never sure how much these are uapi or not ...
Quoted 7 lines
That someone could threat as an uapi is a fair point indeed.
Quoted 2 lines
Why do we need a suffix anyway?
Yes, I thought the same and was torn about posting a patch to just remove the suffix. I don't think users care that much if is a fb device from a fbdev driver or a DRM driver using the fbdev emulation.
Quoted 6 lines
Yup. I don't see how anything in userspace would depend on the exact name; especially since fbdev emulation only provides basic features. (I'd welcome a counter examples that proves me wrong.)
IMHO we can risk it to remove the suffix entirely. But that needs an ack from Daniel or Dave.
If you guys with your distro hats on all think it doesn't matter, then yeah I'm all for dropping the somewhat silly -drm or drmfb suffixes. I think that was just way back so it's easier to know you've loaded the right driver, back when there was both drm and native fbdev drivers around. But now I think for new hw there's only drm, so should be all fine.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Thomas Zimmermann
maintainerHi
Am 25.05.21 um 15:08 schrieb Daniel Vetter:
Quoted 10 lines · Thomas Zimmermann
Quoted 9 lines
Hi
Am 21.05.21 um 19:18 schrieb Javier Martinez Canillas:
Quoted 6 lines · Thomas Zimmermann
[snip]
Quoted 2 lines
Quoted 2 lines
So what with all the drivers which do _not_ have drm in their name?
Also
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 2 lines
Quoted 1 line
I'm never sure how much these are uapi or not ...
That someone could threat as an uapi is a fair point indeed.
Quoted 2 lines
Why do we need a suffix anyway?
Yes, I thought the same and was torn about posting a patch to just remove the suffix. I don't think users care that much if is a fb device from
a
Quoted 9 lines
Quoted 8 lines
Quoted 1 line
fbdev driver or a DRM driver using the fbdev emulation.
Yup. I don't see how anything in userspace would depend on the exact name; especially since fbdev emulation only provides basic features. (I'd welcome a counter examples that proves me wrong.)
IMHO we can risk it to remove the suffix entirely. But that needs an ack from Daniel or Dave.
Quoted 6 lines
If you guys with your distro hats on all think it doesn't matter, then yeah I'm all for dropping the somewhat silly -drm or drmfb suffixes. I think that was just way back so it's easier to know you've loaded the right driver, back when there was both drm and native fbdev drivers around. But now I think for new hw there's only drm, so should be all fine.
Suse doesn't use fbdev, except for some outliers; most notably hypervfb and generic efifb/vesafb. Both are now being replaced with drm code. From what I've seen, it's the same for other distros. And X11 checks for the existence of device files anyway IIRC.
Best regards
Thomas
Quoted 2 lines
-Daniel
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer
Hello,
On 5/25/21 3:34 PM, Thomas Zimmermann wrote:
[snip]
Quoted 8 lines
Quoted 7 lines
If you guys with your distro hats on all think it doesn't matter, then yeah I'm all for dropping the somewhat silly -drm or drmfb suffixes. I think that was just way back so it's easier to know you've loaded the right driver, back when there was both drm and native fbdev drivers around. But now I think for new hw there's only drm, so should be all fine.
Quoted 4 lines
Suse doesn't use fbdev, except for some outliers; most notably hypervfb and generic efifb/vesafb. Both are now being replaced with drm code.
From what I've seen, it's the same for other distros. And X11 checks
for the existence of device files anyway IIRC.
Yes, I believe is the same for us.
I'll post a patch to just remove the suffix then. Thanks you both for the feedback.
Quoted 7 lines
Best regards
ThomasQuoted 2 lines
-Daniel
Best regards,
Signature · 4 lines
Javier Martinez Canillas Software Engineer New Platform Technologies Enablement team RHEL Engineering