提交 6b1095ee 编写于 作者: A Alex Deucher

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: NPeter Wu <peter@lekensteyn.nl>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
Cc: Peter Wu <peter@lekensteyn.nl>
上级 a8a04c99
...@@ -539,7 +539,6 @@ static int amdgpu_atpx_get_client_id(struct pci_dev *pdev) ...@@ -539,7 +539,6 @@ static int amdgpu_atpx_get_client_id(struct pci_dev *pdev)
static const struct vga_switcheroo_handler amdgpu_atpx_handler = { static const struct vga_switcheroo_handler amdgpu_atpx_handler = {
.switchto = amdgpu_atpx_switchto, .switchto = amdgpu_atpx_switchto,
.power_state = amdgpu_atpx_power_state, .power_state = amdgpu_atpx_power_state,
.init = amdgpu_atpx_init,
.get_client_id = amdgpu_atpx_get_client_id, .get_client_id = amdgpu_atpx_get_client_id,
}; };
...@@ -574,6 +573,7 @@ static bool amdgpu_atpx_detect(void) ...@@ -574,6 +573,7 @@ static bool amdgpu_atpx_detect(void)
printk(KERN_INFO "vga_switcheroo: detected switching method %s handle\n", printk(KERN_INFO "vga_switcheroo: detected switching method %s handle\n",
acpi_method_name); acpi_method_name);
amdgpu_atpx_priv.atpx_detected = true; amdgpu_atpx_priv.atpx_detected = true;
amdgpu_atpx_init();
return true; return true;
} }
return false; return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册