From patchwork Thu Aug 8 22:21:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 170865 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp9165149ile; Thu, 8 Aug 2019 15:22:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpjYRjBhobCQsgpxZxp2jWLYYWjXxDgbG3G5YVqmhYrKCIzxJT7AL7clNOXxdlui1cAOIy X-Received: by 2002:aa7:8acb:: with SMTP id b11mr17250152pfd.109.1565302926441; Thu, 08 Aug 2019 15:22:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565302926; cv=none; d=google.com; s=arc-20160816; b=NymGsN3suk3zC4njzLkBAin29HK234+t10grUV2BlgK6aaZrHGVtuUT5sFhoUnTmsh rldV3ZciQ3TvAL+3tabHYjEjpx76Vx2SWNM/2R89V0gL7BL3BYeVnV6nE2OebqPn/aI4 goCVPPOQaTse+BaJzXBmXmf1Z9uuBDW5UWGLESm/ub9FV2fW3rBP6j1g+4asZv/g3FHc IpAA1wFDyg+RYfoBtt5yFGQY8lQdhuHOBgbJS5pn45SIKZdwKKiXe8ovUi6ncti1FSMp cerWvD6ZDtaIeqPoX67DcQ2UZtuKwmLO9+qi3JzqR2bsfVBUD8dayQE4AQUCe8IMPYo+ /zNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=zXGxLHbl7AQ/NLFjx+JBK1eJQYxnNcwIeovNLlfn/lw=; b=GimyCr5uUfPhmlx/A6k+aQPBYRhRXGu+563RyN0guOYHUlzl/O9rICmFH5WIv3wEZb J0RD81BmRJrITK5hspaKuV4leg+LWkLB4Ns4oIomSH4NjL3/0tS7EzC4/lKWJLlK2jMA VyIGHblVvQ3Ozty8gGmM6b1H+lJHI2Zcr7/Ar2ZMoRwCM9l6Doxf8Cpw2XhnrJQVnLUQ vZgLybbDyBziJDJemQSiw+OQ4E8ZwoUmG5OY4luv8RjOUaM/GATOZkjFUh5NI+94clZG YIkD4hVWfbmY3u8ug2NP9rK6O4anjnsJjm/dDeJGKzuktXSevz+BcH/CxuByyqReCrtF T3JQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id j70si51963714pgd.500.2019.08.08.15.22.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Aug 2019 15:22:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1EC0F6ECCB; Thu, 8 Aug 2019 22:22:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ot1-f65.google.com (mail-ot1-f65.google.com [209.85.210.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 99CAE6ECCB for ; Thu, 8 Aug 2019 22:22:03 +0000 (UTC) Received: by mail-ot1-f65.google.com with SMTP id r6so125061777oti.3 for ; Thu, 08 Aug 2019 15:22:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9sfQNCvhJgn29BJCg3/CuK1P1Bx5yJsxtn9s7N5T8QQ=; b=dlrxPbkPw3cpYlltufivjaW9wq6CFJZAV7ES8zJ1jaTG88qClVx3RUKLWloZWFMtoq kGpTqShnsmxPtJ2GofYE1tpAzVc3RRIiVu1FwYxPzIEibefwnqOBdZwqeY+6K/qMCYIR O/litj9+q4BBtbaq8YxF6doUXMzeGFKyMvqMVQn3hD9jturTbaOTYON6fXsXLFQmirwf I7H6IYvE5s0MvguATb8fW9tKds7yRiy1bdbt6FTSkYSA492ARS9kOqwHGctZSbHINJyA opWadu5nNNRgVXg2feHpBb2xnSNPumhCJ6Sl9BZB58MhwWyWRLQ9T6wBMF0/P2g0+Ap7 YAwg== X-Gm-Message-State: APjAAAUTMUmDBVOVVjLORL8CxZBp97ZZrBseCEhEl3ctJ1qguk+CvRCr 0Ox/fqQHdfFbxf+X/e/13gUy8C8= X-Received: by 2002:a5e:d51a:: with SMTP id e26mr16765691iom.71.1565302922251; Thu, 08 Aug 2019 15:22:02 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.254]) by smtp.googlemail.com with ESMTPSA id i4sm118528553iog.31.2019.08.08.15.22.01 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 08 Aug 2019 15:22:01 -0700 (PDT) From: Rob Herring To: dri-devel@lists.freedesktop.org Subject: [PATCH v4 0/9] drm/panfrost: Add heap and no execute buffer allocation Date: Thu, 8 Aug 2019 16:21:51 -0600 Message-Id: <20190808222200.13176-1-robh@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 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: Tomeu Vizoso , Maxime Ripard , Robin Murphy , Steven Price , David Airlie , Boris Brezillon , Alyssa Rosenzweig , Sean Paul Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This series adds new BO allocation flags PANFROST_BO_HEAP and PANFROST_BO_NOEXEC. The heap allocations are paged in on GPU page faults. Hopefully, this is the last version, but I made a few changes after implementing per FD address spaces on top of this. Primarily, I moved the GPU VA mapping into GEM open/close functions. This is a bit cleaner and will work when we need access to per FD objects. I also found a problem with how the GPU reset is handled with the MMU. With the move to a threaded irq handler, it's not okay to unmask the MMU at any time as was possible with panfrost_mmu_enable() calls. The result was some consolidation of the reset calls. Tomeu, I don't think there should be any changes in test results, but I didn't add your tested-by as there are a few too many changes that I felt comfortable with. I did test this with your series. This is based on drm-misc-next. An updated branch is here[1]. v4: - Move GPU VA mapping/unmapping to GEM open/close - Add rework of reset handling. - Rebased on top of madvise support v3: - Retain shared irq support, splitting IRQ changes to separate patch (6/8) - Stop leaking SG tables - Prevent mmap and pinning pages for heap BOs Rob [1] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git panfrost/heap-noexec Rob Herring (9): drm/gem: Allow sparsely populated page arrays in drm_gem_put_pages drm/shmem: Put pages independent of a SG table being set drm/panfrost: Restructure the GEM object creation drm/panfrost: Split panfrost_mmu_map SG list mapping to its own function drm/panfrost: Add a no execute flag for BO allocations drm/panfrost: Consolidate reset handling drm/panfrost: Convert MMU IRQ handler to threaded handler drm/panfrost: Add support for GPU heap allocations drm/panfrost: Bump driver version to 1.1 drivers/gpu/drm/drm_gem.c | 3 + drivers/gpu/drm/drm_gem_shmem_helper.c | 4 +- drivers/gpu/drm/panfrost/TODO | 2 - drivers/gpu/drm/panfrost/panfrost_device.c | 16 +- drivers/gpu/drm/panfrost/panfrost_device.h | 1 + drivers/gpu/drm/panfrost/panfrost_drv.c | 65 +++++-- drivers/gpu/drm/panfrost/panfrost_gem.c | 138 ++++++++++--- drivers/gpu/drm/panfrost/panfrost_gem.h | 17 +- drivers/gpu/drm/panfrost/panfrost_job.c | 7 +- drivers/gpu/drm/panfrost/panfrost_mmu.c | 216 +++++++++++++++++---- drivers/gpu/drm/panfrost/panfrost_mmu.h | 3 +- include/uapi/drm/panfrost_drm.h | 3 + 12 files changed, 374 insertions(+), 101 deletions(-) --- 2.20.1