linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: Liviu Dudau <Liviu.Dudau@arm.com>, Gustavo Padovan <gustavo@padovan.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	Jonathan Corbet <corbet@lwn.net>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	David Airlie <airlied@linux.ie>,
	Brian Starkey <brian.starkey@arm.com>,
	Alexandru-Cosmin Gheorghe <alexandru-cosmin.gheorghe@arm.com>,
	Boris Brezillon <boris.brezillon@bootlin.com>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Daniel Stone <daniels@collabora.com>,
	Mihail Atanassov <mihail.atanassov@arm.com>,
	Liviu Dudau <liviu.dudau@arm.com>
Subject: Re: [PATCH v8 2/3] drm: writeback: Add out-fences for writeback connectors
Date: Mon, 21 May 2018 12:02:25 -0700	[thread overview]
Message-ID: <87a7ssu91a.fsf@anholt.net> (raw)
In-Reply-To: <20180518151743.29937-3-Liviu.Dudau@arm.com>

[-- Attachment #1: Type: text/plain, Size: 2135 bytes --]

Liviu Dudau <Liviu.Dudau@arm.com> writes:

> From: Brian Starkey <brian.starkey@arm.com>
>
> 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];
>  };
>  
>  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 <eric@anholt.net>

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-05-21 19:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18 15:17 [PATCH v8 0/3] drm: Introduce writeback connectors Liviu Dudau
2018-05-18 15:17 ` [PATCH v8 1/3] drm: Add writeback connector type Liviu Dudau
2018-05-18 15:17 ` [PATCH v8 2/3] drm: writeback: Add out-fences for writeback connectors Liviu Dudau
2018-05-21 19:02   ` Eric Anholt [this message]
2018-05-22 16:35     ` Liviu Dudau
2018-05-18 15:17 ` [PATCH v8 3/3] drm: writeback: Add client capability for exposing " Liviu Dudau
2018-05-23  9:34   ` Maarten Lankhorst
2018-05-23 12:27     ` Liviu Dudau
2018-05-24  7:50       ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a7ssu91a.fsf@anholt.net \
    --to=eric@anholt.net \
    --cc=Liviu.Dudau@arm.com \
    --cc=airlied@linux.ie \
    --cc=alexandru-cosmin.gheorghe@arm.com \
    --cc=boris.brezillon@bootlin.com \
    --cc=brian.starkey@arm.com \
    --cc=corbet@lwn.net \
    --cc=daniels@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo@padovan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=mihail.atanassov@arm.com \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).