Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp659917imm; Mon, 21 May 2018 12:03:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoNFCpNy79govFIFVmkWht/XA6ELRBKvYMI1aSeZ9ItqKt9vWnB9FM5MigUvriotaVI6ZSI X-Received: by 2002:a65:5a4a:: with SMTP id z10-v6mr16770266pgs.243.1526929428788; Mon, 21 May 2018 12:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526929428; cv=none; d=google.com; s=arc-20160816; b=asQaqjKfJ05Xqmx3Pl6ke9LSAR53y1hq6S1fvFSTXrBDohf7KKG8/mz8QNhGG7TqIY fNGjZYCYketRhKjJvIcZf2pLaNnxyTTSnFOvZc3g9mVKYvyQwKAMGASvc5aN9mmIQ94+ K/J3yVJF2eGpPu5cXWuwOMpE0KnUKI7p8OAeO/H+LVJIC00Co+ni/NVNqE2KrXITO5Vx XMNcUGolc3aQxUuCy5XWlrOxq0KnJUgsAJ2Tlwrs8OWmj0Q/vjtUwgEWvpmeIxvHNlZm b9ss61RszfKJifZPIllCcBr+7lVMW1LvD6RnqJEwGFYmkKUzqcU65lTS1GEhMBF7/fnC Nvng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from :arc-authentication-results; bh=vLygbX3jhlV0KqSmkL4UFitzDhQ+NobyP8mmbuIPigg=; b=un+l1eoc82NZVMJYXK8q++bQ+v8XkhpbjTDs1gU70kF0WR2xbkyQuLWS+yXU0/5dfK KPq8136njsZQWYTY8flqQ5Wp2VGrSEPIlsJyOwijcmh5/ZQzLRTOkKBd3aajHH7XmZsG S2HQm3GuC4ROiW5j/T2sQEOtX4BQwI4qO9sv5ffMyi6ERgaaaenqSU7iFISN5bNPMGru +afC+tGyhq4BwY+lEmZ3QXoW13ru2aMj0fn2Skk/m+BCLfjKFM6iSDHq82IMGVBH6N1L BRS1BgiyJgQzOKViy6uqVRr7kJQVr/zJagrt9uSh8OgA6l0GArEG5CatUQt9qNlOxFzC FmGg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f66-v6si11398472pgc.391.2018.05.21.12.03.26; Mon, 21 May 2018 12:03:48 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751245AbeEUTCe (ORCPT + 99 others); Mon, 21 May 2018 15:02:34 -0400 Received: from anholt.net ([50.246.234.109]:50466 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751171AbeEUTC3 (ORCPT ); Mon, 21 May 2018 15:02:29 -0400 Received: from localhost (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 1933A10A13EC; Mon, 21 May 2018 12:02:29 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at anholt.net Received: from anholt.net ([127.0.0.1]) by localhost (kingsolver.anholt.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id g_lEpoAH2PPT; Mon, 21 May 2018 12:02:27 -0700 (PDT) Received: from eliezer.anholt.net (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 8523C10A03B7; Mon, 21 May 2018 12:02:27 -0700 (PDT) Received: by eliezer.anholt.net (Postfix, from userid 1000) id A9C322FE2D94; Mon, 21 May 2018 20:02:25 +0100 (BST) From: Eric Anholt To: Liviu Dudau , Gustavo Padovan Cc: Maarten Lankhorst , Sean Paul , Jonathan Corbet , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, David Airlie , Brian Starkey , Alexandru-Cosmin Gheorghe , Boris Brezillon , Maxime Ripard , Daniel Stone , Mihail Atanassov , Liviu Dudau Subject: Re: [PATCH v8 2/3] drm: writeback: Add out-fences for writeback connectors In-Reply-To: <20180518151743.29937-3-Liviu.Dudau@arm.com> References: <20180518151743.29937-1-Liviu.Dudau@arm.com> <20180518151743.29937-3-Liviu.Dudau@arm.com> User-Agent: Notmuch/0.22.2+1~gb0bcfaa (http://notmuchmail.org) Emacs/25.2.2 (x86_64-pc-linux-gnu) Date: Mon, 21 May 2018 12:02:25 -0700 Message-ID: <87a7ssu91a.fsf@anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Liviu Dudau writes: > From: Brian Starkey > > Add the WRITEBACK_OUT_FENCE_PTR property to writeback connectors, to > enable userspace to get a fence which will signal once the writeback is > complete. It is not allowed to request an out-fence without a > framebuffer attached to the connector. > > A timeline is added to drm_writeback_connector for use by the writeback > out-fences. > diff --git a/include/drm/drm_writeback.h b/include/drm/drm_writeback.h > index cf3a28676006a..6a7462c1821ad 100644 > --- a/include/drm/drm_writeback.h > +++ b/include/drm/drm_writeback.h > @@ -49,6 +49,32 @@ struct drm_writeback_connector { > * drm_writeback_signal_completion() > */ > struct list_head job_queue; > + > + /** > + * @fence_context: > + * > + * timeline context used for fence operations. > + */ > + unsigned int fence_context; > + /** > + * @fence_lock: > + * > + * spinlock to protect the fences in the fence_context. > + */ > + spinlock_t fence_lock; > + /** > + * @fence_seqno: > + * > + * Seqno variable used as monotonic counter for the fences > + * created on the connector's timeline. > + */ > + unsigned long fence_seqno; > + /** > + * @timeline_name: > + * > + * The name of the connector's fence timeline. > + */ > + char timeline_name[32]; > }; >=20=20 > struct drm_writeback_job { > @@ -59,12 +85,14 @@ struct drm_writeback_job { > * framebuffer reference to a workqueue. > */ > struct work_struct cleanup_work; > + > /** > * @list_entry: > * > * List item for the connector's @job_queue > */ > struct list_head list_entry; > + > /** > * @fb: > * Move this hunk into patch 1? Other than that, the series is: Reviewed-by: Eric Anholt It's pretty clean and makes sense to me. I only had some questions about the job_queue, which seems superfluous if we aren't supporting firing off a new writeback while an old one is outstanding (and maybe we should throw an error in that case). Still, I think this is ready to land. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlsDF8EACgkQtdYpNtH8 nui3QBAAoUEW51kGUOOKfarNq8LMbKyqq5hDO7Qndhuy74lvD3W5plcoexdZ+671 O/OMjiqPRWU2fZzaQJoamc9JVGIX23A49LnWfLIiH6DXHi3im7olMW4atyXrK1g4 zyUhQQ5LyKsQbuUIMfMJSDTYWxkb37MbH8a0X19RKTHufZeJW52fLml8vvfcMShT /4H3LmeBcz5EoOWo+hbuRMq8bbxJzwQ4O5BGAIof/0TaDz4UDGR4TsRbgbDaCTnl hJmCba56RmvHNxYdbPnR0S9v1QW+oQiVKR1AGAnskKlF/mHKHPVQjwP+OuvOBgXP cdrIA3W/IEBMYc+ngpBSX9829nDIuN/aElLUMXJxq5xiYyP0LOfdR7TPLyn1tkzO RfSRHWFdDQ9t1/WmwIDz7XQePxyQ4OSdlAFvPy+xPfUgdATsz95Mt+N8au1uY3ug jss/9umXB3zxblgwhqPHXs7V2BBds0H6XiW6eHQOCoMkGF6nHnQQNUtgl6jVL45j 92wNUlLnWjLb9jAEhLLJdc7wLv7kz5PtlhkbksYEJra5G1Sinx/ILUIPhmC0X9SR HlEYn2v4DNWQTVafJgZzvxVpcNoJSFGLIcwe9+Yaav58dGAxrGn1Aqagh3aut1vn rmhzCaWgtPdagPnbQEMYKvzquRd7NKQVgzlvL/1sIc53W8hcN+w= =Kl6p -----END PGP SIGNATURE----- --=-=-=--