On Sun, Sep 08, 2019 at 02:53:31PM +0200, Marcus MERIGHI wrote:
> Hello Jonathan!
> 
> Thanks for the explanation and your work!
> 
> [email protected] (Jonathan Gray), 2019.09.08 (Sun) 04:05 (CEST):
> > Previously the drm code faked a 1024x768 fb if nothing was connected.
> > 
> > Now there is a deferred setup path, but we don't handle doing
> > rasops_init()/wsdisplay_cnattach() in that at the moment.  Given it is
> > hotplug driven it would have to be able to safely teardown/detach the
> > console as well.
> 
> What I understand from the above is that it was known to work formerly,
> is known _not_ to work nowadays and would be non-trivial to fix.
> 
> I think this only hits machines with "wsdisplay0 at *drm0", not those
> with "wsdisplay0 at vga*", correct?
> (a second machine auf mine with "wsdisplay0 at inteldrm0" shows the same
> behaviour. I have nothing to test "wsdisplay0 at vga0".) 
> 
> 6.6-release is approaching. Am I to prepare for either booting with a
> serial console or with a permanently attached monitor on machines that
> have wsdisplay0 at *drm? 
> 
> Please don't take this as a complaint, I'm only trying to prepare...
> 
> Marcus

Here is a partial revert of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca91a2758fcef6635626993557dd51cfbb6dd134

to go back to the old behaviour.  I have only tested this with amdgpu
currently.

Index: sys/dev/pci/drm/drm_fb_helper.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/drm_fb_helper.c,v
retrieving revision 1.17
diff -u -p -r1.17 drm_fb_helper.c
--- sys/dev/pci/drm/drm_fb_helper.c     11 Jul 2019 01:50:55 -0000      1.17
+++ sys/dev/pci/drm/drm_fb_helper.c     8 Sep 2019 13:43:18 -0000
@@ -2002,15 +2002,23 @@ static int drm_fb_helper_single_fb_probe
        }
 
        if (crtc_count == 0 || sizes.fb_width == -1 || sizes.fb_height == -1) {
+#ifdef __linux__
                DRM_INFO("Cannot find any crtc or sizes\n");
 
                /* First time: disable all crtc's.. */
-#ifdef notyet
                /* XXX calling this hangs boot with no connected outputs */
                if (!fb_helper->deferred_setup /* && 
SPLAY_EMPTY(fb_helper->dev->files) */)
                        restore_fbdev_mode(fb_helper);
-#endif
                return -EAGAIN;
+#else
+               /*
+                * hmm everyone went away - assume VGA cable just fell out
+                * and will come back later.
+                */
+               DRM_INFO("Cannot find any crtc or sizes - going 1024x768\n");
+               sizes.fb_width = sizes.surface_width = 1024;
+               sizes.fb_height = sizes.surface_height = 768;
+#endif
        }
 
        /* Handle our overallocation */

Reply via email to