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 E22CFEB64DD for ; Thu, 6 Jul 2023 19:23:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229872AbjGFTX6 (ORCPT ); Thu, 6 Jul 2023 15:23:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjGFTX4 (ORCPT ); Thu, 6 Jul 2023 15:23:56 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C9501BD3 for ; Thu, 6 Jul 2023 12:23:55 -0700 (PDT) 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="450060260" X-IronPort-AV: E=Sophos;i="6.01,185,1684825200"; d="scan'208";a="450060260" 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 Cc: Badal Nilawar , , , , , , Subject: Re: [PATCH v2 3/6] drm/xe/hwmon: Expose card reactive critical power 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 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org 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