If we do it at enable time, it's too late for the feature
checks.

bug: https://bugzilla.kernel.org/show_bug.cgi?id=115321
Signed-off-by: Alex Deucher <alexander.deuc...@amd.com>
Cc: Peter Wu <pe...@lekensteyn.nl>
---
 drivers/gpu/drm/radeon/radeon_atpx_handler.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c 
b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
index 86dcdf3..b46b4c4 100644
--- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c
+++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
@@ -536,7 +536,7 @@ static int radeon_atpx_get_client_id(struct pci_dev *pdev)
 static const struct vga_switcheroo_handler radeon_atpx_handler = {
        .switchto = radeon_atpx_switchto,
        .power_state = radeon_atpx_power_state,
-       .init = radeon_atpx_init,
+       .init = NULL,
        .get_client_id = radeon_atpx_get_client_id,
 };
 
@@ -572,6 +572,7 @@ static bool radeon_atpx_detect(void)
                printk(KERN_INFO "vga_switcheroo: detected switching method %s 
handle\n",
                       acpi_method_name);
                radeon_atpx_priv.atpx_detected = true;
+               radeon_atpx_init();
                return true;
        }
        return false;
-- 
2.5.5

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to