From patchwork Tue Sep 25 16:16:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 10614385 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 3E8F2112B for ; Tue, 25 Sep 2018 16:16:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DF9C2971D for ; Tue, 25 Sep 2018 16:16:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FFC6297C1; Tue, 25 Sep 2018 16:16:21 +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 B18522971D for ; Tue, 25 Sep 2018 16:16:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D06856E0B3; Tue, 25 Sep 2018 16:16:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by gabe.freedesktop.org (Postfix) with ESMTPS id AD1E46E0B3 for ; Tue, 25 Sep 2018 16:16:15 +0000 (UTC) Received: from ezexps.par1.mozilla.com (unknown [IPv6:2a00:8c40:243:232:20d1:1683:13e1:7cd]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ezequiel) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 570D92639D8; Tue, 25 Sep 2018 17:16:14 +0100 (BST) From: Ezequiel Garcia To: dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org Subject: [PATCH 0/3] virtio: add vmap support for prime objects Date: Tue, 25 Sep 2018 18:16:03 +0200 Message-Id: <20180925161606.17980-1-ezequiel@collabora.com> X-Mailer: git-send-email 2.19.0.rc2 MIME-Version: 1.0 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: David Airlie , Ezequiel Garcia , Gerd Hoffmann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Having the support for vmapping dmabuf's is required to share dmabufs to drivers that want CPU access. This is the case of a vivid to virtio-gpu pipeline, where the virtio-gpu driver exports dmabufs to the video4linux vivid driver. The first patch adds virtio_gpu_object_kunmap() and calls it from the TTM object destroy path. This function will be used to unmap prime objects. The second patch reworks virtio_gpu_object_kmap(), so it's balanced with virtio_gpu_object_kunmap. Finally, the third patch uses virtio_gpu_object_k{map,unmap} to support prime v{map,unmap}. Please review! Ezequiel Garcia (3): virtio: Add virtio_gpu_object_kunmap() virtio: Rework virtio_gpu_object_kmap() virtio: Support prime objects vmap/vunmap drivers/gpu/drm/virtio/virtgpu_drv.h | 3 ++- drivers/gpu/drm/virtio/virtgpu_fb.c | 10 ++-------- drivers/gpu/drm/virtio/virtgpu_object.c | 19 +++++++++++-------- drivers/gpu/drm/virtio/virtgpu_prime.c | 11 ++++++++--- 4 files changed, 23 insertions(+), 20 deletions(-)