All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
	David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Liviu Dudau <liviu.dudau@arm.com>,
	dri-devel@lists.freedesktop.org,
	Andrzej Hajda <a.hajda@samsung.com>,
	Nirmoy Das <nirmoy.das@amd.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mihail Atanassov <Mihail.Atanassov@arm.com>,
	Emil Velikov <emil.velikov@collabora.com>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	David Francis <David.Francis@amd.com>,
	James Qian Wang <james.qian.wang@arm.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Jonas Karlman <jonas@kwiboo.se>,
	Mikita Lipski <mikita.lipski@amd.com>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Andrzej Pietrasiewicz <andrzej.p@collabora.com>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Alex Deucher <alexander.deucher@amd.com>
Subject: Re: [PATCH v1 4/6] drm: writeback: document callbacks
Date: Tue, 31 Mar 2020 09:53:18 +0200	[thread overview]
Message-ID: <20200331075318.GF2363188@phenom.ffwll.local> (raw)
In-Reply-To: <20200328132025.19910-5-sam@ravnborg.org>

On Sat, Mar 28, 2020 at 02:20:23PM +0100, Sam Ravnborg wrote:
> Document the callbacks:
>     drm_connector_helper_funcs.prepare_writeback_job
>     drm_connector_helper_funcs.cleanup_writeback_job
> 
> The documentation was pulled from the changelong introducing the
> callbacks, originally written by Laurent.
> 
> Addign the missing documentation fixes the following warnings:
> drm_modeset_helper_vtables.h:1052: warning: Function parameter or member 'prepare_writeback_job' not described in 'drm_connector_helper_funcs'
> drm_modeset_helper_vtables.h:1052: warning: Function parameter or member 'cleanup_writeback_job' not described in 'drm_connector_helper_funcs'
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: David Airlie <airlied@linux.ie>
> ---
>  include/drm/drm_modeset_helper_vtables.h | 31 ++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h
> index 7c20b1c8b6a7..c51bca1ffec7 100644
> --- a/include/drm/drm_modeset_helper_vtables.h
> +++ b/include/drm/drm_modeset_helper_vtables.h
> @@ -1075,8 +1075,39 @@ struct drm_connector_helper_funcs {
>  	void (*atomic_commit)(struct drm_connector *connector,
>  			      struct drm_connector_state *state);
>  
> +	/**
> +	 * @prepare_writeback_job:

Formatting looks funny, your linebreaks here won't go into the generated
html and are a bit unusual. I'd remove them and just flow this as a full
paragraph.

> +	 *
> +	 * As writeback jobs contain a framebuffer, drivers may need to
> +	 * prepare and cleanup them the same way they can prepare and
> +	 * cleanup framebuffers for planes.
> +	 * This optional connector operation is used to support the
> +	 * preparation of writeback jobs.
> +	 * The job prepare operation is called from
> +	 * drm_atomic_helper_prepare_planes() to avoid a new atomic commit
> +	 * helper that would need to be called by all drivers not using
> +	 * drm_atomic_helper_commit().

I'd delete "to avoid a new ..." until the end of the sentence. That feels
more like stuff in the commit message/review than kernel docs for driver
writers.

Instead maybe add "... for struct &drm_writeback_connector connectors
only." This gives us a nice link to the writeback docs, and makes it clear
that this isn't some general prep/cleanup thing. Similar addition below.

> +	 *
> +	 * This hook is optional.
> +	 *
> +	 * This callback is used by the atomic modeset helpers.
> +	 */
>  	int (*prepare_writeback_job)(struct drm_writeback_connector *connector,
>  				     struct drm_writeback_job *job);
> +	/**
> +	 * @cleanup_writeback_job:
> +	 *
> +	 * This optional connector operation is used to support the
> +	 * cleanup of writeback jobs.
> +	 * The job cleanup operation is called from the existing
> +	 * drm_writeback_cleanup_job() function, invoked both when
> +	 * destroying the job as part of a aborted commit, or when
> +	 * the job completes.
> +	 *
> +	 * This hook is optional.
> +	 *
> +	 * This callback is used by the atomic modeset helpers.
> +	 */
>  	void (*cleanup_writeback_job)(struct drm_writeback_connector *connector,
>  				      struct drm_writeback_job *job);

With the bikesheds addressed as you see fit:

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Also Laurent owes you one, I've been pestering to fill this gap in his
docs since forever ...

Cheers, Daniel

>  };
> -- 
> 2.20.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-03-31  7:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-28 13:20 [PATCH v1 0/6] drm: kernel-doc stuff Sam Ravnborg
2020-03-28 13:20 ` [PATCH v1 1/6] drm/vblank: Add intro to documentation Sam Ravnborg
2020-03-30 11:29   ` Thomas Zimmermann
2020-03-30 18:56     ` Sam Ravnborg
2020-03-30 18:57   ` [PATCH v2 " Sam Ravnborg
2020-03-30 21:51     ` Lyude Paul
2020-03-31  6:14       ` Thomas Zimmermann
2020-03-31  7:55       ` Daniel Vetter
2020-03-28 13:20 ` [PATCH v1 2/6] drm/fb: fix kernel-doc in drm_framebuffer.h Sam Ravnborg
2020-03-30 11:35   ` Andrzej Pietrasiewicz
2020-03-30 19:02     ` Sam Ravnborg
2020-03-28 13:20 ` [PATCH v1 3/6] drm/sched: fix kernel-doc in gpu_scheduler.h Sam Ravnborg
2020-03-31  7:54   ` Daniel Vetter
2020-04-05 20:38   ` Sam Ravnborg
2020-03-28 13:20 ` [PATCH v1 4/6] drm: writeback: document callbacks Sam Ravnborg
2020-03-31  7:53   ` Daniel Vetter [this message]
2020-04-05 22:56     ` Laurent Pinchart
2020-03-28 13:20 ` [PATCH v1 5/6] drm/dp_mst: add kernel-doc for drm_dp_mst_port.fec_capable Sam Ravnborg
2020-03-30 15:01   ` Lyude Paul
2020-03-30 19:05     ` Sam Ravnborg
2020-03-28 13:20 ` [PATCH v1 6/6] drm/bridge: fix kernel-doc warning in panel.c Sam Ravnborg
2020-03-31  7:48   ` Daniel Vetter
2020-04-05 20:37   ` Sam Ravnborg

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=20200331075318.GF2363188@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=David.Francis@amd.com \
    --cc=Mihail.Atanassov@arm.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=andrzej.p@collabora.com \
    --cc=boris.brezillon@collabora.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.velikov@collabora.com \
    --cc=james.qian.wang@arm.com \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=liviu.dudau@arm.com \
    --cc=mikita.lipski@amd.com \
    --cc=narmstrong@baylibre.com \
    --cc=nirmoy.das@amd.com \
    --cc=sam@ravnborg.org \
    --cc=tzimmermann@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.