All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 115321] radeon runpm falsely disabled on Clevo P170EM
Date: Fri, 15 Jul 2016 19:30:51 +0000	[thread overview]
Message-ID: <bug-115321-2300-l8LsHCF8Pi@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-115321-2300@https.bugzilla.kernel.org/>

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

--- Comment #8 from Peter Wu <peter@lekensteyn.nl> ---
Created attachment 224001
  --> https://bugzilla.kernel.org/attachment.cgi?id=224001&action=edit
possible patch (force integers into bools)

Yay, I found documentation for the SGMD (SG Mode) field:
0 - None
1 - Switchable Graphics (Muxed)
2 - Switchable Graphics (Muxless)
3 - Discrete only

(Related: SGFL stands for Switchable Graphics Feature List.)

By the way, the functions mask 0x33 still covers ATPX_POWER_CONTROL_SUPPORTED
((1<<1) == 2). Something else must be broken.

Based on the dmesg, we can see that:

    if (radeon_modeset == 1) {
        DRM_INFO("radeon kernel modesetting enabled.\n"); // <-- called
        driver = &kms_driver;
        // ...
        radeon_register_atpx_handler(); // called, see dmesg:
        // "[    3.245994] vga_switcheroo: enabled"
        // radeon_atpx_init is called after the previous printk.
        // radeon_atpx_verify_interface is called and returns 0, see dmesg:
        // "[    3.246040] ATPX version 1, functions 0x00000033"
        // now radeon_atpx_parse_functions(..., 0x33) is called which:
    // f->power_cntl = mask & ATPX_POWER_CONTROL_SUPPORTED;
        // = 0x33 & (1 << 1) = 2 (which is a truth value)
    }

    /* let modprobe override vga console setting */
    return drm_pci_init(driver, pdriver);
    // driver.load (radeon_driver_load_kms) ->
    //   radeon_device_init() ->
    //     radeon_has_atpx_dgpu_power_cntl() ->
    //       return radeon_atpx_priv.atpx.functions.power_cntl // 2 per above

Maybe there is a compiler bug... can you try the attached patch?

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

  parent reply	other threads:[~2016-07-15 19:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-27 10:17 [Bug 115321] New: radeon runpm falsely disabled on Clevo P170EM bugzilla-daemon
2016-04-14  3:26 ` [Bug 115321] " bugzilla-daemon
2016-04-14  3:26 ` bugzilla-daemon
2016-04-14 15:27 ` bugzilla-daemon
2016-07-15 13:57 ` bugzilla-daemon
2016-07-15 14:19 ` bugzilla-daemon
2016-07-15 15:21 ` bugzilla-daemon
2016-07-15 15:26 ` bugzilla-daemon
2016-07-15 19:30 ` bugzilla-daemon [this message]
2016-07-15 19:42 ` bugzilla-daemon
2016-07-16 13:20 ` bugzilla-daemon
2016-07-16 13:39 ` bugzilla-daemon
2016-07-16 13:55 ` bugzilla-daemon
2016-07-16 13:59 ` bugzilla-daemon
2016-07-16 14:17 ` bugzilla-daemon
2016-08-24 14:07 ` 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-115321-2300-l8LsHCF8Pi@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.