From patchwork Tue Jul 4 09:48:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 13300923 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 1BDA7EB64DA for ; Tue, 4 Jul 2023 09:49:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5AE0A10E2C2; Tue, 4 Jul 2023 09:49:06 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8F18810E2C2 for ; Tue, 4 Jul 2023 09:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688464145; x=1720000145; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=B9zu3dyr6/xgzsEYWsheTT1+l/XhHg1rHWn0oKwzpDw=; b=eCtoVPRHcg6/XPfoA9QzEWswVNIp/4WVRww0jhZOeWxqxtwNEQLYKYMJ lCWwzCoO2Z3pKEIxLqWLLydM3DEf4HxW/gsvEDwvO3itp91B08+78kThJ s4CnsVuNNTaOBBIwyoM5gZCsF7hliOh3ESu+ku/9rgz0FGbxiRpIQnk0v 3pYDYQndoPAa22HM7+EEZCHLYwvIgV0pRiqzQXKvU6JslPm9ZTmKpHYVj KIUM7P2sqecPBL0p5iRJUn2S1fYJ1MYc5hp59LWOysZyAxGFNaga7RSZY LPFlrG8kX3f5M5qBuRZn+KruCx575feY/Vhxn+QTLJnbjs5M49L+jAPce A==; X-IronPort-AV: E=McAfee;i="6600,9927,10760"; a="393829759" X-IronPort-AV: E=Sophos;i="6.01,180,1684825200"; d="scan'208";a="393829759" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2023 02:49:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10760"; a="788804529" X-IronPort-AV: E=Sophos;i="6.01,180,1684825200"; d="scan'208";a="788804529" Received: from jbouhlil-mobl.ger.corp.intel.com (HELO localhost) ([10.252.48.173]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2023 02:49:03 -0700 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Date: Tue, 4 Jul 2023 12:48:49 +0300 Message-Id: <4e087e216d86e6be8109bb443d1ac6c9ced1f777.1688463863.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH 3/3] drm/i915/uncore: optimize CONFIG_DRM_I915_DEBUG_MMIO=n more 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: , Cc: jani.nikula@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" While the default for the mmio_debug parameter depends on CONFIG_DRM_I915_DEBUG_MMIO, we look it up and include all the code for unclaimed reg debugging even when CONFIG_DRM_I915_DEBUG_MMIO=n. Fix it. Cc: Lee Shawn C Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/intel_uncore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index dfefad5a5fec..da2edde4b6f6 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -1929,7 +1929,8 @@ static inline bool __must_check unclaimed_reg_debug_header(struct intel_uncore *uncore, const i915_reg_t reg, const bool read) { - if (likely(!uncore->i915->params.mmio_debug) || !uncore->debug) + if (!IS_ENABLED(CONFIG_DRM_I915_DEBUG_MMIO) || + likely(!uncore->i915->params.mmio_debug) || !uncore->debug) return false; /* interrupts are disabled and re-enabled around uncore->lock usage */