Currently, PCI-AT takes the final image if multiple exist. Use the first one instead, to match nouveau behaviour.
Signed-off-by: Eliot Courtney <[email protected]> --- drivers/gpu/nova-core/vbios.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nova-core/vbios.rs b/drivers/gpu/nova-core/vbios.rs index 9c5281e7a0d3..82811e42e858 100644 --- a/drivers/gpu/nova-core/vbios.rs +++ b/drivers/gpu/nova-core/vbios.rs @@ -333,7 +333,10 @@ pub(crate) fn new(dev: &device::Device, bar0: &Bar0) -> Result<Vbios> { // Convert to a specific image type match BiosImageType::try_from(image.pcir.code_type) { Ok(BiosImageType::PciAt) => { - pci_at_image = Some(PciAtBiosImage::try_from(image)?); + // Silently ignore any extra PCI-AT images. + if pci_at_image.is_none() { + pci_at_image = Some(PciAtBiosImage::try_from(image)?); + } } Ok(BiosImageType::FwSec) => { if first_fwsec_image.is_none() { -- 2.54.0
