From: Alex Deucher Date: Wed, 27 Jul 2016 18:52:35 +0000 (-0400) Subject: drm/amdgpu: init atpx at switcheroo register time (v2) X-Git-Tag: v4.8-rc1~62^2~2^2~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b1095eedd39b175f5ef7e50cb85f0cebb8e9ead;p=platform%2Fkernel%2Flinux-exynos.git 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 Signed-off-by: Alex Deucher Cc: Peter Wu --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c index 0494fe7..49de926 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c @@ -539,7 +539,6 @@ static int amdgpu_atpx_get_client_id(struct pci_dev *pdev) static const struct vga_switcheroo_handler amdgpu_atpx_handler = { .switchto = amdgpu_atpx_switchto, .power_state = amdgpu_atpx_power_state, - .init = amdgpu_atpx_init, .get_client_id = amdgpu_atpx_get_client_id, }; @@ -574,6 +573,7 @@ static bool amdgpu_atpx_detect(void) printk(KERN_INFO "vga_switcheroo: detected switching method %s handle\n", acpi_method_name); amdgpu_atpx_priv.atpx_detected = true; + amdgpu_atpx_init(); return true; } return false;