Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3505601pxj; Sun, 20 Jun 2021 23:31:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxER5NSnSlGjLhPdvWd2LRA36N+xSxJSg1Lb1aMwd4WwyqeFAgBDYw6c4xJl+dHFQDPWdtr X-Received: by 2002:a17:906:bfc9:: with SMTP id us9mr9252761ejb.493.1624257061648; Sun, 20 Jun 2021 23:31:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624257061; cv=none; d=google.com; s=arc-20160816; b=QaIxazPb9DfY/noBipa+gOstOgfoDF+zG9MHeU5S5JbyY289aAR5jbvRpZS/IwNtmH KKP3F4A9XtLbQh0dVT2ktpN0260r+NQeOqrYX4N5RDbJE1w2ROTLuaaJ6dwcOf/MmszZ aYPjM3J2hsC5TAimJcQ1xIBTRbFB3lNXJhbcYcnCw6lOCp16pO/PSa69HOzIO/2yWqB7 C3gykNIVU7TGHp4iMpgVMYXbALH+T4+5u4AQMfGHPWXHW6WZTbfmo8WGR2OIar8RIF7u Aac7mRwXvSLCOyOleHqVw0HpdS/howaEOw9knrhUyztOSUoe5/Kdjsy2ofSssS98Bp0C LIBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=joRwT0q9NaqfpgsKIsE3xhVvDKPswfCw3wuGCcbWU2U=; b=CenCEDd05VLFoOheKd6w1bwKqYRl4Zr8qDa4wtkbIo8o111pvzcDkh/4u7uTTYcE9O yuteYwt2wL6FVTIz4PO96rnzdUXcNucDfn+BfXnUZyraEFV3yW/Va995s8+YuVurhaMn rTrMuotYYCHvEXaf0zrfzfUBkQ3+yMo2rz7esciU+E65Enqe3aIFJTttk/hQ+KmE8pyG EmEzVSYziTqA5wwLSNDSMAnDXrbZ//aqetMZfWGFR2g5WsYvRYLcFAD9k+Ph/Mez/D5/ iV6yrbz8EF2uspivRKebyIoiR8LxY1wYFanZgtNVADclrAgpJU6dUR3R4dOpTZGaD1f4 o06g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@igel-co-jp.20150623.gappssmtp.com header.s=20150623 header.b=oO4+NEa7; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si434099edq.404.2021.06.20.23.30.40; Sun, 20 Jun 2021 23:31:01 -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=@igel-co-jp.20150623.gappssmtp.com header.s=20150623 header.b=oO4+NEa7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229887AbhFUGbp (ORCPT + 99 others); Mon, 21 Jun 2021 02:31:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229897AbhFUGbp (ORCPT ); Mon, 21 Jun 2021 02:31:45 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74DA6C06175F for ; Sun, 20 Jun 2021 23:29:31 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id h4so1803997pgp.5 for ; Sun, 20 Jun 2021 23:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel-co-jp.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=joRwT0q9NaqfpgsKIsE3xhVvDKPswfCw3wuGCcbWU2U=; b=oO4+NEa7uCveb6pA1vB1tapg9Nc9Gohnks3tl90Ha5Gb2poOGoVmMLjFK+QALZMfnj 0qA807ILIHnQt2K70J0DOVZRObs+plL0B/UgmCeFxtk+b/7fVk27gL5t359qMsjIT80H TEIqx1mTZpYGqe7jrHDD00+9uUS3qy38Bi/djH0KJcmQ5F1CKQLrDBUvEZnPs9GObLMI dUDavRlrV7H2muuL6FaeNUl4MRo5q12NU+eiQxP2cRrO82v/eDHTok7AzfFfI31bd4S2 pJ3v/r0a3h4AiVlEHBoiwFTcidRcXQeXbvp9K3BLbB5a4IJmZG3cOLwi5yUiFjTMBFVE Y18g== 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=joRwT0q9NaqfpgsKIsE3xhVvDKPswfCw3wuGCcbWU2U=; b=TJ04bKWzyw8fo0Op1A4mRiOWa2woVmHbby0PMKdQIRDm6mbxTDg6ogT/XtKAdClL7I OMey6Hbdr4f/vKVVHNmYUMwxCXnGWACduop1GDUYmgDPhb0Pl7gSEIOBF9oaWHc9J8R0 4i5aoS0BfieCeXe05qztiGqZCNu+Zukl2d6o4IJbsIXirHgG1/Pd1Yp4Z4DUsHLxF1rQ kmd8C3qPsk+y51FSC1OCAPH3fCR76/mYB9vhmmgzkE1TfUbtqAizlhHebEQXnxe6+m7U AAidjF/tii7fcKDE0DYbETzaApGN35pQnW+KQyouq+j/naOX8jH/EXA21upqv9yqCBqC rVtg== X-Gm-Message-State: AOAM531aWClvALhzWnHYem6ic1USthwryaFOxD+QwQSRxBeTmlNzkEQ5 PsvzmtdSL9tx0HKNoBPfRZJdNZj752KguWWL X-Received: by 2002:a63:d06:: with SMTP id c6mr9256885pgl.121.1624256970905; Sun, 20 Jun 2021 23:29:30 -0700 (PDT) Received: from localhost.localdomain ([240b:10:c9a0:ca00:61b8:26ec:dc30:8823]) by smtp.gmail.com with ESMTPSA id j19sm15266018pgm.44.2021.06.20.23.29.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Jun 2021 23:29:30 -0700 (PDT) From: Tomohito Esaki To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Laurent Pinchart , Kieran Bingham Cc: dri-devlel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, Tomohito Esaki Subject: [PATH 0/4] [RFC] Support virtual DRM Date: Mon, 21 Jun 2021 15:27:38 +0900 Message-Id: <20210621062742.26073-1-etom@igel.co.jp> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Virtual DRM splits the overlay planes of a display controller into multiple virtual devices to allow each plane to be accessed by each process. This makes it possible to overlay images output from multiple processes on a display. For example, one process displays the camera image without compositor while another process overlays the UI. Virtual DRM driver doesn’t directly control the display hardware and has no access to the physical bus. Instead, the virtual DRM driver issues requests to the standard DRM device driver (parent) when the hardware needs to be controlled. The parent is modified to notify the virtual DRM driver of interruptevents from the display hardware. Therefore, in order to use virtual DRM, each DRM device driver needs to add code to support virutal DRM. The only driver supported in this patch series is rcar-du. This patch series is divided into multiple. The first patch adds vDRM feature to DRM, and the second patch support vDRM for the rcar-du driver. The other patches add documentation. In particular, I would appreciate your advice on the following points: * virtual DRM generalization I've only tested with rcar-du, is there anything I should consider to make virtual DRM work with other drivers? * Integration to upstream I think it is a good idea to add virtual DRM to the DRM core functionality, but I would appreciate any suggestions on what needs to be improved for integration to upstream. * dumb_create and fb_create callback I think that the dumb_create and fb_create callbacks need to be done by the parent, and it is preferable to use the parent's callbacks as they are. However, since the dumb buffer needs to be registered in the parent and the fb handle needs to be registered in the drm_file of the vDRM, the dumb_create callbacks from the parent driver cannot be used as is. Therefore, the current implementation of the dumb_create callback is workarround. What do you think is the best way to deal with this issue? Tomohito Esaki (4): Add Virtual DRM device driver rcar-du: Add support virtual DRM device dt-bindings: display: Add virtual DRM doc-rst: Add virtual DRM documentation .../devicetree/bindings/display/vdrm.yaml | 67 ++ Documentation/gpu/drivers.rst | 1 + Documentation/gpu/vdrm.rst | 51 ++ drivers/gpu/drm/Kconfig | 7 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/rcar-du/Kconfig | 4 + drivers/gpu/drm/rcar-du/Makefile | 1 + drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 42 + drivers/gpu/drm/rcar-du/rcar_du_crtc.h | 13 + drivers/gpu/drm/rcar-du/rcar_du_drv.c | 13 + drivers/gpu/drm/rcar-du/rcar_du_drv.h | 3 + drivers/gpu/drm/rcar-du/rcar_du_vdrm.c | 191 ++++ drivers/gpu/drm/rcar-du/rcar_du_vdrm.h | 67 ++ drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 22 + drivers/gpu/drm/rcar-du/rcar_du_vsp.h | 1 + drivers/gpu/drm/vdrm/vdrm_api.h | 68 ++ drivers/gpu/drm/vdrm/vdrm_drv.c | 859 ++++++++++++++++++ drivers/gpu/drm/vdrm/vdrm_drv.h | 80 ++ 18 files changed, 1491 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/vdrm.yaml create mode 100644 Documentation/gpu/vdrm.rst create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_vdrm.c create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_vdrm.h create mode 100644 drivers/gpu/drm/vdrm/vdrm_api.h create mode 100644 drivers/gpu/drm/vdrm/vdrm_drv.c create mode 100644 drivers/gpu/drm/vdrm/vdrm_drv.h -- 2.25.1