From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 216CA606A322 for ; Wed, 2 Dec 2026 19:55:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=CjYU58/I Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA7FC1124AD; Wed, 2 Dec 2026 19:55:34 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id EBDB31124AC for ; Wed, 2 Dec 2026 19:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796241329; x=1827777329; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=1Wj/d1fExcWUzGzFixI00a5yP3ZEvffZFZ/h2/MTs5s=; b=CjYU58/IP1PB9KCMIfYfznAqmvRFzqQunWXejWA4PyDApOAzShYmiM5g mEUTz7epLkmXpJ/RdveTc9pvRw332yCvW3nOqPx6uEE5ecx/cHMoYly1Y 5ULAkAW/sEP05Uk3JSuWtr2f9VkTFCnaOmaH6EcFktqewhC0GwKxVnXlZ TOGqyPw77sHsukxAWgXMmXsjMFVIgJ9NEzlY+wRMdCpM8/Ulw8D3w9xse 9Q/sSDNfLJfWJZC882bSxQa07dXxowiDi9TkIQn8Aaewp/O3rkVzJh5Hn /fUU2ocRwXeu5cjIEXc3NE+3aB+MTWI2Z+y8qH8b0Zc/LiXUwghGSqKwX Q==; X-CSE-ConnectionGUID: UKiNsrRBSm63ZIP1kMslig== X-CSE-MsgGUID: l54SCasUQbmDGnWXuj6Jzw== X-IronPort-AV: E=McAfee;i="6800,10657,11984"; a="5076261" X-IronPort-AV: E=Sophos;i="6.27,247,1787036400"; d="scan'208";a="5076261" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2026 11:55:28 -0800 X-CSE-ConnectionGUID: xPSh32+UR5G3nb+71t3jww== X-CSE-MsgGUID: FXH6RJj2QD2PEqPnJ24Suw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,247,1787036400"; d="scan'208";a="13713762" Received: from fmsmsx902.amr.corp.intel.com ([10.18.126.91]) by fmviesa005.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2026 11:55:28 -0800 Received: from FMSMSX903.amr.corp.intel.com (10.18.126.92) by fmsmsx902.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Wed, 2 Dec 2026 11:55:27 -0800 Received: from fmsedg903.ED.cps.intel.com (10.1.192.145) by FMSMSX903.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57 via Frontend Transport; Wed, 2 Dec 2026 11:55:27 -0800 Received: from CY3PR05CU001.outbound.protection.outlook.com (40.93.201.49) by edgegateway.intel.com (192.55.55.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Wed, 2 Dec 2026 11:55:26 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=i23BbqEO4Q3yG7xXiQO/eDBw1kHzMRBx6FUUGmQ7rBzslU6Bo7fbHyrR5Zgk9B5ApGMIBICcP/m3XAchHA/gxx/sBcvhtX24wwvfaLxk40O6f9/rhnU2MqiKPr5GrEMW5ZkEYrtgrIKVpGu4jDhDr0TOoapuafbcYDABSwokbgQqxuGig2oQEiBo/n79h60W8SmNzjaw5ng0VwfWgwmMSeo1xjb1A1yor+gVVrFqpoRv9UrytxhRVpStPcIur+kJ6qBPhC8SFfcgY8lAYcRSUeZ1FW62Xhi+z2xIy0rJYzEkhQaDVrETU0lHKsN6DcipslCJbM0cVGyN/ZzhJzKTpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=1Wj/d1fExcWUzGzFixI00a5yP3ZEvffZFZ/h2/MTs5s=; b=wMylxPtMHOFimCuLSn+eKTV5OfCLDrvZQ2KSTpdYV0WSzL1bu8lE3WkmNZASAeB0VqRvomCttrWo8efzGPNA/KeQZI1uJyiM54sH4zjgOvVoCaHK/yuFQjvrp/8p2Y3WRISH/s7p+tdsXmO+wzEOx5iXc+o/boDWa+B+YPjdTDswONph1rocOv8GOsNdsA71SfHRy8duRChyPMkanDGqvGWgnH/i7A+8nhnr1Av7CraA00PXiyYzcwUjG113W6I32cKqMRMSAO5Icg0pzU7t3g/lEhVHah3lW1H+CyweKRNSb4CUo9+edYMa8UoGBXe8HiNh85knlZsfho6T3olvjw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS6PR11MB087165.namprd11.prod.outlook.com (2603:10b6:8:4c4::7) by DS3PR11MB020596.namprd11.prod.outlook.com (2603:10b6:8:43a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.10; Wed, 2 Dec 2026 19:55:23 +0000 Received: from DS6PR11MB087165.namprd11.prod.outlook.com ([fe80::4223:7b03:1329:265f]) by DS6PR11MB087165.namprd11.prod.outlook.com ([fe80::4223:7b03:1329:265f%6]) with mapi id 15.21.0688.009; Wed, 2 Dec 2026 19:55:23 +0000 Message-ID: Date: Thu, 3 Dec 2026 01:25:15 +0530 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 11/11] drm/xe/hwmon: Add kernel-doc for fan control To: Karthik Poosa , CC: , , , References: <20261202195221.1862825-1-karthik.poosa@intel.com> <20261202195221.1862825-12-karthik.poosa@intel.com> Content-Language: en-US From: "Purkait, Soham" In-Reply-To: <20261202195221.1862825-12-karthik.poosa@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MA5P287CA0082.INDP287.PROD.OUTLOOK.COM (2603:1096:a01:1d8::12) To DS6PR11MB087165.namprd11.prod.outlook.com (2603:10b6:8:4c4::7) X-Archived-By: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS6PR11MB087165:EE_|DS3PR11MB020596:EE_ X-MS-Office365-Filtering-Correlation-Id: 2028f408-90fb-48a4-b3e9-08df50ae33e2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|23010399003|56012099006|261021123027099003|261028144727099003|261021121427099003|261026140227099003|261022105027099003|261022075727099003|261102123227099003|10067099003|261026121527099003|261009223027099003|22082099003|18002099003|4143699003|11063799006|5023799004|6133799003|3023799007; X-Microsoft-Antispam-Message-Info: 9WXdjt6z9SL2Esg21EFK0gTCbAuxVlwpMoJ8d3y9WvSHIzzfNG6KE2yAR5nKDyGPuHDVi4JHujdnRlwHhuHKcY1DkD5LsFd6G8v0dE/oF/V22jmCZTQRk+cxIfZr2/LzH1mJl586r8h+2IL6JQbuTd8JRIOLKAAMDcIyGqx/2lQeSNokt0D0ZPA5MNX8BX5iBb6xRqaZGci8IlWnRAuO5Clb5PNN9TasIii/M0sIttciILnetdnIZ085nrklsZC8ILLUiDX37H39l07gh9LQ0+Q3thZj+Hqrh+wi94nv6P24qr3HV1dDnU19py/IVyBthqWvFDZDMfJo3vo7C2g0PxzzWSXxW/PjVfACNUATOnNexYfwA9w+CawUUsu7VVmlTyEztrQCcgTQQZUplSSwC3DgRAkHolKxCVoRzLhXxR6SS1FTc8p0LYmmWhhWKq8ToOh3IYMgRs9lSYy7jlrwpApH5ND7Jx7ushkwd1bdfAJ4djIpUkohwE7vUwiXia4dkLE5iMQQukkkDzcLevjRXJNiataBtM5ISKmKcgO6SoUsg4wOC82gsJbVL1z5ZK3KOuAqNGdBN0AczwKblzFIjddhRU402nWecc2cuDSVI/f5lJewBX7amjgKnc0qwh3XOPX8stXN9IaxKMKmiRvi/JPlXque5voWvweJh2zhFS4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS6PR11MB087165.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(23010399003)(56012099006)(261021123027099003)(261028144727099003)(261021121427099003)(261026140227099003)(261022105027099003)(261022075727099003)(261102123227099003)(10067099003)(261026121527099003)(261009223027099003)(22082099003)(18002099003)(4143699003)(11063799006)(5023799004)(6133799003)(3023799007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RkZ0c0VOVThwS2RVYWlTNTUvRzVjR0F1eW15ZWphYlhXN1NrUmNEN3dZZjFH?= =?utf-8?B?WVZEVjhqT0pMcnZTNE55aFRtR2tDR3lOQXFQZWFQTXdEQ1kzVTdaaVFWUE52?= =?utf-8?B?a3N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QrczBoUXc2?= =?utf-8?B?cHFPQ0VYTmI3YXlnQkxNMFVmZjZkeDRtTlZHRGRHREVoRW5ucjVYdlo0cXNk?= =?utf-8?B?Ymo1Q1V5bUxDZjg1NXlMR1JTZGh4bmtjTHl4WU8yWWJ2czRFVXMwcEtTUnhX?= =?utf-8?B?aWhDeHRVSEdjU3VnMG02NEpjUXZWc1hvTG1QS2VZZ3hiUjFNWVNFY2Zsazdj?= =?utf-8?B?c0x1VjlEV0FMME14VE02WVZOQVVEVXYxeUNrOHB1eXJZTGk3K0R4YU5LRnVO?= =?utf-8?B?WkxBYkpQTHJ4VHdKSGsxUk9kOXBETUN5YlE1dFBQVzFsNjVTbG1xSlZDMVcw?= =?utf-8?B?dlpqSzdQL09CZ1lxRVQ4bUNvYldORC9PU2ZZOHgrcS9vTnRsdFJxSmtrWGxa?= =?utf-8?B?K1d5QVhuNFFRa2ZCcWxyRGVnVHFld0R1N00rWUFLdVh1L2h6cEdtUT09?= X-Exchange-RoutingPolicyChecked: X6sZX5EwoA1N8tPtO6PCupzVrLuHzjlsjBkFbf6HffrZvemphJ6jjk+/u7QhoPfzOqWTq7bD1kilF9EeTlrVf1LjErrZ6xZmqFbM+YKXRjc9yNjLkTcEQPwQWPco1v6EuzPZ51Mh0xtG/JkUIH6M1db8aT9eIug8fHLNgVjTMM7AXCFjlyeP4AovF6QBaH2wulPxtIwUUONSdjyVnA6OMGOtjvuMTRVH/TmDwaLDXWQF6LnspFAcRHkZ+J8UegdP+Fl3HXlcoybQialqFWKwurU2KZIY8XJoVx2uA6ximUF79VoYqbYNtAl+aXN//O0iPzRgs7okOjgY/s1Krw4Fcg== X-MS-Exchange-CrossTenant-Network-Message-Id: 2028f408-90fb-48a4-b3e9-08df50ae33e2 X-MS-Exchange-CrossTenant-AuthSource: DS6PR11MB087165.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2026 19:55:23.8177 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rMDrXiQaZ4Hn1JxvHW7zhYwj8A30ZcQ3EjL4N9xyQAH9DMMNSnyN/iMhn2MVqOHObchDKYGDIYnrKoZcb63m7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS3PR11MB020596 X-OriginatorOrg: intel.com X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Intel-xe" X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 03-12-2026 01:22, Karthik Poosa wrote: > Add kernel-doc for xe hwmon fan control and describe the fan control > model built around firmware stock tables and driver-managed user tables. > > Document the exposed sysfs files for fan speed, maximum speed, pwm > control, pwm mode selection, and per-point fan curve temperature/PWM > programming. > > This makes the hwmon fan control userspace interface easier to discover > and understand. > > Reviewed-by: Rodrigo Vivi > Signed-off-by: Karthik Poosa > --- > > v2: > -Update the fan-control documentation to describe late-binding visibility > refresh, staged point-prefix curves, suspended and restored user tables, > and TjMax fan-control preservation across suspend and resume. > > v3: > - Update pwmN that it reports active pwm duty cycle. > - Update pwmN_enable that it return -ENODATA when control mode is > uninitialized. > > drivers/gpu/drm/xe/xe_hwmon.c | 81 +++++++++++++++++++++++++++++++++++ > 1 file changed, 81 insertions(+) > > diff --git a/drivers/gpu/drm/xe/xe_hwmon.c b/drivers/gpu/drm/xe/xe_hwmon.c > index 0407f6f1ab45..3e9a5d2e47c9 100644 > --- a/drivers/gpu/drm/xe/xe_hwmon.c > +++ b/drivers/gpu/drm/xe/xe_hwmon.c > @@ -141,6 +141,87 @@ struct xe_hwmon_energy_info { > long accum_energy; > }; > > +/** > + * DOC: Xe fan control > + * > + * Xe fan control is exposed through the hwmon pwm and fan interfaces when the > + * platform advertises PCODE-backed fan management support. > + * > + * Attribute visibility is determined during hwmon registration. ``fanN_max`` > + * requires maximum fan speed data, while ``pwmN``, ``pwmN_enable`` and the > + * ``pwmN_auto_pointM_*`` curve files require a readable stock fan table with at > + * least two points. Late binding refreshes cached data for existing fans but > + * does not create attributes that were hidden at registration. The stock table > + * can change with the late bound firmware; if a complete table cannot be read, > + * the previous one is kept. > + * > + * The implementation tracks two fan tables per fan: > + * > + * - A stock table read from firmware through PCODE. > + * - A user table cached in the driver and programmed back through PCODE. > + * > + * Late-bound fan firmware refreshes the stock table and maximum fan speed. > + * Active manual and full-speed user tables are re-programmed after the refresh, > + * while the cached user curve is preserved. Active manual and full-speed fan > + * state is also restored across system suspend, runtime D3cold, and FLR. TjMax > + * fan control is independently saved and restored across those state-loss > + * transitions. D3hot runtime suspend does not lose firmware state and does not > + * require TjMax or fan-table restoration. > + * > + * The pwmN_enable sysfs value selects how those tables are used: > + * > + * - 0 (``XE_FAN_PWM_FULL_SPEED``) programs the user table at 100 percent duty > + * cycle as a full-speed override. The cached user curve is kept. > + * - 1 (``XE_FAN_PWM_MANUAL_USER_TABLE``) enables the user table for manual > + * control. Without a cached user curve, it starts from the stock table. > + * - 2 (``XE_FAN_PWM_AUTO_STOCK_TABLE``) restores automatic control using the > + * stock firmware table. The cached user curve is kept for a later switch to > + * mode 1. > + * > + * Any table programmed by modes 0 and 1 must meet the curve rules below; > + * otherwise the mode switch fails with -EINVAL. > + * > + * The fan-control sysfs files are: > + * > + * - ``fanN_input`` reports the measured fan speed in RPM. > + * - ``fanN_max`` reports the maximum supported fan speed in RPM. > + * - ``pwmN`` reports the active PWM duty cycle in the hwmon 0..255 range. > + * Writes set a fixed duty cycle in manual mode. > + * - ``pwmN_enable`` selects the mode described above. > + * - ``pwmN_auto_pointM_temp`` reports the temperature of point ``M`` of the > + * stock table in mode 2 or of the user table otherwise, in millidegrees > + * Celsius. Writes stage the user-table point. > + * - ``pwmN_auto_pointM_pwm`` reports the PWM value of point ``M`` of the same > + * table in the hwmon 0..255 range. Writes stage the user-table point. > + * > + * Writes to ``pwmN``, ``pwmN_auto_pointM_temp`` and ``pwmN_auto_pointM_pwm`` > + * are accepted only while ``pwmN_enable`` is 1; otherwise they fail with > + * -EINVAL. Firmware stores duty cycle in percent, so PWM values read back > + * rounded to the nearest percent step. Nonzero curve PWM writes are kept at > + * least 1 percent so rounding cannot turn them into an end marker. > + * > + * Writes to ``pwmN_auto_pointM_temp`` and ``pwmN_auto_pointM_pwm`` are staged > + * in the driver, so intermediate writes never reach firmware as a partial > + * curve. Each write fills the selected point, and the staged curve is committed > + * once a complete point prefix ends with (0, 0) or reaches the last supported > + * point. The (0, 0) end marker is not included in the committed curve. > + * A curve must have at least two points, temperature must increase and PWM > + * must not decrease from one point to the next; otherwise the completing write > + * fails with -EINVAL. Staged temperature and PWM values are cleared after the > + * completing write, whether firmware accepts or rejects the curve. > + * Firmware acceptance publishes the staged curve in the cached user table; > + * rejection keeps the previously cached user curve. > + * > + * Writes to ``pwmN`` replace the user table with a two-point table at a > + * constant duty cycle. > + * > + * If a user-table write is not accepted by firmware, the fan falls back to > + * mode 2 and the previously cached user curve is kept. If that fallback also > + * fails, the fan control mode is not established and reads of ``pwmN``, > + * ``pwmN_enable`` and ``pwmN_auto_pointM_*`` fail with -ENODATA while the > + * control mode is uninitialized. > + */ > + > /** > * enum xe_fan_pwm_enable_mode - fan PWM enable modes > */ LGTM: Reviewed-by: Soham Purkait