Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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")
Reported-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211020165740.3011927-1-javierm@redhat.com

+7 -1
+7 -1
drivers/gpu/drm/drm_fb_helper.c
··· 1743 1743 sizes->fb_width, sizes->fb_height); 1744 1744 1745 1745 info->par = fb_helper; 1746 - snprintf(info->fix.id, sizeof(info->fix.id), "%s", 1746 + /* 1747 + * The DRM drivers fbdev emulation device name can be confusing if the 1748 + * driver name also has a "drm" suffix on it. Leading to names such as 1749 + * "simpledrmdrmfb" in /proc/fb. Unfortunately, it's an uAPI and can't 1750 + * be changed due user-space tools (e.g: pm-utils) matching against it. 1751 + */ 1752 + snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb", 1747 1753 fb_helper->dev->driver->name); 1748 1754 1749 1755 }