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 A5CE5EB64D9 for ; Sun, 2 Jul 2023 16:10:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D7C010E010; Sun, 2 Jul 2023 16:10:59 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id C326210E010 for ; Sun, 2 Jul 2023 16:10:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688314257; x=1719850257; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=8hQhlQBbsesrJ19kkSzpxWOMdjQTzS2/DmMBgx09RLY=; b=OLGhXCi+ksP1vh+g+d70PBSBC7NUz/hG2ao61HHTmvnMGNbj3Hi1V2dk YDDM/OrWuWtYKP57QhaT4sbCkdYFlCMSKS1XlMk2U1Op+gHYe+CGiq53m VMhWo3zeKDpxHtUEpY4chmkmczl/dndnhtqn5VdfRMd7172Tf5bFLYSW7 PTgAUTbk9zHxkPJXNYEnhCZRtbz1C72QWMSwFHnqvAnXh7lXRaiI/wg/2 1mpDRl4Gdvsua6Wq9O8ZgOzn91sFD2Gofw+pxOkZKAPPChARkeUpX4cV1 Y04GphV0ngH8gukP5KTzWcYoOtc6hP2q3oLewFHK6bs0wvDtUWTSUSTq0 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10759"; a="361566608" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="361566608" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2023 09:10:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10759"; a="695558346" X-IronPort-AV: E=Sophos;i="6.01,176,1684825200"; d="scan'208";a="695558346" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.255.228.125]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2023 09:10:55 -0700 Date: Sun, 02 Jul 2023 08:57:17 -0700 Message-ID: <874jmme276.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Guenter Roeck In-Reply-To: <5aa93c3a-a4c5-9ca3-6ecd-38cef9f59605@roeck-us.net> References: <20230627183043.2024530-1-badal.nilawar@intel.com> <87ilb385fv.wl-ashutosh.dixit@intel.com> <5aa93c3a-a4c5-9ca3-6ecd-38cef9f59605@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.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 Subject: Re: [Intel-xe] [PATCH v2 0/6] Add HWMON support for DGFX 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: , Cc: linux-hwmon@vger.kernel.org, intel-xe@lists.freedesktop.org Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Sat, 01 Jul 2023 20:02:51 -0700, Guenter Roeck wrote: > > On 7/1/23 18:31, Dixit, Ashutosh wrote: > > 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. > > > > You mean your preference is to use a deprecated hardware monitoring > registration function and to explicitly violate the following statement > from Documentation/hwmon/hwmon-kernel-api.rst ? > > All other hardware monitoring device registration functions are deprecated > and must not be used in new drivers. I missed that, but since we also have this in ddaefa209c4a ("hwmon: Make chip parameter for with_info API mandatory"), yes that is what it would boil down to. > That is quite interesting. Please elaborate and explain your rationale. Basically, like those other drm drivers, the chip parameter is of no use to us (or at least we'd be totally fine not using it), hence the desire to skip it. But we are still required to use what we don't need? Do you care about drivers outside drivers/hwmon? Thanks. -- Ashutosh