From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D746C433EF for ; Tue, 21 Jun 2022 06:41:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345877AbiFUGlr (ORCPT ); Tue, 21 Jun 2022 02:41:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346045AbiFUGlq (ORCPT ); Tue, 21 Jun 2022 02:41:46 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C29BF1B791 for ; Mon, 20 Jun 2022 23:41:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655793702; x=1687329702; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=hYje46EBDaFdlrGMnQaMQ6Ysxoe8/yTy0r+3pYpxJGY=; b=GbJeH2UihOElKXDCZpD4PrD8wuaUjiaC6V6G0wZKEFOik/QawNlqbCsC nKw3fFXI0pZM8It0PBuiGTPcIbfUtHxq6F90V0cozCbCMUayreVFJIw5V 01bRLunJkD1JNrboskWWA2g5MfliZ6pAxVs5ESkgotj/LJa6p4/jOr3hg vPME4HUesPqwBrMURcrp30+2K7SXxGWzDeBtaLMstCQDKQuOOBOCAKLIP VkJp/gux9XpxMApP+829ffYkB4EQ2M2P33R4LX8W3/ehEGffQygKZ8hPg +bQpiozgRuzdArO4pnepM4Vb1MLlcKl4Aj67CByOfLRMkz0k1syZBfSMN A==; X-IronPort-AV: E=McAfee;i="6400,9594,10384"; a="280089488" X-IronPort-AV: E=Sophos;i="5.92,209,1650956400"; d="scan'208";a="280089488" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 23:41:42 -0700 X-IronPort-AV: E=Sophos;i="5.92,209,1650956400"; d="scan'208";a="614632530" Received: from adixit-mobl1.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.212.238.99]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2022 23:41:41 -0700 Date: Mon, 20 Jun 2022 23:41:41 -0700 Message-ID: <87bkumv7q2.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Guenter Roeck Cc: Badal Nilawar , intel-gfx@lists.freedesktop.org, anshuman.gupta@intel.com, jon.ewins@intel.com, riana.tauro@intel.com, linux-hwmon@vger.kernel.org Subject: Re: [PATCH 3/4] drm/i915/hwmon: Add HWMON power sensor support In-Reply-To: <4277d384-147a-6de4-abe3-3b64b9dae207@roeck-us.net> References: <20220620204649.894703-1-badal.nilawar@intel.com> <20220620204649.894703-4-badal.nilawar@intel.com> <4277d384-147a-6de4-abe3-3b64b9dae207@roeck-us.net> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org On Mon, 20 Jun 2022 13:58:49 -0700, Guenter Roeck wrote: > Hi Guenter, Thanks for taking a look. > > diff --git a/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon b/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon > > index 24c4b7477d51..945f472dd4a2 100644 > > --- a/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon > > +++ b/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon > > @@ -5,3 +5,23 @@ Contact: dri-devel@lists.freedesktop.org > > Description: RO. Current Voltage in millivolt. > > Only supported for particular Intel i915 graphics > > platforms. > > + > > +What: /sys/devices/.../hwmon/hwmon/power1_max > > +Date: June 2022 > > +KernelVersion: 5.19 > > +Contact: dri-devel@lists.freedesktop.org > > +Description: RW. Card reactive sustained (PL1/Tau) power limit in microwatts. > > + > > + The power controller will throttle the operating frequency > > + if the power averaged over a window (typically seconds) > > + exceeds this limit. > > + > > + Only supported for particular Intel i915 graphics platforms. > > + > > +What: /sys/devices/.../hwmon/hwmon/power1_max_default > > I don't immediately see the reason for not using the standard power1_cap > attribute, which is described as > > If power use rises above this limit, the > system should take action to reduce power use. > > and pretty much matches the description above. Sorry I believe you are referring to the description above which is for the standard power1_max attribute (as we have used it). The non-standard attribute is power1_max_default the description for which is below ("Card default power limit (default TDP setting)"). > > +Date: June 2022 > > +KernelVersion: 5.19 > > +Contact: dri-devel@lists.freedesktop.org > > +Description: RO. Card default power limit (default TDP setting). Actually we do not want to use custom hwmon attributes as far as possible and are looking for some guidance on which standard attributes which we should use instead. These are the power attributes we are interested in: the two above and another one which will come in a future patch: 1. PL1 (RW) https://www.hardwaretimes.com/intel-10th-gen-cpu-power-consumption-explained-pl1-pl2-and-tau/ 2. TDP (RO) https://en.wikipedia.org/wiki/Thermal_design_power 3. Tau (RW) https://www.hardwaretimes.com/intel-10th-gen-cpu-power-consumption-explained-pl1-pl2-and-tau/ Would you be able to suggest if there are standard hwmon attributes which we would be able to use for these three? We also want to use the read/write permissions as shown above. Thanks. -- Ashutosh