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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6DEFDC0219B for ; Tue, 11 Feb 2025 14:06:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E611710E2F8; Tue, 11 Feb 2025 14:06:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="lGijTlpV"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9298F10E2FE for ; Tue, 11 Feb 2025 14:06:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739282784; x=1770818784; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=eIe0o5NV7mXuQjirweSSjoBMBCb9t3j59qFhGwnD1aU=; b=lGijTlpVlj9dkoPjJvAMk3R9Csul9gjKo7aM+2NDjBQEwXPlhpnm8fLs ogypQ7zTuQC6+3sfM0XygurnbwyJmLm6nAf6aRsquIoGpG+hR15RuAjT3 uymhVilXBzJD6BHkSmGMpQZjUzyKQkXKPduWvAB2lkLXZ9irdKkUJwEY+ 22MrwnEAdSBu23UpIQiWuDF887OKdr/OLaY0W9whFAN4Wc1xZUL1174IO HSYifShJGWqv0F/YNUYS41kjid60oaHxxqy9ZNydg4T4gt3ZLlS0pdjTn gwCQ3dr6PUAWJiT3nYeSEMQX0nkDy+nFSzQPWCoDIxA1qhTj+8qjYboo1 Q==; X-CSE-ConnectionGUID: UKeWEaqrTYShV/WEJ+4tsA== X-CSE-MsgGUID: sRT+QA2YQUmHVs5aN85BNA== X-IronPort-AV: E=McAfee;i="6700,10204,11341"; a="43662012" X-IronPort-AV: E=Sophos;i="6.13,277,1732608000"; d="scan'208";a="43662012" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2025 06:06:24 -0800 X-CSE-ConnectionGUID: udLRBC2qRmiLbSWAdxA6/A== X-CSE-MsgGUID: k/3E0td6R+aC/iz/LaqLBA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="143437841" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa001.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2025 06:06:22 -0800 Date: Tue, 11 Feb 2025 16:06:19 +0200 From: Raag Jadav To: Andi Shyti Cc: lucas.demarchi@intel.com, rodrigo.vivi@intel.com, matthew.d.roper@intel.com, intel-xe@lists.freedesktop.org, anshuman.gupta@intel.com, riana.tauro@intel.com, badal.nilawar@intel.com, karthik.poosa@intel.com Subject: Re: [PATCH v1] drm/xe/hwmon: expose fan speed Message-ID: References: <20250210100515.2205584-1-raag.jadav@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Mon, Feb 10, 2025 at 05:15:04PM +0100, Andi Shyti wrote: > Hi Raag, > > On Mon, Feb 10, 2025 at 03:35:15PM +0530, Raag Jadav wrote: > > Add hwmon support for fan1_input, fan2_input and fan3_input attributes, > > which will expose fan speed of respective channels in RPM when supported > > by hardware. With this in place we can monitor fan speed using lm-sensors > > tool. > > > > Signed-off-by: Raag Jadav > > I think you've got the hang of it by now :-) Yeah, we always try to have fun even when we got it but it largely depends on subsystem. > Reviewed-by: Andi Shyti Awesome. > > +#define FAN_SPEED_CONTROL 0x7D > > +#define FSC_READ_NUM_FANS 0x4 > > + > > I don't really like the alignment here, I'd have preferred: > > ... 0x7D > ... 0x04 > > with the '0'. But you are being consistent with the header's > style, so it's OK. Yep, definitely got the hang. Raag