From patchwork Fri Sep 2 09:51:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 12963989 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 C2BD7ECAAD5 for ; Fri, 2 Sep 2022 09:51:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C65110E7DC; Fri, 2 Sep 2022 09:51:34 +0000 (UTC) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id AD62810E7D5 for ; Fri, 2 Sep 2022 09:51:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662112288; x=1693648288; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=YF22tOYC1ISw8HiLRMEf/TITlCFUYXtwznJeix+npYY=; b=M/Uu8E67bGse/sbGB74Ol3XY6LttWAO/9NqcT38fXdEfTrcuyx/+AKpV NAmSPzvDDE2krxTYbkSatjN7TUsuxMpD9kWa62AoswAzYyfegaIW+a87+ gcXcKSYDG2i0O/vVmKyWYgBlAFbg3fh+5hiy+rcF7v1gYoaFEYkOs2Bqs JE5xc+HSDXHi5eD7V6dLxLRRhYzrTQDbevgf49Ui3XT+02ZYz7lKoqEPZ b+TrAyGqf1BExz4fyKbag9ebGz+dSuiSLjv3RjEQ55Fya8sqYZG5iqFWh Bf+csJjoO2UKLbq9f5c33pT5Fxz2TzjK3y9LuiulvnnQywFq6FvXfpiyu Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10457"; a="293523794" X-IronPort-AV: E=Sophos;i="5.93,283,1654585200"; d="scan'208";a="293523794" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2022 02:51:28 -0700 X-IronPort-AV: E=Sophos;i="5.93,283,1654585200"; d="scan'208";a="674291840" Received: from gquakenb-mobl1.amr.corp.intel.com (HELO rdvivi-mobl4.intel.com) ([10.255.36.252]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2022 02:51:27 -0700 From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Fri, 2 Sep 2022 05:51:25 -0400 Message-Id: <20220902095126.373036-1-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 1/2] drm/i915: Don't try to disable host RPS when this was never enabled. 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: Rodrigo Vivi Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Specially in GT reset case this could be triggered and try to disable things that had never been enabled. Let's add some protection here. Cc: Ashutosh Dixit Signed-off-by: Rodrigo Vivi Reviewed-by: Ashutosh Dixit Acked-by: Nirmoy Das --- drivers/gpu/drm/i915/gt/intel_rps.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c index 579ae9ac089c..6fadde4ee7bf 100644 --- a/drivers/gpu/drm/i915/gt/intel_rps.c +++ b/drivers/gpu/drm/i915/gt/intel_rps.c @@ -1551,6 +1551,9 @@ void intel_rps_disable(struct intel_rps *rps) { struct drm_i915_private *i915 = rps_to_i915(rps); + if (!intel_rps_is_enabled(rps)) + return; + intel_rps_clear_enabled(rps); intel_rps_clear_interrupts(rps); intel_rps_clear_timer(rps); From patchwork Fri Sep 2 09:51:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 12963990 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 5826CECAAD5 for ; Fri, 2 Sep 2022 09:51:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EC7B510E7F2; Fri, 2 Sep 2022 09:51:36 +0000 (UTC) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0F65710E7DA for ; Fri, 2 Sep 2022 09:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662112289; x=1693648289; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ylVSojI/9JrTMjUN8DKhZBIvtYbr6KlKZC/bNGKEM48=; b=khJGcz4ItHA8GwtREjDYI3UMTaIlHLbdtFmHO1Q5KkT+Bgx48tmfQhwM WQ+86LbnBCPDtwkNuX8vmZLfGJmOrZYyzOkjKACqy2UPbv3IRx2MvIa65 N5vyQ88kldRje4AeREsjxh6oDZm5knD33w/7UTl2tkfNqyTlphdje1311 UFBvDfUr/CSRZvXaX4zsnx/kJV0/JptpyHlyLlJ/+smnVON0HZcOM2qCT Zf0SgLCcJ0fe99OuBO7QnQstgU4nB3amgrHibaV1PRMGLWr0zeaokbpDB Oey+BaGgyY5/X7YRSL0GaUItZ6Gp6p6B8MkfRBJSbtBW9gpruQof/D/Sn g==; X-IronPort-AV: E=McAfee;i="6500,9779,10457"; a="293523797" X-IronPort-AV: E=Sophos;i="5.93,283,1654585200"; d="scan'208";a="293523797" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2022 02:51:28 -0700 X-IronPort-AV: E=Sophos;i="5.93,283,1654585200"; d="scan'208";a="674291846" Received: from gquakenb-mobl1.amr.corp.intel.com (HELO rdvivi-mobl4.intel.com) ([10.255.36.252]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2022 02:51:28 -0700 From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Fri, 2 Sep 2022 05:51:26 -0400 Message-Id: <20220902095126.373036-2-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220902095126.373036-1-rodrigo.vivi@intel.com> References: <20220902095126.373036-1-rodrigo.vivi@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 2/2] drm/i915: Let's avoid even early init if SLPC is used. 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: Rodrigo Vivi Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" SLPC has its own waiboost variables and lock mechanism. No need for these extra stuff, in special no need for the timer. Cc: Ashutosh Dixit Signed-off-by: Rodrigo Vivi Reviewed-by: Ashutosh Dixit --- drivers/gpu/drm/i915/gt/intel_rps.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c index 6fadde4ee7bf..c29652281f2e 100644 --- a/drivers/gpu/drm/i915/gt/intel_rps.c +++ b/drivers/gpu/drm/i915/gt/intel_rps.c @@ -1960,6 +1960,9 @@ void gen5_rps_irq_handler(struct intel_rps *rps) void intel_rps_init_early(struct intel_rps *rps) { + if (rps_uses_slpc(rps)) + return; + mutex_init(&rps->lock); mutex_init(&rps->power.mutex);