From patchwork Wed Sep 27 13:17:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nirmoy Das X-Patchwork-Id: 13400782 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 EF6E2E7F14F for ; Wed, 27 Sep 2023 13:18:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ED61710E50F; Wed, 27 Sep 2023 13:18:01 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8E4E610E50E; Wed, 27 Sep 2023 13:17:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695820679; x=1727356679; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8ra80P7oWmTUPjqC/3mLGmMZU/e79GfDVl9TiAnXX0I=; b=B6EDjWRv//4Mx/Xzq9AN+zxamy4VrfAa3Yn9KyKLTtIszkXs99yi7WUb BbyRPFSuP9qSfP5AiGGn00wsKRpCAUJtl4PnzkpD1pvIZosneM+0LMt1p TTp4uZMU59HW9hzKLWBdC4DwfUZB+N3QHaQ3YRmbBNRryi215uUwVJcJr JwzPGY9T6SQPuZ26xCySnDUI9eIbHHxMXIjGooVnxC3g6lHXATjlsUkpS d3KLpNGbcPb0MMDmiGwJx0g4XoJr4ILmca2BOO8wiXSUr2UCY5drlhOmP auXPbJCv0wcQCpzCHpNFXyTcUCdpJZ1mBfou8UktBWuFGFsb0z/XA5cce g==; X-IronPort-AV: E=McAfee;i="6600,9927,10846"; a="381724032" X-IronPort-AV: E=Sophos;i="6.03,181,1694761200"; d="scan'208";a="381724032" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2023 06:17:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10846"; a="1080158429" X-IronPort-AV: E=Sophos;i="6.03,181,1694761200"; d="scan'208";a="1080158429" Received: from nirmoyda-desk.igk.intel.com ([10.102.138.190]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2023 06:17:57 -0700 From: Nirmoy Das To: intel-gfx@lists.freedesktop.org Date: Wed, 27 Sep 2023 15:17:47 +0200 Message-ID: <20230927131748.3895-2-nirmoy.das@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230927131748.3895-1-nirmoy.das@intel.com> References: <20230927131748.3895-1-nirmoy.das@intel.com> MIME-Version: 1.0 Organization: Intel Deutschland GmbH, Registered Address: Am Campeon 10, 85579 Neubiberg, Germany, Commercial Register: Amtsgericht Muenchen HRB 186928 Subject: [Intel-gfx] [PATCH v5 2/3] drm/i915: Reset steer semaphore for media GT on resume 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: matthew.d.roper@intel.com, dri-devel@lists.freedesktop.org, Nirmoy Das Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" During resume, the steer semaphore on GT1 was observed to be held. The hardware team has confirmed the safety of clearing the steer semaphore during driver load/resume, as no lock acquisitions can occur in this process by other agents. v2: reset on resume not in intel_gt_init(). Signed-off-by: Nirmoy Das --- drivers/gpu/drm/i915/gt/intel_gt_pm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_pm.c index 5a942af0a14e..b19062e30b9b 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c @@ -13,6 +13,7 @@ #include "intel_engine_pm.h" #include "intel_gt.h" #include "intel_gt_clock_utils.h" +#include "intel_gt_mcr.h" #include "intel_gt_pm.h" #include "intel_gt_print.h" #include "intel_gt_requests.h" @@ -228,6 +229,17 @@ int intel_gt_resume(struct intel_gt *gt) GT_TRACE(gt, "\n"); + /* + * Reset the steer semaphore on GT1, as we have observed it + * remaining held after a suspend operation. Confirmation + * from the hardware team ensures the safety of resetting + * the steer semaphore during driver load/resume, as there + * are no lock acquisitions during this process by other + * agents. + */ + if (MEDIA_VER(gt->i915) >= 13 && gt->type == GT_MEDIA) + intel_gt_mcr_lock_reset(gt); + /* * After resume, we may need to poke into the pinned kernel * contexts to paper over any damage caused by the sudden suspend.