On Fri, Aug 04, 2017 at 08:20:32PM +1000, Daniel Axtens wrote:
A system without PCI legacy resources (e.g. ARM64, powerpc) may find that no default/boot VGA device has been marked, because the VGA arbiter checks for legacy resource decoding before marking a card as default.
Would it be feasible to just sprinkle some "if (IS_ENABLED(CONFIG_X86))" over the portions of vgaarb.c that deal with legacy resources?
I'm missing some context as to the negative consequences you're experiencing on other arches (the cover letter merely refers to "quirks in ppc and concerns in arm land" and is missing links to archived versions of v1 and v2), but clearly legacy resources are x86-specific so any code dealing with them seems superfluous on other arches and should be marked as such.
Please cc dri-devel when proposing changes to vgaarb.c (see MAINTAINERS).
Thanks,
Lukas
Hi Lukas,
Let me reply "back-to-front":
Please cc dri-devel when proposing changes to vgaarb.c (see MAINTAINERS).
Sorry, will do in future.
I'm missing some context as to the negative consequences you're experiencing on other arches (the cover letter merely refers to "quirks in ppc and concerns in arm land" and is missing links to archived versions of v1 and v2), but clearly legacy resources are x86-specific so any code dealing with them seems superfluous on other arches and should be marked as such.
Quirk/v1: https://www.spinics.net/lists/linux-pci/msg62865.html Approach 2: https://www.spinics.net/lists/linux-pci/msg63092.html https://www.spinics.net/lists/linux-pci/msg63083.html
The quirk in powerpc land that I'm referring to is arch/powerpc/kernel/pci-common.c::fixup_vga() which is a class enable hook that marks the first VGA device it comes across as default if the arbiter has not marked one.
The arm concerns are ventaliated in the threads I linked - they boil down to "why do we need the arbiter at all on platforms without legacy resources? Can't we do this more simply?"
Would it be feasible to just sprinkle some "if (IS_ENABLED(CONFIG_X86))" over the portions of vgaarb.c that deal with legacy resources?
Yes and no. That would disable the unnecessary chunks of the VGA arbiter, but we then still have to figure out how to mark devices as default if not with the arbiter.
Regards, Daniel
Thanks,
Lukas
dri-devel@lists.freedesktop.org