Commit cf22fc28 authored by Lyude Paul's avatar Lyude Paul Committed by Dave Airlie

drm/nouveau/gsp: Fix ACPI MXDM/MXDS method invocations

Currently we get an error from ACPI because both of these arguments expect
a single argument, and we don't provide one. I'm not totally clear on what
that argument does, but we're able to find the missing value from
_acpiCacheMethodData() in src/kernel/platform/acpi_common.c in nvidia's
driver. So, let's add that - which doesn't get eDP displays to power on
quite yet, but gets rid of the argument warning at least.
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-7-airlied@gmail.com
parent 3108cc03
...@@ -1150,6 +1150,8 @@ static void ...@@ -1150,6 +1150,8 @@ static void
r535_gsp_acpi_mux_id(acpi_handle handle, u32 id, MUX_METHOD_DATA_ELEMENT *mode, r535_gsp_acpi_mux_id(acpi_handle handle, u32 id, MUX_METHOD_DATA_ELEMENT *mode,
MUX_METHOD_DATA_ELEMENT *part) MUX_METHOD_DATA_ELEMENT *part)
{ {
union acpi_object mux_arg = { ACPI_TYPE_INTEGER };
struct acpi_object_list input = { 1, &mux_arg };
acpi_handle iter = NULL, handle_mux = NULL; acpi_handle iter = NULL, handle_mux = NULL;
acpi_status status; acpi_status status;
unsigned long long value; unsigned long long value;
...@@ -1172,14 +1174,18 @@ r535_gsp_acpi_mux_id(acpi_handle handle, u32 id, MUX_METHOD_DATA_ELEMENT *mode, ...@@ -1172,14 +1174,18 @@ r535_gsp_acpi_mux_id(acpi_handle handle, u32 id, MUX_METHOD_DATA_ELEMENT *mode,
if (!handle_mux) if (!handle_mux)
return; return;
status = acpi_evaluate_integer(handle_mux, "MXDM", NULL, &value); /* I -think- 0 means "acquire" according to nvidia's driver source */
input.pointer->integer.type = ACPI_TYPE_INTEGER;
input.pointer->integer.value = 0;
status = acpi_evaluate_integer(handle_mux, "MXDM", &input, &value);
if (ACPI_SUCCESS(status)) { if (ACPI_SUCCESS(status)) {
mode->acpiId = id; mode->acpiId = id;
mode->mode = value; mode->mode = value;
mode->status = 0; mode->status = 0;
} }
status = acpi_evaluate_integer(handle_mux, "MXDS", NULL, &value); status = acpi_evaluate_integer(handle_mux, "MXDS", &input, &value);
if (ACPI_SUCCESS(status)) { if (ACPI_SUCCESS(status)) {
part->acpiId = id; part->acpiId = id;
part->mode = value; part->mode = value;
......
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