Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9657033imu; Wed, 5 Dec 2018 08:15:11 -0800 (PST) X-Google-Smtp-Source: AFSGD/U3aoHOdfwqTvXuFSlp5vA+sZ/KwcUvaS8Eu3DZ+L3Oyq4fyHgTHSwt1RzobpWD+IcwRka8 X-Received: by 2002:a62:2606:: with SMTP id m6mr24374501pfm.133.1544026511907; Wed, 05 Dec 2018 08:15:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544026511; cv=none; d=google.com; s=arc-20160816; b=qwkvsTRsUFvrZO7RCUh8nZIjD80AYR/pj+Ym1UNeXWNn+5CkNTKcHU/ZY36idsPf9M bKk1KMFomc5cRe7iW5ybG+si35kI1lQCr4+SbcukkLqIIgrY7hD1oL1rIqbqTXytknde y9Givi5A3vAvI5dxoya1HQPh/zQ+v4irlAYMIlI6phOzTQ5Oit649j219E9XNMJc6XdD F4X6/Zr0JV8uAr9fW6JuVuaM7/RlUYKvT6cYzvi08gDez24JXvOLi1G/FLgYPg60MFt2 YklRusOYsufvWhx++ppNujGjHoQq+L1C27wMwfFLUGiPjGl2lAXy/RbUcB53xC/PxLgi WB+Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=1YfVyyN0YBnkC0vmpW4wgaL9y6xLdE5NhE08Ry+rRoE=; b=af3iNsU1wX9KaQK3nalIz08/9urXH9EU78bvI+MAQOuLlPJ4GsBJhHG78WjL96x0bK /++iK7tmibExtjNwqzuq/4crrixOh3Q6vnF2YdN/39CUPL6xigNhKte1Azt2ATFS8ED5 q0xWtx6FtyvLf53nRrmucSqcF1bu7lh1SNZHyEwDipg6VViU0uzKoXJVyOU9OeQaAP/U tiiE9ldWVxsp0Qed1giY9VOoidVISXYxzmepYt/3GBS9G64okAUIO/9bMsR9hFJTOOnC Di32EJli5CL3k0BnO6fG25CS2zAZ/6g9lr+qPhtUjnXg87Ct7Bu0tc1WMnyB/ABryp3L KidQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j13si18181841pgi.227.2018.12.05.08.14.54; Wed, 05 Dec 2018 08:15:11 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728355AbeLEQMk (ORCPT + 99 others); Wed, 5 Dec 2018 11:12:40 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:50222 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728093AbeLEQMj (ORCPT ); Wed, 5 Dec 2018 11:12:39 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: koike) with ESMTPSA id BB09426069E Subject: Re: [PATCH] drm: add capability DRM_CAP_ASYNC_UPDATE To: =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= Cc: David Airlie , dnicoara@chromium.org, =?UTF-8?Q?St=c3=a9phane_Marchesin?= , Sean Paul , alexandros.frantzis@collabora.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, tomasz Figa , Gustavo Padovan , kernel@collabora.com, Gustavo Padovan References: <20181123215326.14274-1-helen.koike@collabora.com> <20181127133418.GT9144@intel.com> From: Helen Koike Openpgp: preference=signencrypt Autocrypt: addr=helen.koike@collabora.com; keydata= xsFNBFmOMD4BEADb2nC8Oeyvklh+ataw2u/3mrl+hIHL4WSWtii4VxCapl9+zILuxFDrxw1p XgF3cfx7g9taWBrmLE9VEPwJA6MxaVnQuDL3GXxTxO/gqnOFgT3jT+skAt6qMvoWnhgurMGH wRaA3dO4cFrDlLsZIdDywTYcy7V2bou81ItR5Ed6c5UVX7uTTzeiD/tUi8oIf0XN4takyFuV Rf09nOhi24bn9fFN5xWHJooFaFf/k2Y+5UTkofANUp8nn4jhBUrIr6glOtmE0VT4pZMMLT63 hyRB+/s7b1zkOofUGW5LxUg+wqJXZcOAvjocqSq3VVHcgyxdm+Nv0g9Hdqo8bQHC2KBK86VK vB+R7tfv7NxVhG1sTW3CQ4gZb0ZugIWS32Mnr+V+0pxci7QpV3jrtVp5W2GA5HlXkOyC6C7H Ao7YhogtvFehnlUdG8NrkC3HhCTF8+nb08yGMVI4mMZ9v/KoIXKC6vT0Ykz434ed9Oc9pDow VUqaKi3ey96QczfE4NI029bmtCY4b5fucaB/aVqWYRH98Jh8oIQVwbt+pY7cL5PxS7dQ/Zuz 6yheqDsUGLev1O3E4R8RZ8jPcfCermL0txvoXXIA56t4ZjuHVcWEe2ERhLHFGq5Zw7KC6u12 kJoiZ6WDBYo4Dp+Gd7a81/WsA33Po0j3tk/8BWoiJCrjXzhtRwARAQABzR5IZWxlbiBLb2lr ZSA8aGVsZW5Aa29pa2Vjby5kZT7CwZcEEwEKAEECGwEFCQLEsxQFCwkIBwMFFQoJCAsFFgID AQACHgECF4AWIQSofQA6zrItXEgHWTzAfqwo9yFiXQUCWw2ZAAIZAQAKCRDAfqwo9yFiXajh D/9npW1VeySvAQmnmN4syxEbn+EaHOwFTJKSw6vXx9AX/GToCP+5ULeBjHwR/6e5PAwKcDoB DSFmV2WWpKvHQqC8AEJX6Aq0lXH4Ub5k8F31UIO+0hyTNc/qnL9L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Bvpr0f338auN6jAppov3kMhVlML pJO8M0vqSnKziw57YAyZAa/YwxwkHdpgvMfx/WwRD1LRQxfv/oKJ8Qbomh0bpj9b+UujVW8P F4MD67guCrqrGWSynwzvwWNybEVWV/hykKLa5xtnG6uGUGSO1lnwxUAR17eGWqNwGXYCHpAP zboVPGxw4aUcR80AEQEAAcLBfAQYAQoAJhYhBKh9ADrOsi1cSAdZPMB+rCj3IWJdBQJZjjDJ AhsMBQkCxLJmAAoJEMB+rCj3IWJdY34QAMVy70677f9vXJsYVndP1xmnMYqnI5CEViQ3GP9W k8I2q8nUN3NHyjWe5Ro/UKlj03REymVdtSq7xBRAINQmfgVELvOBEJY6cO8JAujPl4EiJ0kL Y7D0+WfRrMvs/pR9jG7h3e3oG080ezRIkh9amGi1rj/uG39vpBc5avNpvOqqdwyCIyAQuG/Z 00CcD92WMQH3LmZkHJ0A5amZmVp/2NhWFIXnzMGCG+pnenYkYTs+nPwpEeF9aURlT3RQ6MEX te5bno0pQAZmJGlfxzPeId4BXGIlyCBGa8AYVcAH4byD/Lj1CWMuF/n+PQOloCMTUQsWuHJG WAFfICCspjVwzVDZMr3W3dKesrufYdXM0yVlXc39Zvx2sI94tMPaaFGvk758TQohg28OlPFD AxxgkCTrLa8OeJxNJFAz4cmmCWiZbm3SSYLzVFkNozQujL8c3y2U5yM3Tq7RmU9Djxh4s10p OoTFbIyky1af/kDLOBTNMXSNJ95+CDyH4g6rHhYJcjUribIgChGr7eLiSdQCpoyjcOe6n7ua NDLkOLQPocgjJb/AE46aMq67SVffqOTtLZZNPrSKnw/RVt7kbpRrcz5a45oX1x2kwYBBa//G cNC+diAifR6fnbn0lFc5oop99E0SCa0F4V/PYh6myRcqYH8huntTFLvBSYnG/tBYAeu1 Message-ID: <6aa39654-6949-88b3-b949-b338d915ffd2@collabora.com> Date: Wed, 5 Dec 2018 14:12:28 -0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181127133418.GT9144@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ville On 11/27/18 11:34 AM, Ville Syrjälä wrote: > On Fri, Nov 23, 2018 at 07:53:26PM -0200, Helen Koike wrote: >> Allow userspace to identify if the driver supports async update. > > And what exactly is an "async update"? I agree we are lacking docs on this, I'll send in the next version as soon as we agree on a name (please see below). For reference: https://lists.freedesktop.org/archives/dri-devel/2017-April/138586.html > > I keep asking people to come up with the a better name for this, and to > document what it actually means. Recently I've been think we should > maybe just adopt the vulkan terminology (immediate/fifo/mailbox) to > avoid introducing yet another set of names for the same thing. We'd > still want to document things properly though. Another name it was suggested was "atomic amend", this feature basically allows userspace to complement an update previously sent (i.e. its in the queue and wasn't commited yet), it allows adding a plane update to the next commit. So what do you think in renaming it to "atomic amend"? Or do you suggest another name? I am not familiar with vulkan terminology. Thanks Helen > >> >> Signed-off-by: Enric Balletbo i Serra >> [prepared for upstream] >> Signed-off-by: Helen Koike >> >> --- >> Hi, >> >> This patch introduces the ASYNC_UPDATE cap, which originated from the >> discussion regarding DRM_MODE_ATOMIC_AMEND on [1], to allow user to >> figure that async_update exists. >> >> This was tested using a small program that exercises the uAPI for easy >> sanity testing. The program was created by Alexandros and modified by >> Enric to test the capability flag [2]. >> >> The test worked on a rockchip Ficus v1.1 board on top of mainline plus >> the patch to update cursors asynchronously through atomic plus the patch >> that introduces the ATOMIC_AMEND flag for the drm/rockchip driver. >> >> To test, just build the program and use the --atomic flag to use the cursor >> plane with the ATOMIC_AMEND flag. E.g. >> >> drm_cursor --atomic >> >> [1] https://patchwork.freedesktop.org/patch/243088/ >> [2] https://gitlab.collabora.com/eballetbo/drm-cursor/commits/async-capability >> >> Thanks >> Helen >> >> >> drivers/gpu/drm/drm_ioctl.c | 11 +++++++++++ >> include/uapi/drm/drm.h | 1 + >> 2 files changed, 12 insertions(+) >> >> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c >> index 94bd872d56c4..4a7e0f874171 100644 >> --- a/drivers/gpu/drm/drm_ioctl.c >> +++ b/drivers/gpu/drm/drm_ioctl.c >> @@ -31,6 +31,7 @@ >> #include >> #include >> #include >> +#include >> #include "drm_legacy.h" >> #include "drm_internal.h" >> #include "drm_crtc_internal.h" >> @@ -229,6 +230,7 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_ >> { >> struct drm_get_cap *req = data; >> struct drm_crtc *crtc; >> + struct drm_plane *plane; >> >> req->value = 0; >> >> @@ -292,6 +294,15 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_ >> case DRM_CAP_CRTC_IN_VBLANK_EVENT: >> req->value = 1; >> break; >> + case DRM_CAP_ASYNC_UPDATE: >> + req->value = 1; >> + list_for_each_entry(plane, &dev->mode_config.plane_list, head) { >> + if (!plane->helper_private->atomic_async_update) { >> + req->value = 0; >> + break; >> + } >> + } >> + break; >> default: >> return -EINVAL; >> } >> diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h >> index 300f336633f2..ff01540cbb1d 100644 >> --- a/include/uapi/drm/drm.h >> +++ b/include/uapi/drm/drm.h >> @@ -649,6 +649,7 @@ struct drm_gem_open { >> #define DRM_CAP_PAGE_FLIP_TARGET 0x11 >> #define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12 >> #define DRM_CAP_SYNCOBJ 0x13 >> +#define DRM_CAP_ASYNC_UPDATE 0x14 >> >> /** DRM_IOCTL_GET_CAP ioctl argument type */ >> struct drm_get_cap { >> -- >> 2.19.1 >> >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/dri-devel >