From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org,
airlied@linux.ie, daniel@ffwll.ch, bskeggs@redhat.com,
kherbst@redhat.com, lyude@redhat.com,
kieran.bingham+renesas@ideasonboard.com, jyri.sarha@iki.fi,
tomba@kernel.org, sam@ravnborg.org,
dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 4/4] drm/plane-helper: Provide DRM_PLANE_NON_ATOMIC_FUNCS initializer macro
Date: Fri, 16 Sep 2022 14:22:33 +0300 [thread overview]
Message-ID: <YyRceTY7YxafwF7L@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220909105947.6487-5-tzimmermann@suse.de>
Hi Thomas,
Thank you for the patch.
On Fri, Sep 09, 2022 at 12:59:47PM +0200, Thomas Zimmermann wrote:
> Provide DRM_PLANE_NON_ATOMIC_FUNCS, which initializes plane functions
> of non-atomic drivers to default values. The macro is not supposed to
> be used in new code, but helps with documenting and finding existing
> users.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/gpu/drm/drm_modeset_helper.c | 4 +---
> drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 +---
> include/drm/drm_plane_helper.h | 12 ++++++++++++
> 3 files changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_modeset_helper.c b/drivers/gpu/drm/drm_modeset_helper.c
> index 38040eebfa16..f858dfedf2cf 100644
> --- a/drivers/gpu/drm/drm_modeset_helper.c
> +++ b/drivers/gpu/drm/drm_modeset_helper.c
> @@ -108,9 +108,7 @@ static const uint32_t safe_modeset_formats[] = {
> };
>
> static const struct drm_plane_funcs primary_plane_funcs = {
> - .update_plane = drm_plane_helper_update_primary,
> - .disable_plane = drm_plane_helper_disable_primary,
> - .destroy = drm_plane_helper_destroy,
> + DRM_PLANE_NON_ATOMIC_FUNCS,
> };
>
> /**
> diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> index 6b8a014b5e97..ee92d576d277 100644
> --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> @@ -1276,9 +1276,7 @@ static const uint32_t modeset_formats[] = {
> };
>
> static const struct drm_plane_funcs nv04_primary_plane_funcs = {
> - .update_plane = drm_plane_helper_update_primary,
> - .disable_plane = drm_plane_helper_disable_primary,
> - .destroy = drm_plane_helper_destroy,
> + DRM_PLANE_NON_ATOMIC_FUNCS,
> };
>
> static int nv04_crtc_vblank_handler(struct nvif_notify *notify)
> diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h
> index 1781fab24dd6..75f9c4830564 100644
> --- a/include/drm/drm_plane_helper.h
> +++ b/include/drm/drm_plane_helper.h
> @@ -42,4 +42,16 @@ int drm_plane_helper_disable_primary(struct drm_plane *plane,
> struct drm_modeset_acquire_ctx *ctx);
> void drm_plane_helper_destroy(struct drm_plane *plane);
>
> +/**
> + * DRM_PLANE_NON_ATOMIC_FUNCS - Default plane functions for non-atomic drivers
> + *
> + * This macro initializes plane functions for non-atomic drivers to default
> + * values. Non-atomic interfaces are deprecated and should not be used in new
> + * drivers.
I wonder if we could teach checkpath.pl to catch new users.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> + */
> +#define DRM_PLANE_NON_ATOMIC_FUNCS \
> + .update_plane = drm_plane_helper_update_primary, \
> + .disable_plane = drm_plane_helper_disable_primary, \
> + .destroy = drm_plane_helper_destroy
> +
> #endif
--
Regards,
Laurent Pinchart
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: tomba@kernel.org, airlied@linux.ie, sam@ravnborg.org,
dri-devel@lists.freedesktop.org,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
linux-renesas-soc@vger.kernel.org,
kieran.bingham+renesas@ideasonboard.com, bskeggs@redhat.com,
daniel@ffwll.ch, nouveau@lists.freedesktop.org,
jyri.sarha@iki.fi
Subject: Re: [Nouveau] [PATCH 4/4] drm/plane-helper: Provide DRM_PLANE_NON_ATOMIC_FUNCS initializer macro
Date: Fri, 16 Sep 2022 14:22:33 +0300 [thread overview]
Message-ID: <YyRceTY7YxafwF7L@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220909105947.6487-5-tzimmermann@suse.de>
Hi Thomas,
Thank you for the patch.
On Fri, Sep 09, 2022 at 12:59:47PM +0200, Thomas Zimmermann wrote:
> Provide DRM_PLANE_NON_ATOMIC_FUNCS, which initializes plane functions
> of non-atomic drivers to default values. The macro is not supposed to
> be used in new code, but helps with documenting and finding existing
> users.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/gpu/drm/drm_modeset_helper.c | 4 +---
> drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 +---
> include/drm/drm_plane_helper.h | 12 ++++++++++++
> 3 files changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_modeset_helper.c b/drivers/gpu/drm/drm_modeset_helper.c
> index 38040eebfa16..f858dfedf2cf 100644
> --- a/drivers/gpu/drm/drm_modeset_helper.c
> +++ b/drivers/gpu/drm/drm_modeset_helper.c
> @@ -108,9 +108,7 @@ static const uint32_t safe_modeset_formats[] = {
> };
>
> static const struct drm_plane_funcs primary_plane_funcs = {
> - .update_plane = drm_plane_helper_update_primary,
> - .disable_plane = drm_plane_helper_disable_primary,
> - .destroy = drm_plane_helper_destroy,
> + DRM_PLANE_NON_ATOMIC_FUNCS,
> };
>
> /**
> diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> index 6b8a014b5e97..ee92d576d277 100644
> --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> @@ -1276,9 +1276,7 @@ static const uint32_t modeset_formats[] = {
> };
>
> static const struct drm_plane_funcs nv04_primary_plane_funcs = {
> - .update_plane = drm_plane_helper_update_primary,
> - .disable_plane = drm_plane_helper_disable_primary,
> - .destroy = drm_plane_helper_destroy,
> + DRM_PLANE_NON_ATOMIC_FUNCS,
> };
>
> static int nv04_crtc_vblank_handler(struct nvif_notify *notify)
> diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h
> index 1781fab24dd6..75f9c4830564 100644
> --- a/include/drm/drm_plane_helper.h
> +++ b/include/drm/drm_plane_helper.h
> @@ -42,4 +42,16 @@ int drm_plane_helper_disable_primary(struct drm_plane *plane,
> struct drm_modeset_acquire_ctx *ctx);
> void drm_plane_helper_destroy(struct drm_plane *plane);
>
> +/**
> + * DRM_PLANE_NON_ATOMIC_FUNCS - Default plane functions for non-atomic drivers
> + *
> + * This macro initializes plane functions for non-atomic drivers to default
> + * values. Non-atomic interfaces are deprecated and should not be used in new
> + * drivers.
I wonder if we could teach checkpath.pl to catch new users.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> + */
> +#define DRM_PLANE_NON_ATOMIC_FUNCS \
> + .update_plane = drm_plane_helper_update_primary, \
> + .disable_plane = drm_plane_helper_disable_primary, \
> + .destroy = drm_plane_helper_destroy
> +
> #endif
--
Regards,
Laurent Pinchart
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: tomba@kernel.org, kherbst@redhat.com, airlied@linux.ie,
sam@ravnborg.org, dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org,
kieran.bingham+renesas@ideasonboard.com, bskeggs@redhat.com,
nouveau@lists.freedesktop.org, jyri.sarha@iki.fi
Subject: Re: [PATCH 4/4] drm/plane-helper: Provide DRM_PLANE_NON_ATOMIC_FUNCS initializer macro
Date: Fri, 16 Sep 2022 14:22:33 +0300 [thread overview]
Message-ID: <YyRceTY7YxafwF7L@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220909105947.6487-5-tzimmermann@suse.de>
Hi Thomas,
Thank you for the patch.
On Fri, Sep 09, 2022 at 12:59:47PM +0200, Thomas Zimmermann wrote:
> Provide DRM_PLANE_NON_ATOMIC_FUNCS, which initializes plane functions
> of non-atomic drivers to default values. The macro is not supposed to
> be used in new code, but helps with documenting and finding existing
> users.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/gpu/drm/drm_modeset_helper.c | 4 +---
> drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 +---
> include/drm/drm_plane_helper.h | 12 ++++++++++++
> 3 files changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_modeset_helper.c b/drivers/gpu/drm/drm_modeset_helper.c
> index 38040eebfa16..f858dfedf2cf 100644
> --- a/drivers/gpu/drm/drm_modeset_helper.c
> +++ b/drivers/gpu/drm/drm_modeset_helper.c
> @@ -108,9 +108,7 @@ static const uint32_t safe_modeset_formats[] = {
> };
>
> static const struct drm_plane_funcs primary_plane_funcs = {
> - .update_plane = drm_plane_helper_update_primary,
> - .disable_plane = drm_plane_helper_disable_primary,
> - .destroy = drm_plane_helper_destroy,
> + DRM_PLANE_NON_ATOMIC_FUNCS,
> };
>
> /**
> diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> index 6b8a014b5e97..ee92d576d277 100644
> --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> @@ -1276,9 +1276,7 @@ static const uint32_t modeset_formats[] = {
> };
>
> static const struct drm_plane_funcs nv04_primary_plane_funcs = {
> - .update_plane = drm_plane_helper_update_primary,
> - .disable_plane = drm_plane_helper_disable_primary,
> - .destroy = drm_plane_helper_destroy,
> + DRM_PLANE_NON_ATOMIC_FUNCS,
> };
>
> static int nv04_crtc_vblank_handler(struct nvif_notify *notify)
> diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h
> index 1781fab24dd6..75f9c4830564 100644
> --- a/include/drm/drm_plane_helper.h
> +++ b/include/drm/drm_plane_helper.h
> @@ -42,4 +42,16 @@ int drm_plane_helper_disable_primary(struct drm_plane *plane,
> struct drm_modeset_acquire_ctx *ctx);
> void drm_plane_helper_destroy(struct drm_plane *plane);
>
> +/**
> + * DRM_PLANE_NON_ATOMIC_FUNCS - Default plane functions for non-atomic drivers
> + *
> + * This macro initializes plane functions for non-atomic drivers to default
> + * values. Non-atomic interfaces are deprecated and should not be used in new
> + * drivers.
I wonder if we could teach checkpath.pl to catch new users.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> + */
> +#define DRM_PLANE_NON_ATOMIC_FUNCS \
> + .update_plane = drm_plane_helper_update_primary, \
> + .disable_plane = drm_plane_helper_disable_primary, \
> + .destroy = drm_plane_helper_destroy
> +
> #endif
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2022-09-16 11:22 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-09 10:59 [PATCH 0/4] drm/plane: Remove drm_plane_init(), plus other cleanups Thomas Zimmermann
2022-09-09 10:59 ` Thomas Zimmermann
2022-09-09 10:59 ` [Nouveau] " Thomas Zimmermann
2022-09-09 10:59 ` [PATCH 1/4] drm/plane: Remove drm_plane_init() Thomas Zimmermann
2022-09-09 10:59 ` Thomas Zimmermann
2022-09-09 10:59 ` [Nouveau] " Thomas Zimmermann
2022-09-09 18:24 ` Lyude Paul
2022-09-09 18:24 ` Lyude Paul
2022-09-09 18:24 ` [Nouveau] " Lyude Paul
2022-09-16 11:00 ` Javier Martinez Canillas
2022-09-16 11:00 ` [Nouveau] " Javier Martinez Canillas
2022-09-16 11:05 ` Laurent Pinchart
2022-09-16 11:05 ` Laurent Pinchart
2022-09-16 11:05 ` [Nouveau] " Laurent Pinchart
2022-09-09 10:59 ` [PATCH 2/4] drm/plane: Allocate planes with drm_universal_plane_alloc() Thomas Zimmermann
2022-09-09 10:59 ` Thomas Zimmermann
2022-09-09 10:59 ` [Nouveau] " Thomas Zimmermann
2022-09-16 11:06 ` Laurent Pinchart
2022-09-16 11:06 ` Laurent Pinchart
2022-09-16 11:06 ` [Nouveau] " Laurent Pinchart
2022-09-16 11:31 ` Thomas Zimmermann
2022-09-16 11:31 ` Thomas Zimmermann
2022-09-16 11:31 ` [Nouveau] " Thomas Zimmermann
2022-09-19 14:45 ` Laurent Pinchart
2022-09-19 14:45 ` Laurent Pinchart
2022-09-19 14:45 ` [Nouveau] " Laurent Pinchart
2022-09-16 11:22 ` Javier Martinez Canillas
2022-09-16 11:22 ` [Nouveau] " Javier Martinez Canillas
2022-09-16 11:41 ` Thomas Zimmermann
2022-09-16 11:41 ` [Nouveau] " Thomas Zimmermann
2022-09-16 11:51 ` Javier Martinez Canillas
2022-09-16 11:51 ` [Nouveau] " Javier Martinez Canillas
2022-09-09 10:59 ` [PATCH 3/4] drm/plane-helper: Warn if atomic drivers call non-atomic helpers Thomas Zimmermann
2022-09-09 10:59 ` Thomas Zimmermann
2022-09-09 10:59 ` [Nouveau] " Thomas Zimmermann
2022-09-16 11:20 ` Laurent Pinchart
2022-09-16 11:20 ` Laurent Pinchart
2022-09-16 11:20 ` [Nouveau] " Laurent Pinchart
2022-09-16 11:23 ` Javier Martinez Canillas
2022-09-16 11:23 ` [Nouveau] " Javier Martinez Canillas
2022-09-09 10:59 ` [PATCH 4/4] drm/plane-helper: Provide DRM_PLANE_NON_ATOMIC_FUNCS initializer macro Thomas Zimmermann
2022-09-09 10:59 ` Thomas Zimmermann
2022-09-09 10:59 ` [Nouveau] " Thomas Zimmermann
2022-09-16 11:22 ` Laurent Pinchart [this message]
2022-09-16 11:22 ` Laurent Pinchart
2022-09-16 11:22 ` [Nouveau] " Laurent Pinchart
2022-09-16 11:24 ` Javier Martinez Canillas
2022-09-16 11:24 ` [Nouveau] " Javier Martinez Canillas
2022-09-09 18:39 ` [PATCH 0/4] drm/plane: Remove drm_plane_init(), plus other cleanups Lyude Paul
2022-09-09 18:39 ` Lyude Paul
2022-09-09 18:39 ` [Nouveau] " Lyude Paul
2022-09-13 9:06 ` [PATCH 1/4] drm/plane: Remove drm_plane_init() jyri.sarha
2022-09-13 9:06 ` jyri.sarha
2022-09-13 9:06 ` [Nouveau] " jyri.sarha
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=YyRceTY7YxafwF7L@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=airlied@linux.ie \
--cc=bskeggs@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jyri.sarha@iki.fi \
--cc=kherbst@redhat.com \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=sam@ravnborg.org \
--cc=tomba@kernel.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.