From patchwork Fri Oct 1 14:34:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 12530733 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B69BC433FE for ; Fri, 1 Oct 2021 14:37:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6CE95611C1 for ; Fri, 1 Oct 2021 14:37:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6CE95611C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=uwktMtXQzJtE7zK8Ayn86HbixHj2chloBbk/1Vt0PGo=; b=mgO0VvLS5XPcbQ g4F6Sq3Y92tV9C97wTQk5m0xqQCkns7J0jhXTeHlsBX3zbSElejOCOURVEM6O8OiJL23jconNFmoL 4rjixbHar03x9FYzopcym0C4ySi+j6ivbbYdCLU8aJEb8dgY6CpL7EYIqsaTI3BAPAIQvxWuETa9Y d9WzimgzPusNGqtUTRgoz7WXp/Oed/8HyPzDHf8MP+8gVURvLXRVjAjx33PBQPdwA1AieWDDmVogS cwrq3M5lcd4XNwMmtMrXC7N8L1m8kurszHLNXi7CV1PXjdGHFWy31f4cvDjEibNzv76r9O1fZRhPL xZvAYy9FUpMUTWfVVAKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mWJci-000Y0I-B4; Fri, 01 Oct 2021 14:34:52 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mWJcT-000Xsh-OG for linux-arm-kernel@lists.infradead.org; Fri, 01 Oct 2021 14:34:39 +0000 Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id D77351F457A9; Fri, 1 Oct 2021 15:34:33 +0100 (BST) From: Boris Brezillon To: Joerg Roedel , iommu@lists.linux-foundation.org, Rob Herring , Tomeu Vizoso , Alyssa Rosenzweig , Steven Price , Robin Murphy , Will Deacon , linux-arm-kernel@lists.infradead.org Cc: dri-devel@lists.freedesktop.org, Boris Brezillon Subject: [PATCH v2 0/5] drm/panfrost: Add extra GPU-usage flags Date: Fri, 1 Oct 2021 16:34:22 +0200 Message-Id: <20211001143427.1564786-1-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211001_073437_947176_CCCC24BD X-CRM114-Status: GOOD ( 13.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, This is a follow-up of [1], which was adding the read/write restrictions on GPU buffers. Robin and Steven suggested that I add a flag to restrict the shareability domain on GPU-private buffers, so here it is. As you can see, the first patch is flagges RFC, since I'm not sure adding a new IOMMU_ flag is the right solution, but IOMMU_CACHE doesn't feel like a good fit either. Please let me know if you have better ideas. Regards, Boris [1]https://patchwork.kernel.org/project/dri-devel/patch/20210930184723.1482426-1-boris.brezillon@collabora.com/ Boris Brezillon (5): [RFC]iommu: Add a IOMMU_DEVONLY protection flag [RFC]iommu/io-pgtable-arm: Take the DEVONLY flag into account on ARM_MALI_LPAE drm/panfrost: Add PANFROST_BO_NO{READ,WRITE} flags drm/panfrost: Add a PANFROST_BO_GPUONLY flag drm/panfrost: Bump the driver version to 1.3 drivers/gpu/drm/panfrost/panfrost_drv.c | 15 +++++++++++++-- drivers/gpu/drm/panfrost/panfrost_gem.c | 3 +++ drivers/gpu/drm/panfrost/panfrost_gem.h | 3 +++ drivers/gpu/drm/panfrost/panfrost_mmu.c | 11 ++++++++++- drivers/iommu/io-pgtable-arm.c | 25 +++++++++++++++++-------- include/linux/iommu.h | 7 +++++++ include/uapi/drm/panfrost_drm.h | 3 +++ 7 files changed, 56 insertions(+), 11 deletions(-)