From patchwork Fri Aug 23 09:54: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: 11111249 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 BB7E51395 for ; Fri, 23 Aug 2019 09:55:32 +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 A427420850 for ; Fri, 23 Aug 2019 09:55:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A427420850 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 51B3F6EC63; Fri, 23 Aug 2019 09:55:28 +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 37B146EC60 for ; Fri, 23 Aug 2019 09:55:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D02AB18C8908; Fri, 23 Aug 2019 09:55:11 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-60.ams2.redhat.com [10.36.116.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 43AE36CE71; Fri, 23 Aug 2019 09:55:04 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2261B16E2D; Fri, 23 Aug 2019 11:55:03 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Subject: [PATCH v8 00/18] drm/virtio: switch from ttm to gem shmem helpers. Date: Fri, 23 Aug 2019 11:54:45 +0200 Message-Id: <20190823095503.2261-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.70]); Fri, 23 Aug 2019 09:55:11 +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" 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. v8: - rebase to latest drm-misc-next, adapt to changes. 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. please review. thanks, 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 | 156 ++++++++---- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 221 ++++++----------- 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 | 34 --- 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, 370 insertions(+), 838 deletions(-) delete mode 100644 drivers/gpu/drm/virtio/virtgpu_ttm.c