From patchwork Thu Aug 29 10:32:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11120885 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 7325F14D5 for ; Thu, 29 Aug 2019 10:33:14 +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 5B9932073F for ; Thu, 29 Aug 2019 10:33:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B9932073F 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 BD8476E09C; Thu, 29 Aug 2019 10:33:10 +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 5951C6E09A for ; Thu, 29 Aug 2019 10:33:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D750218C4272; Thu, 29 Aug 2019 10:33:05 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-95.ams2.redhat.com [10.36.116.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB95E1001938; Thu, 29 Aug 2019 10:33:02 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EFE5E59F2; Thu, 29 Aug 2019 12:33:01 +0200 (CEST) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Subject: [PATCH v9 00/18] drm/virtio: switch from ttm to gem shmem helpers. Date: Thu, 29 Aug 2019 12:32:43 +0200 Message-Id: <20190829103301.3539-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.62]); Thu, 29 Aug 2019 10:33:05 +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. v9: - rebase to latest dem-misc-next, adapt to changes. - fix issues found by Chia-I Wu. 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 | 224 ++++++----------- drivers/gpu/drm/virtio/virtgpu_kms.c | 9 - drivers/gpu/drm/virtio/virtgpu_object.c | 222 ++++++----------- 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, 376 insertions(+), 837 deletions(-) delete mode 100644 drivers/gpu/drm/virtio/virtgpu_ttm.c