[Bug 115321] radeon runpm falsely disabled on Clevo P170EM

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

 



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

--- Comment #8 from Peter Wu <peter@xxxxxxxxxxxxx> ---
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@xxxxxxxxxxxxxxxxxxxxx
https://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