On Thu, 14 Nov 2019, Jonathan Gray wrote:

> 
> > 
> > `efifb primary` is printed.
> 
> ok, so drop that patch and try this one:

Can do. What am I trying, exactly -- are you thinking
this might allow amdgpu to work properly, or
are you just wanting me to collect some more debugging info?

If it's the latter I will run it and send the dmesg.

> 
> Index: sys/arch/amd64/amd64/efifb.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/amd64/amd64/efifb.c,v
> retrieving revision 1.25
> diff -u -p -r1.25 efifb.c
> --- sys/arch/amd64/amd64/efifb.c      13 Oct 2019 10:56:31 -0000      1.25
> +++ sys/arch/amd64/amd64/efifb.c      14 Nov 2019 03:22:55 -0000
> @@ -520,15 +520,20 @@ efifb_is_primary(struct pci_attach_args 
>               if (pci_mapreg_info(pc, tag, reg, type, &base, &size, NULL))
>                       continue;
>  
> -             if (bios_efiinfo != NULL && bios_efiinfo->fb_addr != 0)
> -                     return (1);
> +             if (bios_efiinfo != NULL &&
> +                 bios_efiinfo->fb_addr >= base &&
> +                 bios_efiinfo->fb_addr < base + size)
> +                     return 1;
> +
> +             if (efifb_console.paddr >= base &&
> +                 efifb_console.paddr < base + size)
> +                     return 1;
>  
>               if (type & PCI_MAPREG_MEM_TYPE_64BIT)
>                       reg += 4;
>       }
>  
> -     /* XXX coreboot framebuffer isn't matched above. */
> -     return efifb_is_console(pa);;
> +     return 0;
>  }
>  
>  void
> 

Reply via email to