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

drm/amdgpu: 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

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/amd/amdgpu/amdgpu_atpx_handler.c
··· 539 539 static const struct vga_switcheroo_handler amdgpu_atpx_handler = { 540 540 .switchto = amdgpu_atpx_switchto, 541 541 .power_state = amdgpu_atpx_power_state, 542 - .init = amdgpu_atpx_init, 543 542 .get_client_id = amdgpu_atpx_get_client_id, 544 543 }; 545 544 ··· 573 574 printk(KERN_INFO "vga_switcheroo: detected switching method %s handle\n", 574 575 acpi_method_name); 575 576 amdgpu_atpx_priv.atpx_detected = true; 577 + amdgpu_atpx_init(); 576 578 return true; 577 579 } 578 580 return false;