Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp448746yba; Fri, 12 Apr 2019 06:52:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxak5V9x5e3NI1oTVFu9lydoi/b3Yym6ssRsAnjjbhwoaYPWzohp9Vqjs4UMo+F65ZAv5lk X-Received: by 2002:a65:4481:: with SMTP id l1mr41062485pgq.66.1555077140063; Fri, 12 Apr 2019 06:52:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555077140; cv=none; d=google.com; s=arc-20160816; b=kifyc/aCDIDosEIH0vlJHMyRxApK54XVbrYlhendbRy6yS43ODRgATZtbkmJwCw94T HG1hGGI5ZECBz6tY5T1V47pZ2mnqxdtFolZzegm5yGr0P58BYxwYLEtzIYGT9oNt0Ruj k7Fw1zZheW1jtqQUDoV0V44xJGvsGvElteEkmn4yMYA+tpwjZwu0rjq5tiesdPTEnw49 h2uYAdHAuTwVhCEuPPEjZdMXZfJPGyYRHq2F8niiD91sXjzt0hrbi6MTGRvqLreL87Xu KXHHVAr7/1gSgu3y5lCZtnSwPrfWka1Rz0OaWe1o6WzFU494wqTqytfJtoidh9h6eb/T kZLw== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=oTn/7cEzxT6/ExcGV0S6BLHNZvfHopFo0zMxOGit248=; b=RYj5ybGSscS0JvukIB5xTS27u1KYccOLraqW667P4Q2PyFams+d/ta9oIKIZus75+R wrqH6+tc7RuBjIbs/edrPpFsOSy3Dy/yXyvf+Cq3zSeB/7vpNGWsGYfoaH4DB1UIU3yV qJ+PgFmKEtQAcna+ZmoNVZnIfHXbJDI4POVM09tPNGq9kGsXDnZpuXFOljc3McWmzw/h ZpQWFb+n0LherFc7jwhLZcQUcnk6iCcZfQP5qA/pX/cv57bfTibWYpg/IOQOq45U5YqY W2N0KOY1oXQ0SLOeRMsbcfgu5d69TEnLRfF8GA2JtmAaQbumEt/bEh+Vf4C4bA42mhQ8 BOAQ== 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 75si39277628pfr.45.2019.04.12.06.52.04; Fri, 12 Apr 2019 06:52:20 -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; 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 S1727048AbfDLNuF (ORCPT + 99 others); Fri, 12 Apr 2019 09:50:05 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:34852 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726829AbfDLNuE (ORCPT ); Fri, 12 Apr 2019 09:50:04 -0400 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id EA2202813B7; Fri, 12 Apr 2019 14:50:00 +0100 (BST) Date: Fri, 12 Apr 2019 15:49:57 +0200 From: Boris Brezillon To: Helen Koike Cc: dri-devel@lists.freedesktop.org, David Airlie , dnicoara@chromium.org, daniels@collabora.com, alexandros.frantzis@collabora.com, daniel.vetter@ffwll.ch, linux-kernel@vger.kernel.org, tomasz Figa , tina.zhang@intel.com, Sean Paul , kernel@collabora.com, nicholas.kazlauskas@amd.com, =?UTF-8?B?U3TDqXBoYW5l?= Marchesin , Gustavo Padovan , Sean Paul , Sandy Huang , linux-doc@vger.kernel.org, Thomas Zimmermann , Jonathan Corbet , Harry Wentland , Alex Deucher , Bhawanpreet Lakha , "David (ChunMing) Zhou" , Anthony Koo , Russell King , linux-rockchip@lists.infradead.org, Ville =?UTF-8?B?U3lyasOkbMOk?= , Rob Clark , Heiko =?UTF-8?B?U3TDvGJuZXI=?= , Eric Anholt , Leo Li , linux-arm-msm@vger.kernel.org, Christian =?UTF-8?B?S8O2bmln?= , linux-arm-kernel@lists.infradead.org, David Francis , Mikita Lipski , amd-gfx@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , freedreno@lists.freedesktop.org, Mamta Shukla , Daniel Vetter Subject: Re: [PATCH v3 2/4] drm/atomic: rename async_{update,check} to amend_{update,check} Message-ID: <20190412154957.558e49f8@collabora.com> In-Reply-To: <20190412125827.5877-3-helen.koike@collabora.com> References: <20190412125827.5877-1-helen.koike@collabora.com> <20190412125827.5877-3-helen.koike@collabora.com> Organization: Collabora X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Helen, On Fri, 12 Apr 2019 09:58:25 -0300 Helen Koike wrote: > Asynchronous update is the ability change the hw state at any time, not > only during vblank. > > Amend mode is the ability to perform 1000 commits to be applied as soon > as possible without waiting for 1000 vblanks. > > async updates can be seen as amend, but the opposite is not true. > > &drm_plane_helper_funcs.atomic_async_{update,check}() was being used by > drivers to implement amend and not async. So rename them to amend. > > Also improve docs explaining the difference. > > If asynchronous is required, normal page flip can be performed using > DRM_MODE_PAGE_FLIP_ASYNC flag. > > Signed-off-by: Helen Koike > > --- > Hello, > > I would like to officially clarify what async update means by adding it > in the docs. > Please correct me if I am wrong, but the current async_{update,check} > callbacks are being used to do amend (the legacy cursor behavior), i.e. > to allow 1000 updates without waiting for 1000 vblanks. Right now, the semantic of async update is driver dependent. Some drivers will amend the last commit touching that plane (amend semantic), others will update the plane buffer immediately which might cause tearing (async semantic). > > So I would like to clarify this in the docs and rename the current > callbacks to reflect this behaviour. I'm all for this clarification, but I don't think renaming the async hooks is a good idea, since some drivers will not do real 'amend'. So, you're changing the name, but it's still confusing :-). How about adding new hooks (and/or flags) for the AMEND case, and keeping the async path untouched. We can then let drivers that currently implement async as amend implement the amend hooks instead. Once you've done that, you can hook that up to the legacy cursor update path so that it first tries one then the other and finally falls back to a sync update if none of ASYNC/AMEND is possible. > > I also see that for real async updates, the flag > DRM_MODE_PAGE_FLIP_ASYNC can be used in a normal sync update (it is > already being used by some drivers actually, in the atomic path, not only > in the legacy page flip, at least is what I understood from > amdgpu_dm_atomic_commit_tail() implementation). Yes, right now, async does not necessarily imply non-block, but Daniel seemed to think that most users want non-block when they do an async page flip, so maybe it should be clarified too. Regards, Boris