All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 75401] vgaswitcheroo doesn't work for AMD Radeon 8870m (possibly due to "wrong" PCI class)
Date: Sun, 18 May 2014 20:02:45 +0000	[thread overview]
Message-ID: <bug-75401-2300-ofY2ZE6WPu@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-75401-2300@https.bugzilla.kernel.org/>

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

--- Comment #12 from Pali Rohár <pali.rohar@gmail.com> ---
@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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2014-05-18 20:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-03 17:26 [Bug 75401] New: vgaswtitcheroo doesn't work for AMD Radeon 8870m (possibly due to "wrong" PCI class) bugzilla-daemon
2014-05-03 17:29 ` [Bug 75401] " bugzilla-daemon
2014-05-04  4:24 ` [Bug 75401] vgaswitcheroo " bugzilla-daemon
2014-05-05 14:07 ` bugzilla-daemon
2014-05-06  4:36 ` bugzilla-daemon
2014-05-06 13:09 ` bugzilla-daemon
2014-05-09  6:14 ` bugzilla-daemon
2014-05-09  6:15 ` bugzilla-daemon
2014-05-09 12:44 ` bugzilla-daemon
2014-05-09 13:05 ` bugzilla-daemon
2014-05-09 13:53 ` bugzilla-daemon
2014-05-09 13:54 ` bugzilla-daemon
2014-05-09 14:35 ` bugzilla-daemon
2014-05-18 20:02 ` bugzilla-daemon [this message]
2014-05-19  2:04 ` bugzilla-daemon
2014-05-26  8:42 ` bugzilla-daemon
2014-05-26  8:48 ` bugzilla-daemon

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=bug-75401-2300-ofY2ZE6WPu@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    /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.