From patchwork Wed Dec 19 14:45:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Stach X-Patchwork-Id: 10737373 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 53C5C13B5 for ; Wed, 19 Dec 2018 14:46:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40BEF2969C for ; Wed, 19 Dec 2018 14:46:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 354D929997; Wed, 19 Dec 2018 14:46:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 982BC296AD for ; Wed, 19 Dec 2018 14:46:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 341316EFFF; Wed, 19 Dec 2018 14:45:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by gabe.freedesktop.org (Postfix) with ESMTPS id C32E26EFF9 for ; Wed, 19 Dec 2018 14:45:50 +0000 (UTC) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7] helo=dude.pengutronix.de.) by metis.ext.pengutronix.de with esmtp (Exim 4.89) (envelope-from ) id 1gZd6Y-0006y1-T1; Wed, 19 Dec 2018 15:45:46 +0100 From: Lucas Stach To: etnaviv@lists.freedesktop.org Subject: [PATCH 00/10] per-process address spaces for MMUv2 Date: Wed, 19 Dec 2018 15:45:36 +0100 Message-Id: <20181219144546.28224-1-l.stach@pengutronix.de> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: patchwork-lst@pengutronix.de, kernel@pengutronix.de, dri-devel@lists.freedesktop.org, Russell King Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi all, the following patches finally implement one of the longstanding TODO items in the etnaviv driver: per-process address spaces. They are only enabled for MMUv2, as switching the MMU context on MMUv1 would require a full stop of the FE, which I deemed too expensive to do on potentially every submitted commandstream. For now this only provides better isolation between GPU clients, but it is also a big step in the direction of supporting softpin. Softpin will later be used by GC7000 userspace drivers to deal with texture descriptors without the need to add even more relocation interfaces to the etnaviv UAPI. The changes are big and pretty disruptive, so I acknowledge that they aren't prime targets for a quick review, but I would appreciate a second pairs of eyes on them. FWIW, I've been running a variation of those patches for some time on GC2000, GC3000 and GC7000. Regards, Lucas Lucas Stach (10): drm/etnaviv: move job context pointer to etnaviv_gem_submit drm/etnaviv: mmuv2: don't map zero page drm/etnaviv: split out cmdbuf mapping into address space drm/etnaviv: share a single cmdbuf suballoc region across all GPUs drm/etnaviv: replace MMU flush marker with flush sequence drm/etnaviv: rework MMU handling drm/etnaviv: split out starting of FE idle loop drm/etnaviv: provide MMU context to etnaviv_gem_mapping_get drm/etnaviv: implement per-process address spaces on MMUv2 drm/etnaviv: dump only failing submit drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 83 +++-- drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 56 ++-- drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h | 18 +- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 27 +- drivers/gpu/drm/etnaviv/etnaviv_drv.h | 12 +- drivers/gpu/drm/etnaviv/etnaviv_dump.c | 63 ++-- drivers/gpu/drm/etnaviv/etnaviv_dump.h | 4 +- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 27 +- drivers/gpu/drm/etnaviv/etnaviv_gem.h | 6 +- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 11 +- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 131 ++++---- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 12 +- drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 160 +++++----- drivers/gpu/drm/etnaviv/etnaviv_iommu.h | 20 -- drivers/gpu/drm/etnaviv/etnaviv_iommu_v2.c | 279 ++++++++--------- drivers/gpu/drm/etnaviv/etnaviv_mmu.c | 301 ++++++++++++------- drivers/gpu/drm/etnaviv/etnaviv_mmu.h | 109 +++++-- drivers/gpu/drm/etnaviv/etnaviv_sched.c | 4 +- 18 files changed, 717 insertions(+), 606 deletions(-) delete mode 100644 drivers/gpu/drm/etnaviv/etnaviv_iommu.h