From nobody Thu Oct 9 14:42:17 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 563002797AB; Tue, 17 Jun 2025 17:59:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750183168; cv=none; b=O27xdMB/OJo4nh7aS7uip3U/4xQ6xiEmH/51gv4AmWvXXnDhVfzdv4xspIz7as/ZcTjlrtjzWCHGaIqaESYwor+9D4cliXbiLUL5vzNKhDkjoJ8AEFP6BdX2hkAf2d9Z/A5yMcCl+Khz+YG2ee3XtPxCX/gW9/+EWH8lgAJBJCc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750183168; c=relaxed/simple; bh=77/gxLtAPvAxa1AK1aJlDnuTAAm2yyps4mDMdQg/RYQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WeceGsZQKQAKCHUihSCkPkqkiS8FU8rw9WnNx+8zNeytORTiwZereztJt/oTf/d/6TyWmRQyA84jftzyqGOo3B8618S3EbXaN899pEVAqCE59F+a62VtvKU2deo6AtHGwjvQK8MgBAk+exhQUGHv9dgmbEGylqROa+sqTHJCpXY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Rl9eUy7n; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Rl9eUy7n" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0AA1C4CEF1; Tue, 17 Jun 2025 17:59:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750183168; bh=77/gxLtAPvAxa1AK1aJlDnuTAAm2yyps4mDMdQg/RYQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rl9eUy7nE0GLjzybBSBdoGe0tK6HHsbNwXjhbhSHdMi83sHIyJPrwQWCzIo4lXatr qcM7Wl9KAeFOVLCmjIOJq1LJQeyZm0DX3jx3kNGnU4PJtlM8BRvIp/qOpSd/naPSj/ 2z7XGSsGn0kTMcnJarNi6QMNJsMwvPvtwiUuGPjrwL4az4IybB1mTivJNfoA0W5XV0 FBpszsr7WNq/gfUM3VUdkPKbYCV8ojZ7X5K9XctDkTZdqaJR+D8xhXlsh9PlIbYjIO OW+TVbOeWPXGM+g3cE8BxXmlpUqa2o1A9ZLRX6ZnbipjdAvxtYM0wir9mH7O8LNDEJ fl4ko+kSitVhQ== From: Mario Limonciello To: Bjorn Helgaas Cc: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Simona Vetter , Lukas Wunner , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Woodhouse , Lu Baolu , Joerg Roedel , Will Deacon , Robin Murphy , Alex Williamson , Jaroslav Kysela , Takashi Iwai , dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-kernel@vger.kernel.org (open list), iommu@lists.linux.dev (open list:INTEL IOMMU (VT-d)), linux-pci@vger.kernel.org (open list:PCI SUBSYSTEM), kvm@vger.kernel.org (open list:VFIO DRIVER), linux-sound@vger.kernel.org (open list:SOUND), Daniel Dadap , Mario Limonciello , Bjorn Helgaas Subject: [PATCH v2 4/6] iommu/vt-d: Use pci_is_display() Date: Tue, 17 Jun 2025 12:59:08 -0500 Message-ID: <20250617175910.1640546-5-superm1@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250617175910.1640546-1-superm1@kernel.org> References: <20250617175910.1640546-1-superm1@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Mario Limonciello The inline pci_is_display() helper does the same thing. Use it. Suggested-by: Bjorn Helgaas Signed-off-by: Mario Limonciello --- 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 7aa3932251b2f..17267cd476ce7 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -34,7 +34,7 @@ #define ROOT_SIZE VTD_PAGE_SIZE #define CONTEXT_SIZE VTD_PAGE_SIZE =20 -#define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) =3D=3D PCI_BASE_CLASS_DIS= PLAY) +#define IS_GFX_DEVICE(pdev) pci_is_display(pdev) #define IS_USB_DEVICE(pdev) ((pdev->class >> 8) =3D=3D PCI_CLASS_SERIAL_US= B) #define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) =3D=3D PCI_CLASS_BRIDGE_IS= A) #define IS_AZALIA(pdev) ((pdev)->vendor =3D=3D 0x8086 && (pdev)->device = =3D=3D 0x3a3e) --=20 2.43.0