Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2747220pxa; Mon, 17 Aug 2020 18:39:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOI0EAx0BK6tjEL16t77+z/gh9TxyRNyKQRSg7gvyl14t/eJ6JUHcPi7knwW1OPOtL30lm X-Received: by 2002:aa7:ccd5:: with SMTP id y21mr17212927edt.91.1597714743833; Mon, 17 Aug 2020 18:39:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597714743; cv=none; d=google.com; s=arc-20160816; b=EukZIgnP3F4VwYxw14rYh/zXPsRVH9QGIUolXkRfPNoMztmuYgJG6rXw6eRUt+dLND SZEhDYXV4ZnjW1qo/Wuqn9TqbcJgx4AvEPfIDx3Qg7dO+Iu6a6vuNIs/TyOX4qyNxHA0 VjhiekJc3lE5di8qCB30dVZCJcwf0ma0/LVVbo8TBF0mdda4D3ROaPTmEVlSwLVaJAgX Ud2U4LvAdmHE5zjFg2GkhmCugBDqvVtH8m97NzucBJnWV8ABSl0CaZfDiJ75DGTRg0SV hgwa+mRkbAMryG7/Bvl7Br8NWwJwseA/rqxJO/2IUXNK7HxtAiX7zpcR67L9TIT8QkA6 RHlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=VKh9IL3wAtvMWfoyCMPIJCvNUxcYwDemhkEsAUpJ8lo=; b=SgI6JfcwLNMSSqt5KZkJ/RxidHTp+8FhzHx3jlPjzfxzlsYlWO4lavla+Smr5SBtSY AFMDK1c8NYorF1S9Kq1ZjNIHlspez4LvYPBtIwVbGOFFtxtyjQSzDD1uCvUbThRFSCz+ LUcnCYhACCjsyW94/iCHlh3lv9RNGaawpDD8FURZ2n+oyeA79VpTZAadRUUSS1ApYI1m SxynVrAuP9hvzIcQGGksN6/KEE8R+3nHOTULEmUMdEXZOJSAwrKN7blW3TaeAwvZW+NG Bu1QvYqCTr9KJQP2BbXg1tqV9auptKs/itGTg58sgwqiM0tfh6do+zdHF1qyG7f5wUwY 6Q5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PpDkXzww; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s13si12394328edx.216.2020.08.17.18.38.39; Mon, 17 Aug 2020 18:39:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PpDkXzww; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726444AbgHRBh4 (ORCPT + 99 others); Mon, 17 Aug 2020 21:37:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726272AbgHRBhw (ORCPT ); Mon, 17 Aug 2020 21:37:52 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 594DCC061389 for ; Mon, 17 Aug 2020 18:37:52 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id bh1so8442271plb.12 for ; Mon, 17 Aug 2020 18:37:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VKh9IL3wAtvMWfoyCMPIJCvNUxcYwDemhkEsAUpJ8lo=; b=PpDkXzwwJnQbFULXuaCZmFAzHkMYds94xj9YOEbRQIDZP94f5AIguahC9HLAqMzfqe HZo+oLLrI8WjWPoEUYBDKMzFALzRY0smgK2z8FhA0gTW6+15QKk+sBnRoiloCW4HD1Tg /lbl1EzXVpT9Bbqf4asPikFMaMTCUurQjIIik= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VKh9IL3wAtvMWfoyCMPIJCvNUxcYwDemhkEsAUpJ8lo=; b=pyMpb/tNydD7V17XgLBzIteeSU+2qJPM9qgJpFtq0Fo9Nj8/guqPbDupzeznTT8Z5E iNYWVxD2pvSne/0LBlPqX8L8QpP0STPGT+CGJBUkOQ6pEy39naOuQUw61lLDhkzFAy8k 1JYoqrFkHhhFHTHV7mgCg2GPdKOJznY0WpQdyfOJ33ZdJDDd0N0v80rXPy0jrMsJ39P7 TIAQA2r/BqWFZS+kJ9zXnBx4+MSfH8nb2f6iL6ty3/akHxfUd2/ixRnOSIqtMC9+Xfg8 9E6IqntHK9a40JHvL2KwGxd0SuBxh13txIOzrH5bKTPV+JGQTzKzdWfJCM+H2NQq7dHS fIKQ== X-Gm-Message-State: AOAM530d0BFKv7CmG788BudV7o601UtJLbhC0PqXE+qzUh/LTE5XwZOT fHm3JTOOV+Iu9Ghew7VwtYqW1A== X-Received: by 2002:a17:90b:1c06:: with SMTP id oc6mr14032262pjb.182.1597714671684; Mon, 17 Aug 2020 18:37:51 -0700 (PDT) Received: from localhost ([2401:fa00:8f:203:f693:9fff:fef4:a930]) by smtp.gmail.com with ESMTPSA id e8sm21616835pfd.34.2020.08.17.18.37.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Aug 2020 18:37:50 -0700 (PDT) From: David Stevens To: Gerd Hoffmann Cc: David Airlie , Daniel Vetter , Sumit Semwal , "Michael S . Tsirkin" , Jason Wang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Stevens , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, virtio-dev@lists.oasis-open.org Subject: [PATCH v6 0/3] Support virtio cross-device resources Date: Tue, 18 Aug 2020 10:37:41 +0900 Message-Id: <20200818013744.3327271-1-stevensd@chromium.org> X-Mailer: git-send-email 2.28.0.220.ged08abb693-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset implements the current proposal for virtio cross-device resource sharing [1]. It will be used to import virtio resources into the virtio-video driver currently under discussion [2]. The patch under consideration to add support in the virtio-video driver is [3]. It uses the APIs from v3 of this series, but the changes to update it are relatively minor. This patchset adds a new flavor of dma-bufs that supports querying the underlying virtio object UUID, as well as adding support for exporting resources from virtgpu. [1] https://markmail.org/thread/2ypjt5cfeu3m6lxu [2] https://markmail.org/thread/p5d3k566srtdtute [3] https://markmail.org/thread/j4xlqaaim266qpks v5 -> v6 changes: - Fix >80 character comment David Stevens (3): virtio: add dma-buf support for exported objects virtio-gpu: add VIRTIO_GPU_F_RESOURCE_UUID feature drm/virtio: Support virtgpu exported resources drivers/gpu/drm/virtio/virtgpu_drv.c | 3 + drivers/gpu/drm/virtio/virtgpu_drv.h | 20 ++++++ drivers/gpu/drm/virtio/virtgpu_kms.c | 4 ++ drivers/gpu/drm/virtio/virtgpu_prime.c | 96 +++++++++++++++++++++++++- drivers/gpu/drm/virtio/virtgpu_vq.c | 55 +++++++++++++++ drivers/virtio/Makefile | 2 +- drivers/virtio/virtio.c | 6 ++ drivers/virtio/virtio_dma_buf.c | 82 ++++++++++++++++++++++ include/linux/virtio.h | 1 + include/linux/virtio_dma_buf.h | 37 ++++++++++ include/uapi/linux/virtio_gpu.h | 19 +++++ 11 files changed, 321 insertions(+), 4 deletions(-) create mode 100644 drivers/virtio/virtio_dma_buf.c create mode 100644 include/linux/virtio_dma_buf.h -- 2.28.0.220.ged08abb693-goog