summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-07-27 14:52:35 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-07-29 14:36:32 -0400
commit6b1095eedd39b175f5ef7e50cb85f0cebb8e9ead (patch)
treee6c8f62780f9d95d28c9b10323a46a4d190776f0 /drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
parenta8a04c994d41a489eb0f2899893209e04e030153 (diff)
downloadlinux-6b1095eedd39b175f5ef7e50cb85f0cebb8e9ead.tar.gz
linux-6b1095eedd39b175f5ef7e50cb85f0cebb8e9ead.tar.xz
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
index 0494fe7b62c0..49de92600074 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;