Skip to contentSkip to conversation

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

PATCH In review Javier Martinez Canillas 2 participants 3 messages Oct 20, 2021 – Dec 9, 2021

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

PATCH v2 1/1 Revert "drm/fb-helper: improve DRM fbdev emulation device names"

This reverts commit b3484d2b03e4c940a9598aa841a52d69729c582a.

That change attempted to improve the DRM drivers fbdev emulation device names to avoid having confusing names like "simpledrmdrmfb" in /proc/fb.

But unfortunately, there are user-space programs such as pm-utils that match against the fbdev names and so broke after the mentioned commit.

Since the names in /proc/fb are used by tools that consider it an uAPI, let's restore the old names even when this lead to silly names like the one mentioned above.

Fixes b3484d2b03e4 ("drm/fb-helper: improve DRM fbdev emulation device names")

---

Changes in v2:
- Add a comment explaining that the current /proc/fb names are an uAPI.
- Add a Fixes: tag so it can be cherry-picked by stable kernels.
- Add Ville Syrjälä's Reviewed-by tag.

 drivers/gpu/drm/drm_fb_helper.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_fb_helper.c +7 -1
index 8e7a124d6c5a..22bf690910b2 100644
@@ -1743,7 +1743,13 @@ 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), "%s",
+	/*
+	 * The DRM drivers fbdev emulation device name can be confusing if the
+	 * driver name also has a "drm" suffix on it. Leading to names such as
+	 * "simpledrmdrmfb" in /proc/fb. Unfortunately, it's an uAPI and can't
+	 * be changed due user-space tools (e.g: pm-utils) matching against it.
+	 */
+	snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb",
 		 fb_helper->dev->driver->name);
 
 }
Signature · 1 line
2.31.1
#1 lore raw

Hi,

Quoted 11 lines · Javier Martinez Canillas

This reverts commit b3484d2b03e4c940a9598aa841a52d69729c582a.

That change attempted to improve the DRM drivers fbdev emulation device names to avoid having confusing names like "simpledrmdrmfb" in /proc/fb.

But unfortunately, there are user-space programs such as pm-utils that match against the fbdev names and so broke after the mentioned commit.

Since the names in /proc/fb are used by tools that consider it an uAPI, let's restore the old names even when this lead to silly names like the one mentioned above.

I would like to ask about the fate of this patch. It doesn't seem to have been picked up by anyone, does it?

Thanks,
Johannes

Quoted 37 lines
Fixes b3484d2b03e4 ("drm/fb-helper: improve DRM fbdev emulation device names")

---

Changes in v2:
- Add a comment explaining that the current /proc/fb names are an uAPI.
- Add a Fixes: tag so it can be cherry-picked by stable kernels.
- Add Ville Syrjälä's Reviewed-by tag.

 drivers/gpu/drm/drm_fb_helper.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_fb_helper.c +7 -1
index 8e7a124d6c5a..22bf690910b2 100644
@@ -1743,7 +1743,13 @@ 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), "%s",
+	/*
+	 * The DRM drivers fbdev emulation device name can be confusing if the
+	 * driver name also has a "drm" suffix on it. Leading to names such as
+	 * "simpledrmdrmfb" in /proc/fb. Unfortunately, it's an uAPI and can't
+	 * be changed due user-space tools (e.g: pm-utils) matching against it.
+	 */
+	snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb",
 		 fb_helper->dev->driver->name);
 
 }
Signature · 1 line
2.31.1
#2 lore raw

Hello Johannes,

Sorry for the late response. I was on holidays for a week and just came back.

Quoted 11 lines · Johannes Stezenbach

Hi,

Quoted 8 lines · Javier Martinez Canillas

This reverts commit b3484d2b03e4c940a9598aa841a52d69729c582a.

That change attempted to improve the DRM drivers fbdev emulation device names to avoid having confusing names like "simpledrmdrmfb" in /proc/fb.

But unfortunately, there are user-space programs such as pm-utils that match against the fbdev names and so broke after the mentioned commit.

Quoted 7 lines
Quoted 3 lines

Since the names in /proc/fb are used by tools that consider it an uAPI, let's restore the old names even when this lead to silly names like the one mentioned above.

I would like to ask about the fate of this patch. It doesn't seem to have been picked up by anyone, does it?

Thanks for the reminder. I've just pushed this to the drm-misc-fixes branch.

Quoted 4 lines

Thanks,
Johannes

Best regards,

Signature · 3 lines
Javier Martinez Canillas
Linux Engineering
Red Hat