Skip to content

Commit 6d5c2d8

Browse files
Lekensteyndanvet
authored andcommitted
i915: fix ACPI _DSM warning
Since commit 29a241c (ACPICA: Add argument typechecking for all predefined ACPI names), _DSM parameters are validated which trigger the following warning: ACPI Warning: \_SB_.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Integer], ACPI requires [Package] (20130517/nsarguments-95) ACPI Warning: \_SB_.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Integer], ACPI requires [Package] (20130517/nsarguments-95) ACPI Warning: \_SB_.PCI0.P0P2.PEGP._DSM: Argument #4 type mismatch - Found [Integer], ACPI requires [Package] (20130517/nsarguments-95) ACPI Warning: \_SB_.PCI0.P0P2.PEGP._DSM: Argument #4 type mismatch - Found [Integer], ACPI requires [Package] (20130517/nsarguments-95) As the Intel _DSM method seems to ignore this parameter, let's comply to the ACPI spec and use a Package instead. Signed-off-by: Peter Wu <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=32602 Signed-off-by: Daniel Vetter <[email protected]>
1 parent 2960bc9 commit 6d5c2d8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

drivers/gpu/drm/i915/intel_acpi.c

+8-6
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static const u8 intel_dsm_guid[] = {
2828
0x0f, 0x13, 0x17, 0xb0, 0x1c, 0x2c
2929
};
3030

31-
static int intel_dsm(acpi_handle handle, int func, int arg)
31+
static int intel_dsm(acpi_handle handle, int func)
3232
{
3333
struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
3434
struct acpi_object_list input;
@@ -46,8 +46,9 @@ static int intel_dsm(acpi_handle handle, int func, int arg)
4646
params[1].integer.value = INTEL_DSM_REVISION_ID;
4747
params[2].type = ACPI_TYPE_INTEGER;
4848
params[2].integer.value = func;
49-
params[3].type = ACPI_TYPE_INTEGER;
50-
params[3].integer.value = arg;
49+
params[3].type = ACPI_TYPE_PACKAGE;
50+
params[3].package.count = 0;
51+
params[3].package.elements = NULL;
5152

5253
ret = acpi_evaluate_object(handle, "_DSM", &input, &output);
5354
if (ret) {
@@ -151,8 +152,9 @@ static void intel_dsm_platform_mux_info(void)
151152
params[1].integer.value = INTEL_DSM_REVISION_ID;
152153
params[2].type = ACPI_TYPE_INTEGER;
153154
params[2].integer.value = INTEL_DSM_FN_PLATFORM_MUX_INFO;
154-
params[3].type = ACPI_TYPE_INTEGER;
155-
params[3].integer.value = 0;
155+
params[3].type = ACPI_TYPE_PACKAGE;
156+
params[3].package.count = 0;
157+
params[3].package.elements = NULL;
156158

157159
ret = acpi_evaluate_object(intel_dsm_priv.dhandle, "_DSM", &input,
158160
&output);
@@ -205,7 +207,7 @@ static bool intel_dsm_pci_probe(struct pci_dev *pdev)
205207
return false;
206208
}
207209

208-
ret = intel_dsm(dhandle, INTEL_DSM_FN_SUPPORTED_FUNCTIONS, 0);
210+
ret = intel_dsm(dhandle, INTEL_DSM_FN_SUPPORTED_FUNCTIONS);
209211
if (ret < 0) {
210212
DRM_DEBUG_KMS("failed to get supported _DSM functions\n");
211213
return false;

0 commit comments

Comments
 (0)