On Wed, Nov 13, 2019 at 10:59:47AM -0500, Brennan Vincent wrote:
> Hello,
> 
> My kernel always panics on boot, unless I configure it with
> `disable amdgpu`, in which case everything is working fine with
> the integrated card.
> 
> I have attached the dmesg from both trying to boot with `enable amdgpu`
> (as dmesg.bad) and a successful boot with `disable amdgpu`
> (as dmesg.good).
> 
> This reproduces every time, on both 6.6 and -current.

You hit a fatal error in amdgpu and the console selection in
the fallback path doesn't seem to work right.

It looks like inteldrm has the same fb memory as efifb.  efifb should
not attach when amdgpu hits the error as amdgpu is not the primary
device setup by uefi.

Can you try this diff and report back on which message shows in dmesg?

Index: sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c,v
retrieving revision 1.7
diff -u -p -r1.7 amdgpu_kms.c
--- sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c     30 Oct 2019 02:28:38 -0000      
1.7
+++ sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c     14 Nov 2019 01:06:01 -0000
@@ -1363,7 +1363,8 @@ amdgpu_attach(struct device *parent, str
            (pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG)
            & (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE))
            == (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE)) {
-               adev->primary = 1;
+               adev->primary = 0;
+               printf(": vga primary\n");
 #if NVGA > 0
                adev->console = vga_is_console(pa->pa_iot, -1);
                vga_console_attached = 1;
@@ -1371,7 +1372,8 @@ amdgpu_attach(struct device *parent, str
        }
 #if NEFIFB > 0
        if (efifb_is_primary(pa)) {
-               adev->primary = 1;
+               adev->primary = 0;
+               printf(": efifb primary\n");
                adev->console = efifb_is_console(pa);
                efifb_detach();
        }

Reply via email to