All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huacai Chen <chenhuacai@kernel.org>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>,
	Greg KH <gregkh@linuxfoundation.org>,
	Maling list - DRI developers <dri-devel@lists.freedesktop.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Xuefeng Li <lixuefeng@loongson.cn>,
	Huacai Chen <chenhuacai@loongson.cn>
Subject: Re: [PATCH] vgaarb: Call vga_arb_device_init() after PCI enumeration
Date: Wed, 2 Jun 2021 15:43:16 +0800	[thread overview]
Message-ID: <CAAhV-H5L4mgH5W1wACecm0e0Rp5Fy1fUqaj-R83K=+cNaZadOg@mail.gmail.com> (raw)
In-Reply-To: <YLZYuM6SepbeLcI7@phenom.ffwll.local>

Hi, Daniel,

On Tue, Jun 1, 2021 at 11:56 PM Daniel Vetter <daniel@ffwll.ch> 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@loongson.cn>
>
> 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

      parent reply	other threads:[~2021-06-02  7:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28  8:26 [PATCH] vgaarb: Call vga_arb_device_init() after PCI enumeration Huacai Chen
2021-06-01 15:56 ` Daniel Vetter
2021-06-01 17:12   ` Greg KH
2021-06-01 18:03     ` Daniel Vetter
2021-06-02 10:36       ` Huacai Chen
2021-06-02 16:22         ` Daniel Vetter
2021-06-02 18:31           ` Bjorn Helgaas
2021-06-02 18:31             ` Bjorn Helgaas
2021-06-02 19:26             ` Daniel Vetter
2021-06-02 19:26               ` Daniel Vetter
2021-06-04  4:50             ` Huacai Chen
2021-06-04  4:50               ` Huacai Chen
2021-06-04 19:56               ` Bjorn Helgaas
2021-06-04 19:56                 ` Bjorn Helgaas
2021-06-05  2:02                 ` Huacai Chen
2021-06-05  2:02                   ` Huacai Chen
2021-06-05 17:59                   ` Bjorn Helgaas
2021-06-05 17:59                     ` Bjorn Helgaas
2021-06-12  4:40                     ` Huacai Chen
2021-06-12  4:40                       ` Huacai Chen
2021-06-02  7:43   ` Huacai Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAhV-H5L4mgH5W1wACecm0e0Rp5Fy1fUqaj-R83K=+cNaZadOg@mail.gmail.com' \
    --to=chenhuacai@kernel.org \
    --cc=airlied@linux.ie \
    --cc=bhelgaas@google.com \
    --cc=chenhuacai@loongson.cn \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lixuefeng@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.