From patchwork Wed Mar 2 04:32:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Upadhyay X-Patchwork-Id: 12765473 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 B1113C433FE for ; Wed, 2 Mar 2022 04:46:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 26E9D10EAC4; Wed, 2 Mar 2022 04:46:26 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 40DA110EAC4 for ; Wed, 2 Mar 2022 04:46:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646196384; x=1677732384; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=VieNnhN0rOTRySts1AK/9zNkaXZXXmCyvQbVecMx2V8=; b=C57zWlLDObOpx0YIP8fJ5PZxJ5qMUZl4RLykkL81YMSh4maXcsPPZShT 9bHwOzg1zLItSWRvqOopdEAtlcrkzJb4wTG0wOU+2vjjQm/Jsej/tUze6 sCz6VYLxGz2TU6tIB1Ga0IEnI9AwlQJQJ7shfq1/uHoI19ESqPXY0gPLU PEwp5AIeKZTmIKIVucUkyPZl2UoqZ6UffpoRl9qRBUzK9kYhWw6Q5vC7Y 3Xap7IAcRsN77KbqPjQzeqW9J3UqCk/SRcirF1VUMmRULN6IoPUqqt/CG pN8RittCGHvb4XWtrqSq2gDuIxK6uFZttcsxjomLNhegGCU8P6k+Wh7RO g==; X-IronPort-AV: E=McAfee;i="6200,9189,10273"; a="253504812" X-IronPort-AV: E=Sophos;i="5.90,148,1643702400"; d="scan'208";a="253504812" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2022 20:46:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,148,1643702400"; d="scan'208";a="535234284" Received: from tejas-system-product-name.iind.intel.com ([10.145.162.130]) by orsmga007.jf.intel.com with ESMTP; 01 Mar 2022 20:46:21 -0800 From: Tejas Upadhyay To: intel-gfx@lists.freedesktop.org Date: Wed, 2 Mar 2022 10:02:56 +0530 Message-Id: <20220302043256.191529-1-tejaskumarx.surendrakumar.upadhyay@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] iommu/vt-d: Add RPLS to quirk list to skip TE disabling 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: iommu@lists.linux-foundation.org, Tejas Upadhyay , Raviteja Goud Talla , Lu Baolu , Rodrigo Vivi Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The VT-d spec requires (10.4.4 Global Command Register, TE field) that: Hardware implementations supporting DMA draining must drain any in-flight DMA read/write requests queued within the Root-Complex before completing the translation enable command and reflecting the status of the command through the TES field in the Global Status register. Unfortunately, some integrated graphic devices fail to do so after some kind of power state transition. As the result, the system might stuck in iommu_disable_translati on(), waiting for the completion of TE transition. This adds RPLS to a quirk list for those devices and skips TE disabling if the qurik hits. Link: https://gitlab.freedesktop.org/drm/intel/-/issues/4898 Tested-by: Raviteja Goud Talla Cc: Rodrigo Vivi Acked-by: Lu Baolu Signed-off-by: Tejas Upadhyay --- drivers/iommu/intel/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 639e4438827e..bd6dac90a948 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -5741,7 +5741,7 @@ static void quirk_igfx_skip_te_disable(struct pci_dev *dev) ver = (dev->device >> 8) & 0xff; if (ver != 0x45 && ver != 0x46 && ver != 0x4c && ver != 0x4e && ver != 0x8a && ver != 0x98 && - ver != 0x9a) + ver != 0x9a && ver != 0xa7) return; if (risky_device(dev))