From patchwork Fri Aug 2 13:12:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11073409 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 4269713A4 for ; Fri, 2 Aug 2019 13:12:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31D502880B for ; Fri, 2 Aug 2019 13:12:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 265C128831; Fri, 2 Aug 2019 13:12:34 +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 D25F52880B for ; Fri, 2 Aug 2019 13:12:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C27A56EE11; Fri, 2 Aug 2019 13:12:32 +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 82C246EE0D for ; Fri, 2 Aug 2019 13:12:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 24D868535D; Fri, 2 Aug 2019 13:12:30 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-81.ams2.redhat.com [10.36.116.81]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACEEE5D704; Fri, 2 Aug 2019 13:12:26 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id ED25716E05; Fri, 2 Aug 2019 15:12:25 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Subject: [PATCH v7 00/18] drm/virtio: switch from ttm to gem shmem helpers. Date: Fri, 2 Aug 2019 15:12:07 +0200 Message-Id: <20190802131225.17760-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 02 Aug 2019 13:12:30 +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: Gerd Hoffmann , gurchetansingh@chromium.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP ttm increasingly gets into the way while hacking on virtio-gpu memory management. It also overkill for what virtio-gpu needs. Lets get rid of it. v7: - rebase to latest drm-misc-next - reorder patches: switch all virtio commands to object array helpers first. then drop ttm, to make sure we don't release objects still in use. - misc fixes. v6: - largely rewrite fencing logic, using the virtio_gpu_array_* helpers - add more patches to the series. v5: - fence bugfixes. - minor optimizations. v4: - make gem array helpers private to virtio. - misc minor fixes. v3: - add gem array helpers. - rework fencing. cheers, Gerd Gerd Hoffmann (18): drm/virtio: pass gem reservation object to ttm init drm/virtio: switch virtio_gpu_wait_ioctl() to gem helper. drm/virtio: simplify cursor updates drm/virtio: remove virtio_gpu_object_wait drm/virtio: drop no_wait argument from virtio_gpu_object_reserve drm/virtio: remove ttm calls from in virtio_gpu_object_{reserve,unreserve} drm/virtio: add virtio_gpu_object_array & helpers drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing drm/virtio: rework virtio_gpu_object_create fencing drm/virtio: rework virtio_gpu_transfer_from_host_ioctl fencing drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing drm/virtio: rework virtio_gpu_cmd_context_{attach,detach}_resource drm/virtio: drop virtio_gpu_object_list_validate/virtio_gpu_unref_list drm/virtio: switch from ttm to gem shmem helpers drm/virtio: remove virtio_gpu_alloc_object drm/virtio: drop virtio_gpu_object_{ref,unref} drm/virtio: drop virtio_gpu_object_{reserve,unreserve} drm/virtio: add fence sanity check drivers/gpu/drm/virtio/virtgpu_drv.h | 123 +++------- drivers/gpu/drm/virtio/virtgpu_drv.c | 20 +- drivers/gpu/drm/virtio/virtgpu_fence.c | 4 + drivers/gpu/drm/virtio/virtgpu_gem.c | 157 ++++++++---- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 224 ++++++----------- drivers/gpu/drm/virtio/virtgpu_kms.c | 9 - drivers/gpu/drm/virtio/virtgpu_object.c | 220 +++++------------ drivers/gpu/drm/virtio/virtgpu_plane.c | 34 +-- drivers/gpu/drm/virtio/virtgpu_prime.c | 37 --- drivers/gpu/drm/virtio/virtgpu_ttm.c | 305 ------------------------ drivers/gpu/drm/virtio/virtgpu_vq.c | 78 ++++-- drivers/gpu/drm/virtio/Kconfig | 2 +- drivers/gpu/drm/virtio/Makefile | 2 +- 13 files changed, 373 insertions(+), 842 deletions(-) delete mode 100644 drivers/gpu/drm/virtio/virtgpu_ttm.c