[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 #10 from Christoph Haag <haagch.christoph@xxxxxxxxxxxxxx> ---
Well, it does not help. I wanted to get you some more info, so I inserted some
printks:

in radeon_atpx_handler.c
static void radeon_atpx_parse_functions(struct radeon_atpx_functions *f, u32
mask)
{
        printk(KERN_ERR "ATPX mask: %u\n", mask);
        printk(KERN_ERR "ATPX power control supported: %u\n",
ATPX_POWER_CONTROL_SUPPORTED);
        printk(KERN_ERR "mask & ATPX_POWER_CONTROL_SUPPORTED: %u\n", mask &
ATPX_POWER_CONTROL_SUPPORTED);
        printk(KERN_ERR "!!(mask & ATPX_POWER_CONTROL_SUPPORTED): %u\n",
!!(mask & ATPX_POWER_CONTROL_SUPPORTED));

in radeon_device.c
        printk(KERN_ERR "rdev->flags: %u\n", rdev->flags);
        printk(KERN_ERR "rdev->flags & RADEON_IS_PX: %u\n", rdev->flags &
RADEON_IS_PX);
        printk(KERN_ERR "radeon_has_atpx_dgpu_power_cntl(): %u\n",
radeon_has_atpx_dgpu_power_cntl());
    if ((rdev->flags & RADEON_IS_PX) && radeon_has_atpx_dgpu_power_cntl())
        runtime = true;

Then I booted and got this:

[    6.235984] rdev->flags: 39911477
[    6.238221] rdev->flags & RADEON_IS_PX: 33554432
[    6.239947] radeon_has_atpx_dgpu_power_cntl(): 0
[    6.241572] vga_switcheroo: enabled
[    6.241657] ATPX version 1, functions 0x00000033
[    6.241659] ATPX mask: 51
[    6.243153] ATPX power control supported: 2
[    6.244508] mask & ATPX_POWER_CONTROL_SUPPORTED: 2
[    6.245649] !!(mask & ATPX_POWER_CONTROL_SUPPORTED): 1

Uhm... so, does that mean the ATPX BIOS version has been fine in the first
place and that radeon_has_atpx_dgpu_power_cntl() returns 0, just because the
check whether to enable runpm is done BEFORE the atpx stuff is even parsed?

I didn't want to trace everything back to the inits, so I just put another
radeon_atpx_init(); call just before the runpm check, removed static from the
function and added a forward declaration
int radeon_atpx_init(void);
...
        radeon_atpx_init();
        printk(KERN_ERR "rdev->flags: %u\n", rdev->flags);
        printk(KERN_ERR "rdev->flags & RADEON_IS_PX: %u\n", rdev->flags &
RADEON_IS_PX);
        printk(KERN_ERR "radeon_has_atpx_dgpu_power_cntl(): %u\n",
radeon_has_atpx_dgpu_power_cntl());
    if ((rdev->flags & RADEON_IS_PX) && radeon_has_atpx_dgpu_power_cntl()) {
        runtime = true;
                printk(KERN_ERR "runpm is enabled. Yay\n");
        }

And I got
[    6.223693] ATPX mask: 51
[    6.224823] ATPX power control supported: 2
[    6.225937] mask & ATPX_POWER_CONTROL_SUPPORTED: 2
[    6.227140] !!(mask & ATPX_POWER_CONTROL_SUPPORTED): 1
[    6.228198] rdev->flags: 39911477
[    6.229274] rdev->flags & RADEON_IS_PX: 33554432
[    6.230181] radeon_has_atpx_dgpu_power_cntl(): 1
[    6.231039] runpm is enabled. Yay
[    6.231889] vga_switcheroo: enabled
[    6.231956] ATPX version 1, functions 0x00000033
[    6.231957] ATPX mask: 51
[    6.232267] usbcore: registered new interface driver btusb
[    6.232932] ATPX power control supported: 2
[    6.233849] mask & ATPX_POWER_CONTROL_SUPPORTED: 2
[    6.234717] !!(mask & ATPX_POWER_CONTROL_SUPPORTED): 1

YES! IT DOES!

Damn!
Thank you so much for asking a follow up question so I can stop telling people
that the BIOS on several laptops is broken and looking like an idiot.

On the other side: It probably would have been a good idea to verify that there
IS hardware where it actually works as intended before declaring the BIOS to be
at fault.

-- 
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