Re: [PATCH] vgaarb: Call vga_arb_device_init() after PCI enumeration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Daniel,

On Tue, Jun 1, 2021 at 11:56 PM Daniel Vetter <daniel@xxxxxxxx> wrote:
>
> On Fri, May 28, 2021 at 04:26:07PM +0800, Huacai Chen wrote:
> > We should call vga_arb_device_init() after PCI enumeration, otherwise it
> > may fail to select the default VGA device. Since vga_arb_device_init()
> > and PCI enumeration function (i.e., pcibios_init() or acpi_init()) are
> > both wrapped by subsys_initcall(), their sequence is not assured. So, we
> > use subsys_initcall_sync() instead of subsys_initcall() to wrap vga_arb_
> > device_init().
> >
> > Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
>
> Is there a bug report for this? Should we mark this cc: stable?
No bug report yet, we just found vga_arb_device_init() has no effect
on Loongson platform.

Huacai
>
> Also adding Bjorn/Greg since I have no idea whether this is the right fix.
> It does do what it says on the tin, but that's maybe not the best approach
> here.
> -Daniel
>
> > ---
> >  drivers/gpu/vga/vgaarb.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
> > index 5180c5687ee5..4b8a62af34cf 100644
> > --- a/drivers/gpu/vga/vgaarb.c
> > +++ b/drivers/gpu/vga/vgaarb.c
> > @@ -1564,4 +1564,4 @@ static int __init vga_arb_device_init(void)
> >       pr_info("loaded\n");
> >       return rc;
> >  }
> > -subsys_initcall(vga_arb_device_init);
> > +subsys_initcall_sync(vga_arb_device_init);
> > --
> > 2.27.0
> >
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux