Skip to content
  • Dave Airlie's avatar
    xf86/pci: fix slot claiming counting. · 39f73e81
    Dave Airlie authored
    
    
    Currently if we claim a slot for a PCI driver, we never let it go properly,
    this prevents the fallback probe from reusing the slot, even though it
    isn't claimed for that pci slot.
    
    So if you set the modesetting driver to point at a specific kms device,
    that isn't a PCI device (i.e. USB dongle), then the modesetting driver
    loads, the pci probe tries to bind the config slot to the primary PCI
    device, however we then check the kms device bus id to discover it
    isn't valid. However we don't remove the claim on the slot. Next the
    old probe function is called and there is no slots to claim.
    
    This patch fixes that and converts the pciSlotClaimed boolean into
    a counter, and changes the unclaim api to take a device pointer
    to remove from the entity.
    
    Reviewed-by: default avatarAdam Jackson <ajax@redhat.com>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    39f73e81