Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/radeon: init atpx at switcheroo register time v2

If we do it at enable time, it's too late for the feature
checks.

v2: drop .init setting as per Peter's comments

bug: https://bugzilla.kernel.org/show_bug.cgi?id=115321
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Peter Wu <peter@lekensteyn.nl>

+1 -1
+1 -1
drivers/gpu/drm/radeon/radeon_atpx_handler.c
··· 536 536 static const struct vga_switcheroo_handler radeon_atpx_handler = { 537 537 .switchto = radeon_atpx_switchto, 538 538 .power_state = radeon_atpx_power_state, 539 - .init = radeon_atpx_init, 540 539 .get_client_id = radeon_atpx_get_client_id, 541 540 }; 542 541 ··· 571 572 printk(KERN_INFO "vga_switcheroo: detected switching method %s handle\n", 572 573 acpi_method_name); 573 574 radeon_atpx_priv.atpx_detected = true; 575 + radeon_atpx_init(); 574 576 return true; 575 577 } 576 578 return false;