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 05F82EB64DC for ; Sun, 2 Jul 2023 01:32:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229781AbjGBBcB (ORCPT ); Sat, 1 Jul 2023 21:32:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjGBBcB (ORCPT ); Sat, 1 Jul 2023 21:32:01 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46D031725 for ; Sat, 1 Jul 2023 18:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688261517; x=1719797517; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=WaWpdNs6Yss4CgiVPJPwP6hM7A1CGRbCCD76xHjymQs=; b=FUPyfa2NGQSGURvw1P3Lb15hiyDiDeVwogJVNt47+fs+SiMMJ43Fkb46 iHh/9zx2GpcMQg+yqSgDr+T7e0Gn3T1vZI16z4gkgQwKI1VIKAlQfCdDL jx7nU4wvnGIE9/UCZCmWZidwugy5rmW/3EHfNPurbwEkwMWc2RUNj4mwR VdiiqiJHgCjft1lF1mf+xzEGS/s+XGXm8Djl3IPg604v3G4y6Zy4NhEhT LBuuM03aZrvzjyqjLdSC4nXEeiVlJuTd8r+he++KTyXbDQQgdXgB7hUUG qJdCEeLCNS/Z31qDq6EJKiTpe1TmP2s3ZYYC5WjNpMvYQ20NLpRAxtXDa g==; X-IronPort-AV: E=McAfee;i="6600,9927,10758"; a="347432217" X-IronPort-AV: E=Sophos;i="6.01,175,1684825200"; d="scan'208";a="347432217" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2023 18:31:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10758"; a="808171586" X-IronPort-AV: E=Sophos;i="6.01,175,1684825200"; d="scan'208";a="808171586" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.212.150.254]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2023 18:31:55 -0700 Date: Sat, 01 Jul 2023 18:31:32 -0700 Message-ID: <87ilb385fv.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Badal Nilawar Cc: , , , , , , Subject: Re: [PATCH v2 0/6] Add HWMON support for DGFX In-Reply-To: <20230627183043.2024530-1-badal.nilawar@intel.com> References: <20230627183043.2024530-1-badal.nilawar@intel.com> 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.2 (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 Tue, 27 Jun 2023 11:30:37 -0700, Badal Nilawar wrote: > Hi Badal, > This series adds the hwmon support on xe driver for DGFX Needs some discussion but I have a general comment on this series first. The implementation here follow what was done for i915. But how "hwmon attributes are defined" I think we should look at how this was done in other drm drivers, namely amdgpu and radeon. Look here (search for "hwmon_attributes"): drivers/gpu/drm/amd/pm/amdgpu_pm.c, and drivers/gpu/drm/radeon/radeon_pm.c Here the hwmon attribute definition is very similar to how general sysfs attributes are defined (they will just appear in hwmon directories) and does not carry baggage of the hwmon infrastructure (what i915 has). So my preference is to shift to this amd/radeon way for xe. There is also a separate discussion on whether to use hwmon sysfs for other custom attributes, as has been done in these other drm drivers, and using this light-weight method should help if we went this route too. Thanks. -- Ashutosh