All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "drm/fb-helper: improve DRM fbdev emulation device names"
@ 2021-10-08  7:17 Javier Martinez Canillas
  2021-10-08 11:02   ` [Nouveau] " Ville Syrjälä
  0 siblings, 1 reply; 7+ messages in thread
From: Javier Martinez Canillas @ 2021-10-08  7:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: Johannes Stezenbach, Javier Martinez Canillas, Daniel Vetter,
	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
query that information and so broke after the mentioned commit. Since
the names in /proc/fb are used programs that consider it an ABI, let's
restore the old names even when this lead to silly naming like the one
mentioned above as an example.

Reported-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

 drivers/gpu/drm/drm_fb_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 3ab07832104..8993b02e783 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -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), "%s",
+	snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb",
 		 fb_helper->dev->driver->name);
 
 }
-- 
2.31.1


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

* Re: [PATCH] Revert "drm/fb-helper: improve DRM fbdev emulation device names"
  2021-10-08  7:17 [PATCH] Revert "drm/fb-helper: improve DRM fbdev emulation device names" Javier Martinez Canillas
@ 2021-10-08 11:02   ` Ville Syrjälä
  0 siblings, 0 replies; 7+ messages in thread
From: Ville Syrjälä @ 2021-10-08 11:02 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Johannes Stezenbach, Daniel Vetter, David Airlie,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel,
	Ben Skeggs, nouveau

On Fri, Oct 08, 2021 at 09:17:08AM +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
> query that information and so broke after the mentioned commit. Since
> the names in /proc/fb are used programs that consider it an ABI, let's
> restore the old names even when this lead to silly naming like the one
> mentioned above as an example.

The usage Johannes listed was this specificially:
 using_kms() { grep -q -E '(nouveau|drm)fb' /proc/fb; }                                                        

So it actually looks like  Daniel's
commit f243dd06180a ("drm/nouveau: Use drm_fb_helper_fill_info")
also broke the abi. But for the pm-utils use case at least
just having the "drmfb" in there should cover even nouveau.

Cc: stable@vger.kernel.org
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> 
> Reported-by: Johannes Stezenbach <js@sig21.net>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
> 
>  drivers/gpu/drm/drm_fb_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 3ab07832104..8993b02e783 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -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), "%s",
> +	snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb",
>  		 fb_helper->dev->driver->name);
>  
>  }
> -- 
> 2.31.1

-- 
Ville Syrjälä
Intel

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

