Skip to content

Commit cf22fc2

Browse files
Lyudeairlied
authored andcommitted
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: Lyude Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 3108cc0 commit cf22fc2

File tree

1 file changed

+8
-2
lines changed
  • drivers/gpu/drm/nouveau/nvkm/subdev/gsp

1 file changed

+8
-2
lines changed

drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,8 @@ static void
11501150
r535_gsp_acpi_mux_id(acpi_handle handle, u32 id, MUX_METHOD_DATA_ELEMENT *mode,
11511151
MUX_METHOD_DATA_ELEMENT *part)
11521152
{
1153+
union acpi_object mux_arg = { ACPI_TYPE_INTEGER };
1154+
struct acpi_object_list input = { 1, &mux_arg };
11531155
acpi_handle iter = NULL, handle_mux = NULL;
11541156
acpi_status status;
11551157
unsigned long long value;
@@ -1172,14 +1174,18 @@ r535_gsp_acpi_mux_id(acpi_handle handle, u32 id, MUX_METHOD_DATA_ELEMENT *mode,
11721174
if (!handle_mux)
11731175
return;
11741176

1175-
status = acpi_evaluate_integer(handle_mux, "MXDM", NULL, &value);
1177+
/* I -think- 0 means "acquire" according to nvidia's driver source */
1178+
input.pointer->integer.type = ACPI_TYPE_INTEGER;
1179+
input.pointer->integer.value = 0;
1180+
1181+
status = acpi_evaluate_integer(handle_mux, "MXDM", &input, &value);
11761182
if (ACPI_SUCCESS(status)) {
11771183
mode->acpiId = id;
11781184
mode->mode = value;
11791185
mode->status = 0;
11801186
}
11811187

1182-
status = acpi_evaluate_integer(handle_mux, "MXDS", NULL, &value);
1188+
status = acpi_evaluate_integer(handle_mux, "MXDS", &input, &value);
11831189
if (ACPI_SUCCESS(status)) {
11841190
part->acpiId = id;
11851191
part->mode = value;

0 commit comments

Comments
 (0)