Signed-off-by: Pierre Moreau <pierre.morrow at free.fr>
---
 drm/nouveau/nouveau_acpi.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drm/nouveau/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c
index 1f18018..36f4a40 100644
--- a/drm/nouveau/nouveau_acpi.c
+++ b/drm/nouveau/nouveau_acpi.c
@@ -61,11 +61,13 @@ bool nouveau_has_mux(void) {
 #define NOUVEAU_DSM_HAS_OPT 0x2

 #ifdef CONFIG_VGA_SWITCHEROO
+static const uint32_t nouveau_mux_dsm_rid = 0x00000102;
 static const char nouveau_mux_dsm_muid[] = {
        0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D,
        0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4,
 };

+static const uint32_t nouveau_op_dsm_rid = 0x00000100;
 static const char nouveau_op_dsm_muid[] = {
        0xF8, 0xD8, 0x86, 0xA4, 0xDA, 0x0B, 0x1B, 0x47,
        0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0,
@@ -87,7 +89,7 @@ static int nouveau_evaluate_optimus_dsm(acpi_handle handle, 
int func, int arg, u
                args_buff[i] = (arg >> i * 8) & 0xFF;

        *result = 0;
-       obj = acpi_evaluate_dsm_typed(handle, nouveau_op_dsm_muid, 0x00000100,
+       obj = acpi_evaluate_dsm_typed(handle, nouveau_op_dsm_muid, 
nouveau_op_dsm_rid,
                                      func, &argv4, ACPI_TYPE_BUFFER);
        if (!obj) {
                acpi_handle_info(handle, "failed to evaluate _DSM\n");
@@ -137,7 +139,7 @@ static int nouveau_evaluate_mux_dsm(acpi_handle handle, int 
func, int arg)
                .integer.value = arg,
        };

-       obj = acpi_evaluate_dsm_typed(handle, nouveau_mux_dsm_muid, 0x00000102,
+       obj = acpi_evaluate_dsm_typed(handle, nouveau_mux_dsm_muid, 
nouveau_mux_dsm_rid,
                                      func, &argv4, ACPI_TYPE_INTEGER);
        if (!obj) {
                acpi_handle_info(handle, "failed to evaluate _DSM\n");
@@ -224,7 +226,7 @@ static int nouveau_dsm_pci_probe(struct pci_dev *pdev)
        if (!acpi_has_method(dhandle, "_DSM"))
                return false;

-       if (acpi_check_dsm(dhandle, nouveau_mux_dsm_muid, 0x00000102,
+       if (acpi_check_dsm(dhandle, nouveau_mux_dsm_muid, nouveau_mux_dsm_rid,
                           1 << NOUVEAU_DSM_MUX_POWER))
                retval |= NOUVEAU_DSM_HAS_MUX;

-- 
2.4.1

Reply via email to