* Re: [Nouveau] [PATCH] Revert "drm/fb-helper: improve DRM fbdev emulation device names"
@ 2021-10-08 11:02   ` Ville Syrjälä
  0 siblings, 0 replies; 7+ messages in thread
From: Ville Syrjälä @ 2021-10-08 11:02 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Johannes Stezenbach, Daniel Vetter, David Airlie,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel,
	Ben Skeggs, nouveau

On Fri, Oct 08, 2021 at 09:17:08AM +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
> query that information and so broke after the mentioned commit. Since
> the names in /proc/fb are used programs that consider it an ABI, let's
> restore the old names even when this lead to silly naming like the one
> mentioned above as an example.

The usage Johannes listed was this specificially:
 using_kms() { grep -q -E '(nouveau|drm)fb' /proc/fb; }                                                        

So it actually looks like  Daniel's
commit f243dd06180a ("drm/nouveau: Use drm_fb_helper_fill_info")
also broke the abi. But for the pm-utils use case at least
just having the "drmfb" in there should cover even nouveau.

Cc: stable@vger.kernel.org
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> 
> Reported-by: Johannes Stezenbach <js@sig21.net>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
> 
>  drivers/gpu/drm/drm_fb_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 3ab07832104..8993b02e783 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -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), "%s",
> +	snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb",
>  		 fb_helper->dev->driver->name);
>  
>  }
> -- 
> 2.31.1

-- 
Ville Syrjälä
Intel

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

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

On Fri, Oct 08, 2021 at 02:02:40PM +0300, Ville Syrjälä wrote:
> On Fri, Oct 08, 2021 at 09:17:08AM +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
> > query that information and so broke after the mentioned commit. Since
> > the names in /proc/fb are used programs that consider it an ABI, let's
> > restore the old names even when this lead to silly naming like the one
> > mentioned above as an example.
> 
> The usage Johannes listed was this specificially:
>  using_kms() { grep -q -E '(nouveau|drm)fb' /proc/fb; }                                                        
> 
> So it actually looks like  Daniel's
> commit f243dd06180a ("drm/nouveau: Use drm_fb_helper_fill_info")
> also broke the abi. But for the pm-utils use case at least
> just having the "drmfb" in there should cover even nouveau.
> 
> Cc: stable@vger.kernel.org
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> > 
> > Reported-by: Johannes Stezenbach <js@sig21.net>
> > Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> > ---
> > 
> >  drivers/gpu/drm/drm_fb_helper.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> > index 3ab07832104..8993b02e783 100644
> > --- a/drivers/gpu/drm/drm_fb_helper.c
> > +++ b/drivers/gpu/drm/drm_fb_helper.c
> > @@ -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), "%s",

Please add a comment here that drmfb is uapi because pm-utils matches
against it ...

Otherwise this will be lost in time again :-(
-Daniel
> > +	snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb",
> >  		 fb_helper->dev->driver->name);
> >  
> >  }
> > -- 
> > 2.31.1
> 
> -- 
> Ville Syrjälä
> Intel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

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

On Fri, Oct 08, 2021 at 02:02:40PM +0300, Ville Syrjälä wrote:
> On Fri, Oct 08, 2021 at 09:17:08AM +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
> > query that information and so broke after the mentioned commit. Since
> > the names in /proc/fb are used programs that consider it an ABI, let's
> > restore the old names even when this lead to silly naming like the one
> > mentioned above as an example.
> 
> The usage Johannes listed was this specificially:
>  using_kms() { grep -q -E '(nouveau|drm)fb' /proc/fb; }                                                        
> 
> So it actually looks like  Daniel's
> commit f243dd06180a ("drm/nouveau: Use drm_fb_helper_fill_info")
> also broke the abi. But for the pm-utils use case at least
> just having the "drmfb" in there should cover even nouveau.
> 
> Cc: stable@vger.kernel.org
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> > 
> > Reported-by: Johannes Stezenbach <js@sig21.net>
> > Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> > ---
> > 
> >  drivers/gpu/drm/drm_fb_helper.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> > index 3ab07832104..8993b02e783 100644
> > --- a/drivers/gpu/drm/drm_fb_helper.c
> > +++ b/drivers/gpu/drm/drm_fb_helper.c
> > @@ -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), "%s",

Please add a comment here that drmfb is uapi because pm-utils matches
against it ...

Otherwise this will be lost in time again :-(
-Daniel
> > +	snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb",
> >  		 fb_helper->dev->driver->name);
> >  
> >  }
> > -- 
> > 2.31.1
> 
> -- 
> Ville Syrjälä
> Intel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

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

Hello Daniel,

On 10/13/21 14:27, Daniel Vetter wrote:
>>>  
>>>  	info->par = fb_helper;
>>> -	snprintf(info->fix.id, sizeof(info->fix.id), "%s",
> 
> Please add a comment here that drmfb is uapi because pm-utils matches
> against it ...
> 

Sure, I'll do that and send a v2.

Best regards,
-- 
Javier Martinez Canillas
Linux Engineering
Red Hat


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

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

Hello Daniel,

On 10/13/21 14:27, Daniel Vetter wrote:
>>>  
>>>  	info->par = fb_helper;
>>> -	snprintf(info->fix.id, sizeof(info->fix.id), "%s",
> 
> Please add a comment here that drmfb is uapi because pm-utils matches
> against it ...
> 

Sure, I'll do that and send a v2.

Best regards,
-- 
Javier Martinez Canillas
Linux Engineering
Red Hat


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

end of thread, other threads:[~2021-10-21 15:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08  7:17 [PATCH] Revert "drm/fb-helper: improve DRM fbdev emulation device names" Javier Martinez Canillas
2021-10-08 11:02 ` Ville Syrjälä
2021-10-08 11:02   ` [Nouveau] " Ville Syrjälä
2021-10-13 12:27   ` Daniel Vetter
2021-10-13 12:27     ` [Nouveau] " Daniel Vetter
2021-10-20 16:40     ` Javier Martinez Canillas
2021-10-20 16:40       ` [Nouveau] " 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.