Commit 69ee9742 authored by Alex Deucher's avatar Alex Deucher

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=115321Reviewed-by: default avatarPeter Wu <peter@lekensteyn.nl>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: Peter Wu <peter@lekensteyn.nl>
parent 6b1095ee
...@@ -536,7 +536,6 @@ static int radeon_atpx_get_client_id(struct pci_dev *pdev) ...@@ -536,7 +536,6 @@ static int radeon_atpx_get_client_id(struct pci_dev *pdev)
static const struct vga_switcheroo_handler radeon_atpx_handler = { static const struct vga_switcheroo_handler radeon_atpx_handler = {
.switchto = radeon_atpx_switchto, .switchto = radeon_atpx_switchto,
.power_state = radeon_atpx_power_state, .power_state = radeon_atpx_power_state,
.init = radeon_atpx_init,
.get_client_id = radeon_atpx_get_client_id, .get_client_id = radeon_atpx_get_client_id,
}; };
...@@ -572,6 +571,7 @@ static bool radeon_atpx_detect(void) ...@@ -572,6 +571,7 @@ static bool radeon_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);
radeon_atpx_priv.atpx_detected = true; radeon_atpx_priv.atpx_detected = true;
radeon_atpx_init();
return true; return true;
} }
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment