From patchwork Fri Sep 13 12:29:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11144691 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8358814E5 for ; Fri, 13 Sep 2019 12:29:16 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6C55120678 for ; Fri, 13 Sep 2019 12:29:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C55120678 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CFF8C6F397; Fri, 13 Sep 2019 12:29:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0384F6F398 for ; Fri, 13 Sep 2019 12:29:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 77605875223; Fri, 13 Sep 2019 12:29:12 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-47.ams2.redhat.com [10.36.116.47]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D3DC5C207; Fri, 13 Sep 2019 12:29:09 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8423016E08; Fri, 13 Sep 2019 14:29:08 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Subject: [PATCH 0/8] drm: rework mmap() workflow Date: Fri, 13 Sep 2019 14:29:00 +0200 Message-Id: <20190913122908.784-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.68]); Fri, 13 Sep 2019 12:29:12 +0000 (UTC) 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: Daniel Vetter , Gerd Hoffmann , Thomas Zimmermann MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add mmap callback to drm_object Gerd Hoffmann (8): drm: add mmap() to drm_gem_object_funcs drm/shmem: switch shmem helper to &drm_gem_object_funcs.mmap drm/shmem: drop DEFINE_DRM_GEM_SHMEM_FOPS drm/ttm: factor out ttm_bo_mmap_vma_setup drm/ttm: add drm_gem_ttm_mmap() drm/vram: switch vram helper to &drm_gem_object_funcs.mmap() drm/vram: drop verify_access drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONS include/drm/drm_gem.h | 14 ++++ include/drm/drm_gem_shmem_helper.h | 30 +------ include/drm/drm_gem_ttm_helper.h | 2 + include/drm/drm_gem_vram_helper.h | 25 ------ include/drm/drm_vram_mm_helper.h | 82 +++++++++++++++++++ include/drm/ttm/ttm_bo_api.h | 8 ++ drivers/gpu/drm/ast/ast_drv.c | 5 +- drivers/gpu/drm/bochs/bochs_drv.c | 5 +- drivers/gpu/drm/cirrus/cirrus.c | 2 +- drivers/gpu/drm/drm_gem.c | 27 ++++-- drivers/gpu/drm/drm_gem_shmem_helper.c | 26 ++---- drivers/gpu/drm/drm_gem_ttm_helper.c | 19 +++++ drivers/gpu/drm/drm_gem_vram_helper.c | 56 +------------ drivers/gpu/drm/drm_prime.c | 9 ++ .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 +- drivers/gpu/drm/mgag200/mgag200_drv.c | 5 +- drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +- drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +- drivers/gpu/drm/tiny/gm12u320.c | 2 +- drivers/gpu/drm/ttm/ttm_bo_vm.c | 47 ++++++----- drivers/gpu/drm/v3d/v3d_bo.c | 2 +- drivers/gpu/drm/v3d/v3d_drv.c | 2 +- drivers/gpu/drm/vboxvideo/vbox_drv.c | 5 +- drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +- drivers/gpu/drm/virtio/virtgpu_object.c | 2 +- 25 files changed, 200 insertions(+), 186 deletions(-) create mode 100644 include/drm/drm_vram_mm_helper.h