From patchwork Tue Jul 2 14:18:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11027933 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 C7F3F1510 for ; Tue, 2 Jul 2019 14:19:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AECA728895 for ; Tue, 2 Jul 2019 14:19:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2A9E28898; Tue, 2 Jul 2019 14:19:10 +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 54B4C28895 for ; Tue, 2 Jul 2019 14:19:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BC83B89EA3; Tue, 2 Jul 2019 14:19:09 +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 6741F89EA3 for ; Tue, 2 Jul 2019 14:19:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D182F300183C; Tue, 2 Jul 2019 14:19:07 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-96.ams2.redhat.com [10.36.116.96]) by smtp.corp.redhat.com (Postfix) with ESMTP id D44C85D9D6; Tue, 2 Jul 2019 14:19:04 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9145911AB5; Tue, 2 Jul 2019 16:19:03 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Subject: [PATCH v6 00/18] drm/virtio: switch from ttm to gem shmem helpers. Date: Tue, 2 Jul 2019 16:18:45 +0200 Message-Id: <20190702141903.1131-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 02 Jul 2019 14:19:07 +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. 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: 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: 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_{reserve,unreserve} drm/virtio: add fence sanity check drivers/gpu/drm/virtio/virtgpu_drv.h | 121 +++------- drivers/gpu/drm/virtio/virtgpu_drv.c | 20 +- drivers/gpu/drm/virtio/virtgpu_fence.c | 4 + drivers/gpu/drm/virtio/virtgpu_gem.c | 146 ++++++++---- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 222 ++++++----------- drivers/gpu/drm/virtio/virtgpu_kms.c | 9 - drivers/gpu/drm/virtio/virtgpu_object.c | 220 +++++------------ drivers/gpu/drm/virtio/virtgpu_plane.c | 13 +- drivers/gpu/drm/virtio/virtgpu_prime.c | 37 --- drivers/gpu/drm/virtio/virtgpu_ttm.c | 304 ------------------------ drivers/gpu/drm/virtio/virtgpu_vq.c | 72 ++++-- drivers/gpu/drm/virtio/Kconfig | 2 +- drivers/gpu/drm/virtio/Makefile | 2 +- 13 files changed, 338 insertions(+), 834 deletions(-) delete mode 100644 drivers/gpu/drm/virtio/virtgpu_ttm.c