Skip to contentSkip to conversation

drm/fb-helper: improve DRM fbdev emulation device names

PATCH In review Javier Martinez Canillas 2 participants 3 messages May 25, 2021 – May 26, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 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 for drivers that already have "drm" in their name:

$ cat /proc/fb
0 rockchipdrmdrmfb
$ cat /proc/fb
0 simpledrmdrmfb

Also, there isn't a lot of value in adding these "drmfb" suffices to their names, since users shouldn't really care if the FB devices were registered by a real fbdev driver or a DRM driver using the fbdev emulation.

What programs should be interested about is if there's a DRM device, and there are better ways to query that info than reading this procfs entry.

So let's just remove the suffix, which leads to much better device names:

$ cat /proc/fb
0 rockchipdrm
$ cat /proc/fb
0 simpledrm

---

Changes in v2:
- Just remove the "drmfb" suffix instead of using a different one (tzimmermann).

 drivers/gpu/drm/drm_fb_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_fb_helper.c +1 -1
index f6baa204612..d77a24507d3 100644
@@ -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_helper->dev->driver->name);
 
 }
Signature · 1 line
2.31.1
maintainer Acked-by on v2 1/1
#1 lore raw

Am 25.05.21 um 17:13 schrieb Javier Martinez Canillas:

Quoted 19 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 for drivers that already have "drm" in their name:

$ cat /proc/fb
0 rockchipdrmdrmfb
$ cat /proc/fb
0 simpledrmdrmfb

Also, there isn't a lot of value in adding these "drmfb" suffices to their names, since users shouldn't really care if the FB devices were registered by a real fbdev driver or a DRM driver using the fbdev emulation.

What programs should be interested about is if there's a DRM device, and there are better ways to query that info than reading this procfs entry.

So let's just remove the suffix, which leads to much better device names:

Quoted 8 lines
$ cat /proc/fb
0 rockchipdrm
$ cat /proc/fb
0 simpledrm
Quoted 22 lines

---

Changes in v2:
- Just remove the "drmfb" suffix instead of using a different one (tzimmermann).

  drivers/gpu/drm/drm_fb_helper.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_fb_helper.c +1 -1
index f6baa204612..d77a24507d3 100644
@@ -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_helper->dev->driver->name);
 
  }
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
#2 lore raw
In reply to Javier Martinez Canillas

Am 25.05.21 um 17:13 schrieb Javier Martinez Canillas:

Quoted 19 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 for drivers that already have "drm" in their name:

$ cat /proc/fb
0 rockchipdrmdrmfb
$ cat /proc/fb
0 simpledrmdrmfb

Also, there isn't a lot of value in adding these "drmfb" suffices to their names, since users shouldn't really care if the FB devices were registered by a real fbdev driver or a DRM driver using the fbdev emulation.

What programs should be interested about is if there's a DRM device, and there are better ways to query that info than reading this procfs entry.

So let's just remove the suffix, which leads to much better device names:

Quoted 8 lines
$ cat /proc/fb
0 rockchipdrm
$ cat /proc/fb
0 simpledrm

Added to drm-misc-next. Thank you.

Best regards
Thomas

Quoted 22 lines

---

Changes in v2:
- Just remove the "drmfb" suffix instead of using a different one (tzimmermann).

  drivers/gpu/drm/drm_fb_helper.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_fb_helper.c +1 -1
index f6baa204612..d77a24507d3 100644
@@ -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_helper->dev->driver->name);
 
  }
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