All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Revert "drm/fb-helper: improve DRM fbdev emulation device names"
@ 2021-10-20 16:57 Javier Martinez Canillas
  2021-12-04 12:41   ` Johannes Stezenbach
  0 siblings, 1 reply; 5+ messages in thread
From: Javier Martinez Canillas @ 2021-10-20 16:57 UTC (permalink / raw)
  To: linux-kernel
  Cc: Daniel Vetter, Ville Syrjälä,
	Johannes Stezenbach, Javier Martinez Canillas, David Airlie,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel

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>
---

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(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 8e7a124d6c5a..22bf690910b2 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -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);
 
 }
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] Revert "drm/fb-helper: improve DRM fbdev emulation device names"
  2021-10-20 16:57 [PATCH v2] Revert "drm/fb-helper: improve DRM fbdev emulation device names" Javier Martinez Canillas
@ 2021-12-04 12:41   ` Johannes Stezenbach
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Stezenbach @ 2021-12-04 12:41 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Daniel Vetter, Ville Syrjälä,
	David Airlie, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, dri-devel

Hi,

On Wed, Oct 20, 2021 at 06:57:40PM +0200, Javier Martinez Canillas wrote:
> 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


> 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>
> ---
> 
> 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(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 8e7a124d6c5a..22bf690910b2 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -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);
>  
>  }
> -- 
> 2.31.1
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] Revert "drm/fb-helper: improve DRM fbdev emulation device names"
@ 2021-12-04 12:41   ` Johannes Stezenbach
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Stezenbach @ 2021-12-04 12:41 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Thomas Zimmermann, David Airlie, linux-kernel, dri-devel

Hi,

On Wed, Oct 20, 2021 at 06:57:40PM +0200, Javier Martinez Canillas wrote:
> 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


> 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>
> ---
> 
> 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(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 8e7a124d6c5a..22bf690910b2 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -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);
>  
>  }
> -- 
> 2.31.1
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] Revert "drm/fb-helper: improve DRM fbdev emulation device names"
  2021-12-04 12:41   ` Johannes Stezenbach
@ 2021-12-09 12:27     ` Javier Martinez Canillas
  -1 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2021-12-09 12:27 UTC (permalink / raw)
  To: Johannes Stezenbach
  Cc: linux-kernel, Daniel Vetter, Ville Syrjälä,
	David Airlie, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, dri-devel

Hello Johannes,

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

On 12/4/21 13:41, Johannes Stezenbach wrote:
> Hi,
> 
> On Wed, Oct 20, 2021 at 06:57:40PM +0200, Javier Martinez Canillas wrote:
>> 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 for the reminder. I've just pushed this to the drm-misc-fixes branch.
 
> 
> Thanks,
> Johannes
> 
Best regards,
-- 
Javier Martinez Canillas
Linux Engineering
Red Hat


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] Revert "drm/fb-helper: improve DRM fbdev emulation device names"
@ 2021-12-09 12:27     ` Javier Martinez Canillas
  0 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2021-12-09 12:27 UTC (permalink / raw)
  To: Johannes Stezenbach
  Cc: Thomas Zimmermann, David Airlie, linux-kernel, dri-devel

Hello Johannes,

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

On 12/4/21 13:41, Johannes Stezenbach wrote:
> Hi,
> 
> On Wed, Oct 20, 2021 at 06:57:40PM +0200, Javier Martinez Canillas wrote:
>> 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 for the reminder. I've just pushed this to the drm-misc-fixes branch.
 
> 
> Thanks,
> Johannes
> 
Best regards,
-- 
Javier Martinez Canillas
Linux Engineering
Red Hat


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-09 16:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 16:57 [PATCH v2] Revert "drm/fb-helper: improve DRM fbdev emulation device names" Javier Martinez Canillas
2021-12-04 12:41 ` Johannes Stezenbach
2021-12-04 12:41   ` Johannes Stezenbach
2021-12-09 12:27   ` Javier Martinez Canillas
2021-12-09 12:27     ` Javier Martinez Canillas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.