From patchwork Wed Apr 16 18:25:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gergo Koteles X-Patchwork-Id: 2073789 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Zd8Zn449dz1yJ9 for ; Thu, 17 Apr 2025 04:25:04 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1u57Rg-00040L-Vf; Wed, 16 Apr 2025 18:25:12 +0000 Received: from irl.hu ([95.85.9.111]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1u57Rf-000404-Sl for fwts-devel@lists.ubuntu.com; Wed, 16 Apr 2025 18:25:11 +0000 Received: from fedori.lan (51b69338.dsl.pool.telekom.hu [::ffff:81.182.147.56]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 00000000000832BB.0000000067FFF607.000AE558; Wed, 16 Apr 2025 20:25:11 +0200 From: Gergo Koteles To: fwts-devel@lists.ubuntu.com Subject: [PATCH] acpi: method: Fix _DDC test arguments Date: Wed, 16 Apr 2025 20:25:05 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 Mime-Version: 1.0 X-Mime-Autoconverted: from 8bit to 7bit by courier 1.0 Received-SPF: pass client-ip=95.85.9.111; envelope-from=soyer@irl.hu; helo=irl.hu X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" Call the method with 1, 2, 3, 4 instead of the desired length as in the specification. https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/Apx_B_Video_Extensions/output-device-specific-methods.html#ddc-return-the-edid-for-this-device Signed-off-by: Gergo Koteles Acked-by: Ivan Hu --- src/acpi/method/method.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c index 32aceaa9..2dcd1458 100644 --- a/src/acpi/method/method.c +++ b/src/acpi/method/method.c @@ -4738,7 +4738,8 @@ static void method_test_DDC_return( ACPI_OBJECT *obj, void *private) { - uint32_t requested = *(uint32_t*)private; + uint32_t arg = *(uint32_t*)private; + uint32_t requested = arg * 128; FWTS_UNUSED(buf); @@ -4763,10 +4764,10 @@ static void method_test_DDC_return( break; case ACPI_TYPE_INTEGER: fwts_passed(fw, - "%s could not return a buffer of %d " + "%s could not return a buffer of %" PRIu32 " " "items and instead returned an error " - "status.", - name, obj->Buffer.Length); + "status %" PRIu64 ".", + name, requested, obj->Integer.Value); break; default: fwts_failed(fw, LOG_LEVEL_MEDIUM, "Method_DDCBadReturnType", @@ -4777,7 +4778,7 @@ static void method_test_DDC_return( static int method_test_DDC(fwts_framework *fw) { - static int values[] = { 128, 256, 384, 512 }; + static uint32_t values[] = { 1, 2, 3, 4 }; ACPI_OBJECT arg[1]; uint32_t i;