Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2383780lqb; Mon, 27 May 2024 19:22:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUpMQoxzzpCnBvRcnOWgF1Fn6qCRyaMRSM029Eg2VXtnT9/1PXTgS0tTFVip07mU7Q+wtzSYs1/iJinblGVXCUjRKlcz79FWlO8PqHUdA== X-Google-Smtp-Source: AGHT+IFu3vvnFYNnKJ2ejPKlAQhHgWb7bNzyyWZ7szagZaiAeoyW50SG16EkM9sPrSHxlo6n0+zO X-Received: by 2002:a05:6214:3117:b0:6ab:95b8:3002 with SMTP id 6a1803df08f44-6abccfa4b6bmr131714576d6.44.1716862919919; Mon, 27 May 2024 19:21:59 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ad76823db0si59267046d6.561.2024.05.27.19.21.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 19:21:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191647-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=TYsSUDEQ; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-191647-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191647-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 98A791C21C1D for ; Tue, 28 May 2024 02:21:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A9F96F08A; Tue, 28 May 2024 02:19:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="TYsSUDEQ" Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2051.outbound.protection.outlook.com [40.107.212.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F37C69D3C; Tue, 28 May 2024 02:19:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.212.51 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716862760; cv=fail; b=GiQK97c15r7/LKCu8210QIsRDkagr888CsiQdtMrZ7DlW5owwQhn3srRaGWHuIe10GJrRdbe4RMB5WJesPno9prwTBLzoaO8sGn0ex37zMhQgqM+/w8i7tfkdXmC+0F3Zf4zb2xFbyNZaJ0lttBGT/xb7E1S94ifc+SPkHMyN5A= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716862760; c=relaxed/simple; bh=EkXQbWAIqisn+oTvKNi1t8LqbQhJiMxm//GRumGx4Gs=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=ionDWyfKM8e0HP1sQtI9Uyar/hua9dIaBV4w6ZioyYQFaL7hNlhstHBOPKv3hIWzkxT5hz4R7qfdmJkZ7oCPGKsf+n6MtiF0ydbSTnaIXoRwdLnWlIgXRAT4Vb84ZqEAvYN+p40EYfI8Gmq2wZfKxisCrUoylaLH24srmpACSf0= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=TYsSUDEQ; arc=fail smtp.client-ip=40.107.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QN8wEDYylAHVDyxlhH06OvA7tC97laWmfgArKISr+tBgzCDhk1lnsxSXoMTXB+uCH2xz/+8ICCY4KaELNSiBJdj+d3DpnHnfYA9cb6g+KCpv8a2mnUeU+NlDQsPPcjCJOO0pz3UzuucMgfbYCFFo/BsLCfbrDL7xMu99atbu5si6Pr1tIGD3x4eklqplRKQWIEQ9LRii1MpD0EC5FEG1s2T7QH4l99+Jnb1UujSeAdVc7aW3MCea8D5ydUcBJrm6ttf0zX2eKr//xlRFdS9vVrAN7Qn0wifnXMfMBTm672c2jAobU0+8HOhU/nDXIeXQHMlyvZ9dOhm460/C9oeAmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0raTXu3EqnyVYsE42cTw/p5dMZTpTP0gz5ZupKWSEpI=; b=XqI1nxer0LILqN1GWoN4y/h1R5zywIJCEPJLpTDG/ygnBS/yYW5efi0W78bCH3OLf2bG34EFWzVLoPHKOeJM32e/SrWbtgITcAySw7nbvLHOsELcWfILkXv+Hf6sRKm2zqW3wzYmHdacNHmPLOvOOUC3DGGwHA+ZyYjpeId0cK5Jf/KQDbU+R+rMQfRETyEu/2PdSa81kEyePELpJi2C+8en+1Nqj29/GBbRA2LZf/ZWLpcNyTnkonKr1hwmk/g3+UcY1W0rOLUxk1OZDJTm3pLMUHmI+acgMyxu/L/+C6WxGwF+XrSX4jJX4Y/LDznNmbnF1U1a1uEBoUyuxNFhGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0raTXu3EqnyVYsE42cTw/p5dMZTpTP0gz5ZupKWSEpI=; b=TYsSUDEQklIQp15LvFymXVzhXKgZ7FqvBBDJoEBMeq8IwlgOML0tmQm6vFX4IaCHS0uFIiVnQsmrHKF/ByPyMYdJORpbuHo4VoBQiwsO2pVpEB+uysfXGWB/vLUezieNmZE3ykLNuhkPJMi3AG2ayuPj9k+PU94U9QNJA1t0R5I= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) by DS0PR12MB9323.namprd12.prod.outlook.com (2603:10b6:8:1b3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.36; Tue, 28 May 2024 02:19:12 +0000 Received: from MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::37ee:a763:6d04:81ca]) by MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::37ee:a763:6d04:81ca%7]) with mapi id 15.20.7611.030; Tue, 28 May 2024 02:19:12 +0000 Message-ID: <6f4bc109-00d0-47b0-a581-b96a6152545c@amd.com> Date: Mon, 27 May 2024 21:19:10 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 8/9] platform/x86: asus-wmi: add apu_mem setting To: "Luke D. Jones" , hdegoede@redhat.com Cc: ilpo.jarvinen@linux.intel.com, corentin.chary@gmail.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240528013626.14066-1-luke@ljones.dev> <20240528013626.14066-9-luke@ljones.dev> Content-Language: en-US From: "Limonciello, Mario" In-Reply-To: <20240528013626.14066-9-luke@ljones.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SA9PR03CA0009.namprd03.prod.outlook.com (2603:10b6:806:20::14) To MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN0PR12MB6101:EE_|DS0PR12MB9323:EE_ X-MS-Office365-Filtering-Correlation-Id: a47ff0da-b50b-4dea-3dba-08dc7ebc908e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|1800799015|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?ay9BNEZscUFraW8rby9QUUJPT2RsRlZDeUlZZmdLNkVtQ1ZxcU81TFZyTlFP?= =?utf-8?B?dmZVckFzYkY0em9wdm94WC9nRUF5UUlIa1NhMFZYUlgzWlg3ZTJoWWI1QmFY?= =?utf-8?B?S0ExbDlMeUVUTkVpbkkwK0VlN2w2dSs3SmlhTmdoR2cwNVFZL1FNalNaRHdv?= =?utf-8?B?OVU3YkM0TXMxZ0VCSndGRWJObTQ3dVd5UTAvWElxbXkybmdRdFlQb3B1RjhZ?= =?utf-8?B?M2FuY1FqYUNLSlBoQ2p5TlRhZ1dEdVJUUEVKV1dCVGE3SDZKU01uWmZyZlFY?= =?utf-8?B?R0ZIYkp2UDY3WGF6T0Q4SnVnNXNWYUdjRXZRcmZqdFQyQ0JvU2MxQXBBNDJE?= =?utf-8?B?czNSSzVCeXE0MWhRZDkxN0hGajVFaEZEZXlBVGlBWnFNc3VFL0cxVjFzeGlw?= =?utf-8?B?SzBETkxpdktZbXExNDluQU9nQ2FITmJwWFJyajBoemJWRDF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l5b0JDWU83eW1OWElQMDkwTzk5UnMx?= =?utf-8?B?cERUZ0lweGl1KzA4RUIxWXdsZUt4ZlZrR2hoMjQwbk1DNWxCZVByOFczeU9r?= =?utf-8?B?YVlWT1NXNW5WQmNSMkhBMUlsckNPYzNwdyt1bWtVZDBFWm9MQmVDV2pJb3k5?= =?utf-8?B?SmFyUHNRUzlwWTQ1bnpBWElrL1pmL0hlLzdabzBtY2dLTmZ1c3MwNWNWcU9w?= =?utf-8?B?OTlGbDBRbjI4Q2JZOHFDcUNubGpnaW1URjdNNGorYUhkU2x2c0JYSHRWYWJD?= =?utf-8?B?bTZxY1hubWcrL0ppSmF1NE9BSWlYT09jdUx5Z1BjQ0hSRnkrcmxlRWUxQ2F6?= =?utf-8?B?T1JXdU4yYnA0U0NiM3Rrd2JZeEtOOHdjMWdzdlZoaTJ2RmxhTUF2bVVnPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR12MB6101.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(1800799015)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NVVHV3kyM0tHSE1CTU83SDFGcVVkenRmcUpiQjVNcFYvUWdnWCtycHNnWlpn?= =?utf-8?B?VmNhWVYrQlVxclBvcHl5Z2FYZk42SDhKZDZTZWxacWwrUGcrRFkyL0VnN2JS?= =?utf-8?B?RlZBRmoxd2ZwVmgwTGdSUEw0dVBTeWFQZFBDYTQ4SE1wWVFqZWd4VjVCR05T?= =?utf-8?B?UElMTTFoZm96OHNNbXBidDR3YUxWYm1ScXY2d0daUFBiZlZFZ1JjK0gxZE5C?= =?utf-8?B?cjN5Z3JGaEdMajM2amk2SHBxUjliS2RyVnNxME1PaVZyVFZRRjZRSktzUU9W?= =?utf-8?B?a3k5Q0VRcXdJYjg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R09qYXpYaFFUNmxlMk51NFpvQ0E5?= =?utf-8?Q?fm2T6cGRPO8zLVx9Lrqad492j?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a47ff0da-b50b-4dea-3dba-08dc7ebc908e X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2024 02:19:12.5063 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OZkLUPxKOE4QHl5iohE/mMCUFpUgx1WCpaNzSHgx4d4Htlh8JMEG6Twh0MaotVmRTsqJDugVjY+I73p1EaFNbQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB9323 On 5/27/2024 8:36 PM, Luke D. Jones wrote: > Exposes the APU memory setting available on a few ASUS models such as > the ROG Ally. > > Signed-off-by: Luke D. Jones > --- > .../ABI/testing/sysfs-platform-asus-wmi | 8 ++ > drivers/platform/x86/asus-wmi.c | 109 ++++++++++++++++++ > include/linux/platform_data/x86/asus-wmi.h | 3 + > 3 files changed, 120 insertions(+) > > diff --git a/Documentation/ABI/testing/sysfs-platform-asus-wmi b/Documentation/ABI/testing/sysfs-platform-asus-wmi > index ac881e72e374..d221a3bc1a81 100644 > --- a/Documentation/ABI/testing/sysfs-platform-asus-wmi > +++ b/Documentation/ABI/testing/sysfs-platform-asus-wmi > @@ -245,3 +245,11 @@ Description: > Show the maximum performance and efficiency core countin format > 0x[E][P] where [E] is the efficiency core count, and [P] is > the perfromance core count. > + > +What: /sys/devices/platform//apu_mem > +Date: Jun 2024 > +KernelVersion: 6.11 > +Contact: "Luke Jones" > +Description: > + Set the maximum available system memory for the APU. > + * Min=0, Max=8 What is the unit? It seems like multiples of something? > diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c > index f62a36dfcd4b..4b5fbae8c563 100644 > --- a/drivers/platform/x86/asus-wmi.c > +++ b/drivers/platform/x86/asus-wmi.c > @@ -855,6 +855,112 @@ static DEVICE_ATTR_RW(cores_enabled); > WMI_SIMPLE_SHOW(cores_max, "0x%x\n", ASUS_WMI_DEVID_CORES_MAX); > static DEVICE_ATTR_RO(cores_max); > > +/* Device memory available to APU */ > + > +static ssize_t apu_mem_show(struct device *dev, > + struct device_attribute *attr, char *buf) > +{ > + struct asus_wmi *asus = dev_get_drvdata(dev); > + int err; > + u32 mem; > + > + err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_APU_MEM, &mem); > + if (err < 0) > + return err; > + > + switch (mem) { > + case 256: > + mem = 0; > + break; > + case 258: > + mem = 1; > + break; > + case 259: > + mem = 2; > + break; > + case 260: > + mem = 3; > + break; > + case 261: > + mem = 4; > + break; > + case 262: > + mem = 8; > + break; > + case 263: > + mem = 5; > + break; > + case 264: > + mem = 6; > + break; > + case 265: > + mem = 7; > + break; > + default: > + mem = 4; > + break; > + } > + > + return sysfs_emit(buf, "%d\n", mem); > +} > + > +static ssize_t apu_mem_store(struct device *dev, > + struct device_attribute *attr, > + const char *buf, size_t count) > +{ > + struct asus_wmi *asus = dev_get_drvdata(dev); > + int result, err; > + u32 mem; > + > + result = kstrtou32(buf, 10, &mem); > + if (result) > + return result; > + > + switch (mem) { > + case 0: > + mem = 0; > + break; > + case 1: > + mem = 258; > + break; > + case 2: > + mem = 259; > + break; > + case 3: > + mem = 260; > + break; > + case 4: > + mem = 261; > + break; > + case 5: > + mem = 263; > + break; > + case 6: > + mem = 264; > + break; > + case 7: > + mem = 265; > + break; > + case 8: > + mem = 262; Is case 8 a mistake, or intentionally out of order? > + break; > + default: > + return -EIO; > + } > + > + err = asus_wmi_set_devstate(ASUS_WMI_DEVID_APU_MEM, mem, &result); > + if (err) { > + pr_warn("Failed to set apu_mem: %d\n", err); > + return err; > + } > + > + pr_info("APU memory changed, reboot required\n"); If you're logging something into the logs for this, I'd say make it more useful. "APU memory changed to %d MB" > + sysfs_notify(&asus->platform_device->dev.kobj, NULL, "apu_mem"); So this is a case that the BIOS attributes API I mentioned before would be REALLY useful. There is a pending_reboot sysfs file that userspace can query to know if a given setting requires a reboot or not. Fwupd also uses this attribute to know to delay BIOS updates until the system has been rebooted. > + > + return count; > +} > +static DEVICE_ATTR_RW(apu_mem); > + > /* Tablet mode ****************************************************************/ > > static void asus_wmi_tablet_mode_get_state(struct asus_wmi *asus) > @@ -4100,6 +4206,7 @@ static struct attribute *platform_attributes[] = { > &dev_attr_panel_fhd.attr, > &dev_attr_cores_enabled.attr, > &dev_attr_cores_max.attr, > + &dev_attr_apu_mem.attr, > &dev_attr_mini_led_mode.attr, > &dev_attr_available_mini_led_mode.attr, > NULL > @@ -4176,6 +4283,8 @@ static umode_t asus_sysfs_is_visible(struct kobject *kobj, > else if (attr == &dev_attr_cores_enabled.attr > || attr == &dev_attr_cores_max.attr) > ok = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_CORES_SET); > + else if (attr == &dev_attr_apu_mem.attr) > + ok = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_APU_MEM); > else if (attr == &dev_attr_mini_led_mode.attr) > ok = asus->mini_led_dev_id != 0; > else if (attr == &dev_attr_available_mini_led_mode.attr) > diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h > index 5a56e7e97785..efe608861e55 100644 > --- a/include/linux/platform_data/x86/asus-wmi.h > +++ b/include/linux/platform_data/x86/asus-wmi.h > @@ -121,6 +121,9 @@ > /* Maximum Intel E-core and P-core availability */ > #define ASUS_WMI_DEVID_CORES_MAX 0x001200D3 > > +/* Set the memory available to the APU */ > +#define ASUS_WMI_DEVID_APU_MEM 0x000600C1 > + > /* MCU powersave mode */ > #define ASUS_WMI_DEVID_MCU_POWERSAVE 0x001200E2 >