Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp928045lqc; Fri, 8 Mar 2024 16:59:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUs348oOELSCR3hSSsNFv9AtSC+O8F38NPW4lXfUezswGx0Lfgqu/n+LJLJephzCd8/oTvLu2GxKM1NzH9t6VT4p+I5cmJ/Co4vjTQmcQ== X-Google-Smtp-Source: AGHT+IGg3xa3AF5pwg8BFKrViGcPzRmzocXec/zy9F7SuWWMfh7hoNTa9OnMANTeXFAjZ+GVvDcF X-Received: by 2002:a05:6808:1190:b0:3c2:fa1:332b with SMTP id j16-20020a056808119000b003c20fa1332bmr1062072oil.14.1709945941760; Fri, 08 Mar 2024 16:59:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709945941; cv=pass; d=google.com; s=arc-20160816; b=Yvd7cz1D9JFSG3VOZmnNi3rXG9jqq5s4T38yNo7Fri9+qccWx3X9rtKubPF0AbZqbC tqStxGOb83sjkj2rtAfF7/lpHLn7j3hZ6YW15E5SsNskSxrFfuHIgE8RJYk1c3uxyiWj XDG7uWRQcuFYrlXBxi0PmoM171ly0+o5VMWDRkTnOI8gGjCifavKEFp/qh0FT1eswkvb jffn12STW75LFYhxS9vvbfy/LrMcwQOVPDIUf0k8ATvo4SAQJ4Jgd29jNJEfLi/k6iSO z4qoWva0Nd4Ey61zOpEhhdfgKsqzj00lRPTN3RbBi6U5Dt+XIZizrrrxevlcZRVhRIEl g4qg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=xDWvfMdJ3k4o8SXiIRC+47pnVYnjH2gTOg0JuB9vFCg=; fh=O631CdiNlh0oPOkXEgufMm1BjeHGCFwmTyiuMwIUDyo=; b=yTx7PlT79dWR5hq68PIKwwpV3QF9Gs1xaQU2lc0LJYfNFYHDXoBrCyHRmiweekbxmM rrqVyB9CyI0W7VhudiWIKkywL9+ligzxr0nQmMtLY+uttNWa9YFYBIzAUdJXNCd8q9qR sB9xnR+ibpLPvI0C7eylWd7zJOz8D/g2hpS9zNrsZ6UmX80DquSrM1d6Iv3eI/Fd53QI +r6bc1p8WjwIP61dtACImMd5EaWigtjx8BmV46yreo5SHv/MhDRUmQ0LWkJlr1s6Ft9d uRbfc28wjUnDaSdgW73FaucS7l6FRyD+Unu8sFz4dAl38cTbJmDNEgSAJLOJh3ACmzFz Ebgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dLg6qpQG; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-97713-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97713-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 62-20020a630241000000b005dbf27229edsi532544pgc.290.2024.03.08.16.59.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 16:59:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97713-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dLg6qpQG; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-97713-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97713-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A99AEB223E0 for ; Sat, 9 Mar 2024 00:58:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 568EB15BA; Sat, 9 Mar 2024 00:58:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dLg6qpQG" Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAC2AA29; Sat, 9 Mar 2024 00:58:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709945929; cv=none; b=GIsDdJrMFrTm/HZiUvOi0X9UPoA5AAaKOdzXUqiAK547w2clC4/0C3fgqQWCv7FA6H+ftlfVvMplNf6ivzS3f0ae4lyTiEsmwZ23Ps6aFffsGAcHwxK3c3GP+gNqcVpsUDKctA42L+aw+88HpJ7Xg5TviwwMw1Q1zmsEfS32Cao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709945929; c=relaxed/simple; bh=zJ6Nw5yeQAp6df7eL+ihHG2GLLuX2YiQLwEPcFBAKB8=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=aCqrOoK6CwBCMYWxDvfQShaKe54PpSwXWCOEDH+Xaoe8GxdExL/IPDMWBjvx4OXzwe77HaF7MqjpZxAs2DWiHq9b5PRGNJLxJM97ItTRWfzn0V7oVNXe/JVa/Cz2vAbUd9r0x/5oWOOZjs7pgfIENm0XUmOs/5l1GyMH3898bM0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dLg6qpQG; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-412e68b8594so19382235e9.1; Fri, 08 Mar 2024 16:58:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709945926; x=1710550726; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=xDWvfMdJ3k4o8SXiIRC+47pnVYnjH2gTOg0JuB9vFCg=; b=dLg6qpQGSlWaCFlSXCCRrg8+a4n0b+0TBXcw8HDJy8Xu2QldfBbz6qQkNzUdEzVv0v /TKenoeZbugD/c/llUIh6afgOD2b1CLOPmJ5xAKV0hgkcHpLHDbUkEKurNSSHwu+qz9Y Scj6/ETyU+fizQ2CfbpqEJbZmfFblyQqTNnNb/uqaxLnXM2d3otrEyzFuX5G5HIP3oNo raUJ9uea/6GAe1eT0U/1nX5fBFNZhzYQcN8KaJwg25nMvFPMIoYpvJdpQqCKrDQWkRU+ i5yaxbLr9FiqW4sgrs3qHoP9KllsLV5NUH7FVAeo14Nrir2pZFJJcf+rp+j4c2QsK8wD 8CkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709945926; x=1710550726; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xDWvfMdJ3k4o8SXiIRC+47pnVYnjH2gTOg0JuB9vFCg=; b=hE2tuogyYZuzmnohBjXs9UDhkwcKAzh0DZFX6Oh3mUuNGRRkhOtPa40A6pHVkfXQ/7 wsCRfUa1f7rQfY4PuAiExMEqesXGbAEpbxrTOWnovMSPEuh1kV9m4+6pL+K4XphseGuX dDPAboqVg2aTtE3Xg5R/RIlGtYPuKYZnxLhg4RTyIYJBuFLy26kUf5a4QNIoPh5PZxBn r3rFEW5ipU4KkPV7QV0H0UoAraSNz7x+lmjixkofUVF6qnV0sIxBMnD10OD0jVMD8Mh1 I57vtiaflDFHpk6Gc6iTRAT15f5x6/5zEclAc82ItwjhCDZCHMVVNm7QtYiTRIsUhhoE E6lw== X-Forwarded-Encrypted: i=1; AJvYcCXufc7G6N+Z5e6nOgOrA4Vb1hL7cgHSS3SK14xbfV8I1SfakBh2ke56bVgqXqjG9ts9Nl/2zzXHHbSLD78KU8bhHKKek05bPdnER7btxuVkcXL1gM/tLKCAIu0N+pvTxm/qcAu1odBm5WJbvyVd2vJgkQ== X-Gm-Message-State: AOJu0YweQ/HnVioDK2MuXEjZqnrS1TZ/FxNTBcF6o3MXnnotVCtvAFWb sY/00GYjGEQI35FBla6FNvMz4xbaZg9CS+2X4ngDdz3NSgb0TarH X-Received: by 2002:a05:600c:4f47:b0:413:812:ce7b with SMTP id m7-20020a05600c4f4700b004130812ce7bmr532458wmq.24.1709945926069; Fri, 08 Mar 2024 16:58:46 -0800 (PST) Received: from ?IPV6:2a02:8071:b783:140:927c:82ba:d32d:99c1? ([2a02:8071:b783:140:927c:82ba:d32d:99c1]) by smtp.gmail.com with ESMTPSA id q17-20020adffed1000000b0033cf5094fcesm639665wrs.36.2024.03.08.16.58.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Mar 2024 16:58:45 -0800 (PST) Message-ID: Date: Sat, 9 Mar 2024 01:58:47 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/1] platform/surface: platform_profile: add fan profile switching Content-Language: en-US To: Ivor Wanders , Hans de Goede , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240302170147.13026-1-ivor@iwanders.net> From: Maximilian Luz In-Reply-To: <20240302170147.13026-1-ivor@iwanders.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 3/2/24 18:01, Ivor Wanders wrote: > This patch adds functionality that switches the fan profile when the > platform profile is switched on the Microsoft Surface Pro 9. > > Previously, the fan profile was not changed and that results in poor > thermal performance. This makes the behaviour and functionality identical > to what the Windows drivers do. > > A plot of the different responses to system load, as well as recordings > from the SSAM bus can be found at [1]. Based on discussions with > Maximilian Luz there this patch proposes the following changes: > > In surface_aggregator_registry: > - Rename ssam_node_tmp_pprof to ssam_node_tmp_perf_profile for clarity. > - Introduce ssam_node_tmp_perf_profile_with_fan that has the has_fan > boolean property set. > - Use the new ssam_node_tmp_perf_profile_with_fan for the Surface Pro 9. > > In the platform profile module: > - Rename ssam_tmp_profile_device to ssam_platform_profile_device to make it > clear it handles more than just the TMP subsystem. > - Rename the enum conversion method to make distinction between TMP and FAN > clear. > - Add enum and set function & request for the fan profile. > - Ensure that if the module's has_fan boolean is true, the fan profile is > switched whenever the platform profile changes. > > > [1]: https://github.com/linux-surface/kernel/pull/145 > > Ivor Wanders (1): > platform/surface: platform_profile: add fan profile switching > > .../surface/surface_aggregator_registry.c | 36 +++++--- > .../surface/surface_platform_profile.c | 86 ++++++++++++++++--- > 2 files changed, 99 insertions(+), 23 deletions(-) > Looks good to me. Reviewed-by: Maximilian Luz