From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA61DC48BE5 for ; Wed, 23 Jun 2021 09:22:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A68BA611AD for ; Wed, 23 Jun 2021 09:22:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230161AbhFWJZK (ORCPT ); Wed, 23 Jun 2021 05:25:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230044AbhFWJZI (ORCPT ); Wed, 23 Jun 2021 05:25:08 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6567BC061756 for ; Wed, 23 Jun 2021 02:22:51 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id b5-20020a17090a9905b029016fc06f6c5bso1006019pjp.5 for ; Wed, 23 Jun 2021 02:22:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel-co-jp.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XCajk1HrAlj47wC3+mkOuYZYpFGTdG0u/TJUK9omw44=; b=ZjaDBmTSrHRM+Wans1JDGrXnF8h56nSyQWJrnDOhiSu9Q2czUooggcFrZeW5OrFfGe 4InlIJCaoDJvC2qM1tPyx5lrta50x/dPQl987+0qPfsgKDObwYOPDB7LmJS8+1QJB6Ww rS4dOgQLwHHqitlVJ9tG0jT4jxLfdMi+JjSzv7Ow1bmZGT5tnQ66jeeP+GqznH6E+7lp thH4WClVdZFYI68gRa5P93BRi8ycisjAk5KtuygYecegAGiEiByTGSGKIi1V/awM5lFS qvSiNzLRZFXxpal4mpSeK0GodO80oZtbqoDYsqQ5OFx5ifVecqcyFaVxnOkGI1Ao75tN jbtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XCajk1HrAlj47wC3+mkOuYZYpFGTdG0u/TJUK9omw44=; b=e2nLfxZ20vfQ5nX+u1mNKcM8lNIuEKykO60Lq7WDXGW1xIpXMT2u9luzxA8C/BCzfv uGXPY/SsrlMatxfCRFP0JWK+oYE4Y9NTBkq7syBGTeAyXSXcF63j5viCdOBnur8RXRNA TiA4eQhKiSSgNiid2e/NuLsZmutnY5LCvJgHSpVkKy6hnAWXsAbZ0owRK19DFluCiK0m 0mOxZVbMnhMv5HjBWMU7GkBlX5hlbwKuFljc+DsAYxm5Q/j7wlHl8KH/HveXjjkMTiLg QpGgH8gzJ3ZRLyTsBaH3IhkuaM2D/fF9Fl7yp0Q9/fwOZkJvwS1EvC0Xtf7ohs6ihsLp DIzA== X-Gm-Message-State: AOAM531trfWZ8NFuiyVP6LkcbZdLaa2zBYcmtyGws7Ur1wMt6pkW/Kc7 UuQWS4dK73uGSGfdnEer1YQe8A== X-Google-Smtp-Source: ABdhPJylI81T3ZuU7pYZAujPUun/oGmu1PBLOBoGTzRXKdXQoIrLIXIJFcNz/PaxrTYzrPhhtomd+w== X-Received: by 2002:a17:902:8601:b029:11c:4b4:e967 with SMTP id f1-20020a1709028601b029011c04b4e967mr26767197plo.75.1624440170945; Wed, 23 Jun 2021 02:22:50 -0700 (PDT) Received: from ?IPv6:240b:10:c9a0:ca00:d428:46bd:365e:3555? ([240b:10:c9a0:ca00:d428:46bd:365e:3555]) by smtp.gmail.com with ESMTPSA id q9sm460pgt.31.2021.06.23.02.22.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Jun 2021 02:22:50 -0700 (PDT) Subject: Re: [PATH 0/4] [RFC] Support virtual DRM To: Pekka Paalanen Cc: "Enrico Weigelt, metux IT consult" , devicetree@vger.kernel.org, Takanari Hayama , Thomas Zimmermann , linux-doc@vger.kernel.org, David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Kieran Bingham , Laurent Pinchart , Damian Hobson-Garcia References: <20210621062742.26073-1-etom@igel.co.jp> <7cde82a9-c60c-e527-eeac-eaad0c5842a1@metux.net> <1cfab5f9-f275-aa53-00de-5da3fcea71c5@igel.co.jp> <20210622111239.73aa87aa@eldfell> <20210623113922.1e603139@eldfell> From: Esaki Tomohito Message-ID: Date: Wed, 23 Jun 2021 18:22:47 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210623113922.1e603139@eldfell> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/06/23 17:39, Pekka Paalanen wrote: > On Wed, 23 Jun 2021 15:56:05 +0900 > Esaki Tomohito wrote: > >> Hi, >> Thank you all for your comments. >> >> On 2021/06/22 17:12, Pekka Paalanen wrote: >>> On Tue, 22 Jun 2021 13:03:39 +0900 >>> Esaki Tomohito wrote: >>> >>>> Hi, Enrico Weigelt >>>> Thank you for reply. >>>> >>>> On 2021/06/22 1:05, Enrico Weigelt, metux IT consult wrote: >>>>> On 21.06.21 08:27, Tomohito Esaki wrote: >>>>> >>>>> Hi, >>>>> >>>>>> 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. >>>>> >>>>> Are you attempting to create an simple in-kernel compositor ? >>>> >>>> I think the basic idea is the same as DRMlease. >>> >>> Hi, >>> >>> indeed. Why not use DRM leases instead? >>> >> >> In this use case, I understand that this is not possible with DRM lease, >> am I wrong? >> I understand that it’s not possible to lease a plane and update planes >> on the same output independently from different processes in current DRM >> lease. >> >> If this is correct, what do you think of adding support for plane leases >> to the DRM lease to handle this case? > > Hi, > > I would love to see support added for leasing individual planes, > especially to replace the virtual DRM proposal which seems to be > eradicating everything that atomic modesetting and nuclear pageflip > have built over the many years. > > However, please note that "on the same output independently" is > physically impossible. Semantically, the planes define what a CRTC > scans out, and the CRTC defines the scanout timings. Therefore it is not > possible to update individual planes independently, they will all > always share the timings of the CRTC. > > That combined with KMS not allowing multiple updates to be queued at > the same time for the same CRTC (atomic commits and legacy pageflips > returning EBUSY) makes the plane updates very much inter-dependent. > > If you want to avoid EBUSY and have planes update on the vblank you > intended, you really need a userspace compositor to pull everything > together *before* submitting anything to the kernel. Hi, Thank you for your comments and advice. I will consider leasing a plane. Thanks, Esaki From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DF5BC49EA4 for ; Wed, 23 Jun 2021 09:22:54 +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 B37FA611AD for ; Wed, 23 Jun 2021 09:22:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B37FA611AD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=igel.co.jp 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 3D7056E894; Wed, 23 Jun 2021 09:22:53 +0000 (UTC) Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5873E6E894 for ; Wed, 23 Jun 2021 09:22:51 +0000 (UTC) Received: by mail-pj1-x1033.google.com with SMTP id bb20so1155311pjb.3 for ; Wed, 23 Jun 2021 02:22:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=igel-co-jp.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XCajk1HrAlj47wC3+mkOuYZYpFGTdG0u/TJUK9omw44=; b=ZjaDBmTSrHRM+Wans1JDGrXnF8h56nSyQWJrnDOhiSu9Q2czUooggcFrZeW5OrFfGe 4InlIJCaoDJvC2qM1tPyx5lrta50x/dPQl987+0qPfsgKDObwYOPDB7LmJS8+1QJB6Ww rS4dOgQLwHHqitlVJ9tG0jT4jxLfdMi+JjSzv7Ow1bmZGT5tnQ66jeeP+GqznH6E+7lp thH4WClVdZFYI68gRa5P93BRi8ycisjAk5KtuygYecegAGiEiByTGSGKIi1V/awM5lFS qvSiNzLRZFXxpal4mpSeK0GodO80oZtbqoDYsqQ5OFx5ifVecqcyFaVxnOkGI1Ao75tN jbtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XCajk1HrAlj47wC3+mkOuYZYpFGTdG0u/TJUK9omw44=; b=gE8N8FzzDIXZ57nNqy9xN4Vt33IcHH/NusZTkN7TiOFIp6KFsCZPjzdU9iQQWY03PT v9dRmzDR1RAhmOfymIMwgwwd5/qoEocOluHLNLrP1Xo+Eyf1jfDvjMrbmGgowno9Lc4V dUn4ygWbpL7nCIErSeiE5KYLeQN2RwksD3zl7iWacEwggwk6muN1nhVGN00cVHOZ1AH9 MoDcwgXtBzGRnen2+MMmLK/UV0KH5JSt7r60yge/mtx1FmQwyic7+2O8Cy4XPrEzEpNP KxvwntcJwAV2H/ySMxmtWCgRycNZlkieA3qviHNGkrr+kPA1/4yaCER7PokT8ws5aRAk j26A== X-Gm-Message-State: AOAM531DZi37HqgIErjrHJdJWlZEslPtCGM69urJ4n0OYUhQHPJJQDYv MD0iOhx3xPGUO3sz4Guxh2ujdQ== X-Google-Smtp-Source: ABdhPJylI81T3ZuU7pYZAujPUun/oGmu1PBLOBoGTzRXKdXQoIrLIXIJFcNz/PaxrTYzrPhhtomd+w== X-Received: by 2002:a17:902:8601:b029:11c:4b4:e967 with SMTP id f1-20020a1709028601b029011c04b4e967mr26767197plo.75.1624440170945; Wed, 23 Jun 2021 02:22:50 -0700 (PDT) Received: from ?IPv6:240b:10:c9a0:ca00:d428:46bd:365e:3555? ([240b:10:c9a0:ca00:d428:46bd:365e:3555]) by smtp.gmail.com with ESMTPSA id q9sm460pgt.31.2021.06.23.02.22.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Jun 2021 02:22:50 -0700 (PDT) Subject: Re: [PATH 0/4] [RFC] Support virtual DRM To: Pekka Paalanen References: <20210621062742.26073-1-etom@igel.co.jp> <7cde82a9-c60c-e527-eeac-eaad0c5842a1@metux.net> <1cfab5f9-f275-aa53-00de-5da3fcea71c5@igel.co.jp> <20210622111239.73aa87aa@eldfell> <20210623113922.1e603139@eldfell> From: Esaki Tomohito Message-ID: Date: Wed, 23 Jun 2021 18:22:47 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210623113922.1e603139@eldfell> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Takanari Hayama , linux-doc@vger.kernel.org, David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Kieran Bingham , "Enrico Weigelt, metux IT consult" , Laurent Pinchart , Thomas Zimmermann , Damian Hobson-Garcia Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 2021/06/23 17:39, Pekka Paalanen wrote: > On Wed, 23 Jun 2021 15:56:05 +0900 > Esaki Tomohito wrote: > >> Hi, >> Thank you all for your comments. >> >> On 2021/06/22 17:12, Pekka Paalanen wrote: >>> On Tue, 22 Jun 2021 13:03:39 +0900 >>> Esaki Tomohito wrote: >>> >>>> Hi, Enrico Weigelt >>>> Thank you for reply. >>>> >>>> On 2021/06/22 1:05, Enrico Weigelt, metux IT consult wrote: >>>>> On 21.06.21 08:27, Tomohito Esaki wrote: >>>>> >>>>> Hi, >>>>> >>>>>> 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. >>>>> >>>>> Are you attempting to create an simple in-kernel compositor ? >>>> >>>> I think the basic idea is the same as DRMlease. >>> >>> Hi, >>> >>> indeed. Why not use DRM leases instead? >>> >> >> In this use case, I understand that this is not possible with DRM lease, >> am I wrong? >> I understand that it’s not possible to lease a plane and update planes >> on the same output independently from different processes in current DRM >> lease. >> >> If this is correct, what do you think of adding support for plane leases >> to the DRM lease to handle this case? > > Hi, > > I would love to see support added for leasing individual planes, > especially to replace the virtual DRM proposal which seems to be > eradicating everything that atomic modesetting and nuclear pageflip > have built over the many years. > > However, please note that "on the same output independently" is > physically impossible. Semantically, the planes define what a CRTC > scans out, and the CRTC defines the scanout timings. Therefore it is not > possible to update individual planes independently, they will all > always share the timings of the CRTC. > > That combined with KMS not allowing multiple updates to be queued at > the same time for the same CRTC (atomic commits and legacy pageflips > returning EBUSY) makes the plane updates very much inter-dependent. > > If you want to avoid EBUSY and have planes update on the vblank you > intended, you really need a userspace compositor to pull everything > together *before* submitting anything to the kernel. Hi, Thank you for your comments and advice. I will consider leasing a plane. Thanks, Esaki