[Bug 75401] vgaswitcheroo doesn't work for AMD Radeon 8870m (possibly due to "wrong" PCI class)

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

 



https://bugzilla.kernel.org/show_bug.cgi?id=75401

--- Comment #12 from Pali Rohár <pali.rohar@xxxxxxxxx> ---
@Alex Deucher: Why is this bug while loop needed?

static bool radeon_atrm_get_bios(struct radeon_device *rdev)
{
...
    while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
        dhandle = ACPI_HANDLE(&pdev->dev);
        if (!dhandle)
            continue;

        status = acpi_get_handle(dhandle, "ATRM", &atrm_handle);
        if (!ACPI_FAILURE(status)) {
            found = true;
            break;
        }
    }
...

Is not correct to use ACPI_HANDLE directly, something like this (without while
loop)?

static bool radeon_atrm_get_bios(struct radeon_device *rdev)
{
...
    if (rdev->pdev)
        dhandle = ACPI_HANDLE(&rdev->pdev->dev);
...

This could also eliminate using PCI_CLASS_DISPLAY_VGA.

If I understood correctly, ATRM method is specific for AMD cards so searching
for ATRM method in all avalilable pci devices (which match class) is not
necessary.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[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