From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.112 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796130663; b=K6hu74LMBYW+1SNQsbIeiQvQKGu4lg68rVYiSH0XtTmXU55gFKrQTrdzJi2fAzpUIRqK QfXdS4fD9iu0S7R2/LHkMa7PMur3YkNWBoXPg1HqralFkhs7T5OpBgaaaOLYdyX7om99D dkXFdEWQ/NYaDh7MtzXOhyaIAsW7VhEmfQWa52XsaawyfPa/vHMMRL74jsyms9sZpC8/f Nh7R+2G9hc5/sPf+qwrmZHRBbiBBKro39jIeJxOe7QilFKM2ZLvZSMJZ5+zeT7g+gc1H6 9nOZ0uwZFNJXh1tz6tOB+N48kbq9sWQ6sKwp30xhiMIexWigOnJMDh4kVsqMhkGdn9A== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796130663; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:Content-Type; bh=CcSwom3LBpMU47HXagE29hU7O/MOw6RhHRQSprNZzVU=; b=tQdz1x9v9YjAPl98/HfU3p1wZ8EPodll7EiY4in/1GZlefjCj+AusM6SmU3xtn/L1aC4 3xHnb54K4WjN1TLWGngzmgxrFKjdG4dzyljq92kUxN2iV1vks/nRajaFZZ1KLYwnooerx Pbm/hm0UPyVxNezkRQ62cf8EdVN/2QoOmwb2V+FqiNIaAXx8tp+A5BG1hay+Ufxgfd1QD W2ZKN3l8AZWcywmsXTrdCadOCPI0CrXSwxz08pmtXnpN+3ciy3uB6V1uODoOjzjC+QJze yU4ecr+48Ox0U7ZZlSRLd9DbHRGX2IK5Jew5Rw45rkJRWPWpuLxiYjQXfEtSMaopiNA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=a8cn6KFR; arc=pass header.oldest-pass=0 smtp.remote-ip=165.173.182.112 Received: from sender5-pp-f112.zoho.com (sender5-pp-f112.zoho.com [165.173.182.112]) (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 238AE606A31A; Tue, 1 Dec 2026 13:11:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 238AE606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=a8cn6KFR ARC-Seal: i=1; a=rsa-sha256; t=1796130632; cv=none; d=zohomail.com; s=zohoarc; b=TqHS0Nzg5e9LISW6WvR6JE41TFmbvQUUqeIzOWUo8uVKEeRW8tKKNMYlo6EZ8p6wKwyXDGBREp+XhvBn2ZAPXc3F5/xL/h5rRI5Bl8HVwN+5Rlty4/e4kttsCy/N8tTkDpXcDmyPTPK66LJRZG8B5Sc49VkMXiXFPuXay8gU1Tk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796130632; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=CcSwom3LBpMU47HXagE29hU7O/MOw6RhHRQSprNZzVU=; b=WEWQiUa97mPrzGy0bKQdKyMm6XJ0NK4XBeTh2jqbNEVMKIhryfSgs3MqvQFXgR3xmM0QSCBB05BmspIdcOWi/5RvGfbxitBPSe8YTOgf3U/jMxj1vSUpIVtmbEkonj0XWgB1d5TwuNsa+ap9hzMTI1vXGARSuLlrAWs13r3LILg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=nicolas.frattaroli@collabora.com; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=a8cn6KFRMF9L7Jqs805BFRXhlCIUWKoP4Q/xiNudedbJCL2iml8dJwviIaUJZt2lYlybIFTlfSkUmvbLBewh+Hz9HFNcBQ9/QqInHueSi1Amz9Ah0+IkTaFkTqWaBdAZbaDUNco0ZCAutWWMdgSCviurqS0rWOFF6LQlgAMW1lU=; c=relaxed/relaxed; s=zohomail; d=collabora.com; v=1; bh=CcSwom3LBpMU47HXagE29hU7O/MOw6RhHRQSprNZzVU=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 17961306303421005.939790372208; Tue, 1 Dec 2026 05:10:30 -0800 (PST) From: Nicolas Frattaroli To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Ulf Hansson , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Alexandre Mergnat Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pm@vger.kernel.org, Alexandre Mergnat , Moudy Ho Subject: Re: [PATCH 0/3] Add the MT8196 GPU temperature sensor Date: Tue, 01 Dec 2026 14:10:25 +0100 Message-ID: In-Reply-To: <20261130-mtk-mfg-thermal-v1-0-e0617e26f902@baylibre.com> References: <20261130-mtk-mfg-thermal-v1-0-e0617e26f902@baylibre.com> X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Commenting as someone with some experience with the hardware On Monday, 30 November 2026 15:19:30 Central European Standard Time Alexandre Mergnat wrote: > No mainline driver reports the temperature of the MT8196 GPU, so a > thermal zone cannot throttle the GPU when it heats up. This series > takes the temperature that the GPUEB, the microcontroller managing > the GPU power and frequency, reports to the kernel, and makes it a > thermal sensor that a device tree thermal zone can use. > > The usual way to get this temperature would be to extend the driver of > the SoC thermal controller (LVTS) to its GPU sensors. This series uses > the value that the GPU firmware reports instead, because the firmware > already reads these sensors. Makes sense. We also have to do this for clocks here iirc, and the shader-present efuse of course. While it would've been nice to have the "real" source of that info, proxying it through the GPUEB firmware is the most reliable path since we don't know what other clocks and things it uses to get those ready, much less the addresses. > Any read clears the flag that marks a new > measurement, so this flag cannot be shared by two readers: a read by > one makes the other miss that a new measurement is there. A prototype > Linux reader of these sensors often found the flag already cleared > without having read it. Okay yeah that's extra lovely then and reinforces the need to do this through the firmware. > On the test board, the value that the firmware > reported stayed within one degree of the average of these sensors. Is any sensor compensation already done as part of the GPUEB firmware? Usually hardware has some factory calibration fused into OTP registers, though I don't know whether that's the case specifically for MT8196. > > Signed-off-by: Alexandre Mergnat > --- > Alexandre Mergnat (2): > pmdomain: mediatek: mfg: Expose GPU temperature > thermal/drivers/mediatek: Add GPUEB thermal driver > > Moudy Ho (1): > dt-bindings: power: mt8196-gpufreq: Add #thermal-sensor-cells > > .../bindings/power/mediatek,mt8196-gpufreq.yaml | 4 ++ > drivers/pmdomain/mediatek/Kconfig | 1 + > drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c | 29 ++++++++++++ > drivers/thermal/mediatek/Kconfig | 9 ++++ > drivers/thermal/mediatek/Makefile | 1 + > drivers/thermal/mediatek/gpueb_thermal.c | 52 ++++++++++++++++++++++ > include/linux/soc/mediatek/mtk-mfg.h | 13 ++++++ > 7 files changed, 109 insertions(+) > --- > base-commit: f66469d9905b39d2c260a15d7d6db450f4db67c1 > change-id: 20261115-mtk-mfg-thermal-9f4a7cc786ae > > Best regards, > -- > Alexandre Mergnat > > ACK from me for the general approach, as for implementation I haven't looked too closely at it but am wondering whether this also means I messed up when making the mtk-mfg-pmdomain.c driver a clock provider, instead of having a clock provider driver suckling on an auxiliary bus there. Any thoughts on whether that should be refactored, i.e. if there's a benefit? Kind regards, Nicolas Frattaroli