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 385F7EB64D9 for ; Thu, 6 Jul 2023 19:23:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CC46310E4A5; Thu, 6 Jul 2023 19:23:57 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id B392110E4A5 for ; Thu, 6 Jul 2023 19:23:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688671435; x=1720207435; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=Nhw6s4SOMPrSSWK+Re2Vk8OOih8KG7zMgjKc6bdoKLg=; b=GCfwlBHeoWCrPN2Mjf/MXQREEQjlo44GafjhV8tr/faO9/vXJdqM81un SbqYTrf22gXw369feiv9FTMf8+gILDkDbrR1J85OZ6+3JiMNTzPmeAvox wVk3EvxlkadGf4eeKdHzRBzBLrcnLUI8tNm/3/EI4vCdWH3noAMgPX7Ez B0/ZUmIOuDtwV4Bh43WBkdWTpYLk/MrNJL+bnZB7pAZEhE1e10T3Nh4ye YyvaK6mh0rCVT1dOd1BtqNpBQz761tFYQs9HBtMbKJi2wfnI25BRgEJUS KRR1+GHhjPB75ZRsOR3uqRU+bxPSKv9uci9dZ1IXvbVtc9q//hoiHLfvs A==; X-IronPort-AV: E=McAfee;i="6600,9927,10763"; a="450060262" X-IronPort-AV: E=Sophos;i="6.01,185,1684825200"; d="scan'208";a="450060262" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2023 12:23:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10763"; a="1050211702" X-IronPort-AV: E=Sophos;i="6.01,185,1684825200"; d="scan'208";a="1050211702" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.212.197.88]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2023 12:23:54 -0700 Date: Thu, 06 Jul 2023 12:05:26 -0700 Message-ID: <87ilawdfnt.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Andi Shyti In-Reply-To: References: <20230627183043.2024530-1-badal.nilawar@intel.com> <20230627183043.2024530-4-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 Subject: Re: [Intel-xe] [PATCH v2 3/6] drm/xe/hwmon: Expose card reactive critical power 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, linux@roeck-us.net Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Thu, 29 Jun 2023 07:40:00 -0700, Andi Shyti wrote: > Hi Andi, > > Expose the card reactive critical (I1) power. I1 is exposed as > > power1_crit in microwatts (typically for client products) or as > > curr1_crit in milliamperes (typically for server). > > This is port from i915 hwmon. > > Should this, then be a more generic framework for more gpu > drivers? Now we are having some code duplication. There are several subsystems where we will see such duplication. These include things like PMU, OA which are either on the mailing list of in preparation. You can argue there is already code duplication between XE and i915, it's just hidden in xe way of doing things. The only way to avoid code duplication would be to invent sharing code between i915 and xe as display has done. It may be possible in some cases but in others sharing code will make matters worse for both xe and i915. So in general I am not seeing a way around "code duplication". Thanks. -- Ashutosh