dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* drm fb helpers hotplug/resize
@ 2022-10-05 19:49 Zack Rusin
  2022-10-06  8:01 ` Thomas Zimmermann
  0 siblings, 1 reply; 7+ messages in thread
From: Zack Rusin @ 2022-10-05 19:49 UTC (permalink / raw)
  To: tzimmermann; +Cc: dri-devel

Hi, Thomas.

Because you've been the one who's been working on drm_fb_helper.c the most the last
few years I wanted to pick your brain a bit.

I was porting vmwgfx to drm_fb_helper code which is largely trivial, just removing
all of vmwgfx_fb.c and replacing it with a call to drm_fbdev_generic_setup. But
drm_fb_helper.c code never deals with resizes which is a bit of a problem.

e.g. replacing the drm_sysfs_hotplug_event() call from
https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c#L2255
with drm_kms_helper_hotplug_event will call drm_fbdev_client_hotplug and end up in 
drm_fb_helper_hotplug_event:
https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/drm_fb_helper.c#L2003

Now drm_fb_helper_hotplug_event does drm_client_modeset_probe but it never resizes
drm_fb_helper::buffer and drm_fb_helper::fb so they're both incorrectly sized. 

In general I don't see drm_fb_helper code ever being able to deal with resizes. In
particular because the fbdev's xres_virtual/yres_virtual are sized exactly to the
initial xres/yres. 

It's definitely a lot bigger issue on virtualized environments where at boot we'll
have some very conservative size (800x600) on vmwgfx which is then usually resized
to the size of the window. drm_fb_helper breaks pretty bad in that case because it
can't deal with those resizes at all. 

Is this scenario something that drm_fb_helper should be able to handle or is it not
worth pursuing it? I don't think there's a trivial way of handling it so my guess is
that it would make drm_fb_helper quite a bit more complicated.

z

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

end of thread, other threads:[~2022-10-07  8:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05 19:49 drm fb helpers hotplug/resize Zack Rusin
2022-10-06  8:01 ` Thomas Zimmermann
2022-10-07  2:16   ` Zack Rusin
2022-10-07  7:10     ` Thomas Zimmermann
2022-10-07  7:15       ` Ville Syrjälä
2022-10-07  7:58         ` Thomas Zimmermann
2022-10-07  8:19           ` Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).