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 DDFAFCD1292 for ; Thu, 11 Apr 2024 04:59:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2D04510EB4D; Thu, 11 Apr 2024 04:59:11 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="RhAujH8z"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4DED710EB4D for ; Thu, 11 Apr 2024 04:59:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712811549; x=1744347549; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=wmLChK7rsRvxb4kBZ6XCQbDtMCdvJ1Rh4iRGbxey81w=; b=RhAujH8zRtYJhscHxdUwy+YXeuUSRcWNPc67NB2YyUrY08bQK3yALZJf xnw6jgvHgOQPwCVB0W6hbeWsbevqpFHqsGbLQxK10QPfjchxbxisWccIT GTSlOIPn9pvfrlfV0kptsot4mgSpLCrDR/MTN5qwH6e9jIZPKPrDwOfEY 95RzB8fiu4InTCZ6/lDnL5iQCAdqEL5GcP7tLZsytlzdmmjDB2Qm9gHPd x+pFQdYCLgtn/yrfca1sGkaCmb6MkXl5KO1ilW2N3wia4At/+BcRZ2GO9 bG55/pJu75GP+PmhptaVNt6Zm+JY08X7CxVRnBcqrhhkdtFqDxNXX1T4S g==; X-CSE-ConnectionGUID: 5Yjcr+WsTX2A2saFTgdZVA== X-CSE-MsgGUID: mWeoVVZJRba2XBr85I6vwg== X-IronPort-AV: E=McAfee;i="6600,9927,11039"; a="8424769" X-IronPort-AV: E=Sophos;i="6.07,192,1708416000"; d="scan'208";a="8424769" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2024 21:59:08 -0700 X-CSE-ConnectionGUID: 4/IOa6EISQ6tTgU6n6qmzw== X-CSE-MsgGUID: no75e7X0S0K0eh8KxnRKng== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,192,1708416000"; d="scan'208";a="25560441" Received: from orsosgc001.jf.intel.com (HELO orsosgc001.intel.com) ([10.165.21.138]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2024 21:59:07 -0700 Date: Wed, 10 Apr 2024 21:59:07 -0700 Message-ID: <85r0fcjy04.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Andi Shyti Cc: , Badal Nilawar Subject: Re: [PATCH] drm/i915: Don't enable hwmon for selftests In-Reply-To: References: <20240410060549.201177-1-ashutosh.dixit@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-redhat-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 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, 10 Apr 2024 06:53:15 -0700, Andi Shyti wrote: > Hi Andi, > please use "git format-patch -v 3 ..." which generates subject > [PATCH v3] ...". Otherwise it gets confusing to see the patch > that needs to be reviewed. Sure, sorry! > > On Tue, Apr 09, 2024 at 11:05:49PM -0700, Ashutosh Dixit wrote: > > There are no hwmon selftests so there is no need to enable hwmon for > > selftests. So enable hwmon only for real driver load. > > > > v2: Move the logic inside i915_hwmon.c > > v3: Move is_i915_selftest definition to i915_selftest.h (Badal) > > > > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10366 > > Signed-off-by: Ashutosh Dixit > > --- > > drivers/gpu/drm/i915/i915_hwmon.c | 3 ++- > > drivers/gpu/drm/i915/i915_selftest.h | 10 ++++++++++ > > 2 files changed, 12 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c > > index 8c3f443c8347..cf1689333ebf 100644 > > --- a/drivers/gpu/drm/i915/i915_hwmon.c > > +++ b/drivers/gpu/drm/i915/i915_hwmon.c > > @@ -10,6 +10,7 @@ > > #include "i915_drv.h" > > #include "i915_hwmon.h" > > #include "i915_reg.h" > > +#include "i915_selftest.h" > > #include "intel_mchbar_regs.h" > > #include "intel_pcode.h" > > #include "gt/intel_gt.h" > > @@ -789,7 +790,7 @@ void i915_hwmon_register(struct drm_i915_private *i915) > > int i; > > > > /* hwmon is available only for dGfx */ > > - if (!IS_DGFX(i915)) > > + if (!IS_DGFX(i915) || is_i915_selftest()) > > return; > > I wonder if this is the right place to put it or rather place it > in i915_driver.c and avoid calling i915_hwmon_register() at all. I thought it was better put it here rather than clutter up common code in i915_driver.c. > > In any case, it's good: > > Reviewed-by: Andi Shyti Thanks. -- Ashutosh