Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp450401ybh; Wed, 11 Mar 2020 04:22:52 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvzdUfeKhL1+3ea9yDqq45I/57J0N0e5rLqlSF5LBChYGBmaVjAQpk6imNdtSfxEfVzfqe0 X-Received: by 2002:a9d:6d96:: with SMTP id x22mr1984497otp.264.1583925772760; Wed, 11 Mar 2020 04:22:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583925772; cv=none; d=google.com; s=arc-20160816; b=V5D6VcOR9k/corsDuw5JVfsVIovLNz34JAiK9l9RHzJygke1ZLs1BskCGpYagRlI1k kqBU/r5EACfUSR3CsD9196HTFmCtVFrJjmbB2KjGHAt7AIY/YayhGXqlMQJd1Kk01+ha bET9hkXt1at2+/GZA5WejgvB/bUhlFuz0jO2L3oOQaNuWpmSWrZ9yyvLtRA/FbjlYwTt kJj/YkruVUNZ8IF3nGcrZiHmLTdLeRxeI6PTLvCLOxOTQ/dMMuH7woM7lt2LCwZUCESN BN3hmQpxXdBuM+bl8EICVD/l+x76t4Jz+xkXKYrBaFEyu9r1EJqTvvK9aCVYPNsO5M38 pT8Q== 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=KxW/JHv7DCd6LJdHZguy7LpVn/rmry23ZMXy1XI084k=; b=GXOiwLHyPq69Rkmf1YFDbq0HojrO4xUOB1MqmrgapInzfj8+Aa/SZeVs4RF5+X06Qw 1gy21ucsaLLH0XbDvWpHGyMdf9M0WKcA0qGDRr8tC6JnUsVPJC0Q40AC/8OKkjBgfZuw +21JFp2gZy2XVS9VH97LgF9dQZQulC4+bKyE+Bh/SOR9PMt85txf8RfWCKmpiTEkolCc hshR7OH+/fn65l/NrgVfhcn1O6G/6Hux0i2A+SBdxQIW2K40yS0QXxy5ISL2vFHO1Emv /20YrezYuGf9awkmvVrlrJ+xlKRQqADBBn4MxrwzSDrJIDv5N1ChNNHOL5NBsGcQ7il+ GPig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="fBOA7Z4/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id i1si129955oor.83.2020.03.11.04.22.40; Wed, 11 Mar 2020 04:22:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="fBOA7Z4/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1729016AbgCKLUV (ORCPT + 99 others); Wed, 11 Mar 2020 07:20:21 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:36042 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbgCKLUU (ORCPT ); Wed, 11 Mar 2020 07:20:20 -0400 Received: by mail-pf1-f196.google.com with SMTP id i13so1155318pfe.3 for ; Wed, 11 Mar 2020 04:20:18 -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=KxW/JHv7DCd6LJdHZguy7LpVn/rmry23ZMXy1XI084k=; b=fBOA7Z4/VSkvDegFBNVqp2pLUAlgBxRv5RhOTNT8p2xHiAPXkjWsHMTxUl1BPV00zJ vMY5dhyEKkfjXmFfYLzpD5a73p+KDdMSaC4nhV9dQ1R32BqiNxXeCSXBpA7Ii2Wer4pC VDfF4BA+tuEYJwFmE32LvvNq/AN2GVAmGN3hs= 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=KxW/JHv7DCd6LJdHZguy7LpVn/rmry23ZMXy1XI084k=; b=V63AFGj7hKySR3UVWdCj1zReqEG6MRdDXyMM4xt1aTftSMb/gBTfojseKbuFZTS+t1 S5dECt9+5mLE4RMuTPOQu+TI6uqEdi5jwTvJFvINfju0uJYmrS+QgwrnvXBxnbUQPrLu pkW3k6sE++sMuGup9AGQIhbddWd3hzwtJgjMGLqvmjUO087iBiucEM0hd/YT838lP5kR OdukMPRXTStEO3sKno9UuRhGMR0rDzPzhqtWJY/2uE5gdX1taD0dWvuw8Hd60PsA8dRO GFlZVrl8sQXJFzMtr8Fqiu85zihKnUNzjQsod4knny9QOM2udt2R/LzmLxQ6iVgZiT6m X9rg== X-Gm-Message-State: ANhLgQ0VEEv2CA0mk2ySa/OakGJkGcS9GQJTJBZtUpqXpmaY1SCl6Kkl F8HlEiyR2ZO5tqADzfiNNd9syg== X-Received: by 2002:a63:4d6:: with SMTP id 205mr2392870pge.10.1583925617855; Wed, 11 Mar 2020 04:20:17 -0700 (PDT) Received: from localhost ([2401:fa00:8f:203:30f2:7a9c:387e:6c7]) by smtp.gmail.com with ESMTPSA id e12sm35842384pff.168.2020.03.11.04.20.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Mar 2020 04:20:17 -0700 (PDT) From: David Stevens To: Gerd Hoffmann , David Airlie Cc: Daniel Vetter , "Michael S . Tsirkin" , Jason Wang , Sumit Semwal , 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 v3 0/4] Support virtio cross-device resources Date: Wed, 11 Mar 2020 20:20:00 +0900 Message-Id: <20200311112004.47138-1-stevensd@chromium.org> X-Mailer: git-send-email 2.25.1.481.gfbce0eb801-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], with minor changes based on recent comments. It is expected that this will be used to import virtio resources into the virtio-video driver currently under discussion [2]. This patchset adds a new hook to dma-buf, for querying the dma-buf's underlying virtio UUID. This hook is then plumbed through DRM PRIME buffers, and finally implemented in virtgpu. [1] https://markmail.org/thread/jsaoqy7phrqdcpqu [2] https://markmail.org/thread/p5d3k566srtdtute v2 -> v3 changes: - Remove ifdefs. - Simplify virtgpu_gem_prime_export as it can only be called once. - Use virtio_gpu_vbuffer's objs field instead of abusing data_buf. David Stevens (4): dma-buf: add support for virtio exported objects drm/prime: add support for virtio exported objects virtio-gpu: add VIRTIO_GPU_F_RESOURCE_UUID feature drm/virtio: Support virtgpu exported resources drivers/dma-buf/dma-buf.c | 12 ++++++ drivers/gpu/drm/drm_prime.c | 23 +++++++++++ drivers/gpu/drm/virtio/virtgpu_drv.c | 3 ++ drivers/gpu/drm/virtio/virtgpu_drv.h | 18 +++++++++ drivers/gpu/drm/virtio/virtgpu_kms.c | 4 ++ drivers/gpu/drm/virtio/virtgpu_prime.c | 41 +++++++++++++++++-- drivers/gpu/drm/virtio/virtgpu_vq.c | 55 ++++++++++++++++++++++++++ include/drm/drm_drv.h | 10 +++++ include/linux/dma-buf.h | 18 +++++++++ include/uapi/linux/virtio_gpu.h | 19 +++++++++ 10 files changed, 200 insertions(+), 3 deletions(-) -- 2.25.1.481.gfbce0eb801-goog