From: Daniel Vetter <daniel@ffwll.ch>
To: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Cc: dri-devel@lists.freedesktop.org,
Haneen Mohammed <hamohammed.sa@gmail.com>
Subject: Re: [PATCH V2 3/5] drm/vkms: Add atomic helpers functions
Date: Wed, 11 Jul 2018 09:28:16 +0200 [thread overview]
Message-ID: <20180711072816.GP3008@phenom.ffwll.local> (raw)
In-Reply-To: <8f1a2395378e5d1be02c9fe87a910e23c6ae7afb.1529582970.git.rodrigosiqueiramelo@gmail.com>
On Thu, Jun 21, 2018 at 09:16:41AM -0300, Rodrigo Siqueira wrote:
> This patch adds the struct drm_crtc_helper_funcs with simple
> atomic_check and atomic_enable functions.
>
> Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
> ---
> drivers/gpu/drm/vkms/vkms_crtc.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c
> index bf76cd39ece7..84cc05506b09 100644
> --- a/drivers/gpu/drm/vkms/vkms_crtc.c
> +++ b/drivers/gpu/drm/vkms/vkms_crtc.c
> @@ -19,6 +19,22 @@ static const struct drm_crtc_funcs vkms_crtc_funcs = {
> .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
> };
>
> +static int vkms_crtc_atomic_check(struct drm_crtc *crtc,
> + struct drm_crtc_state *state)
> +{
> + return 0;
> +}
> +
> +static void vkms_crtc_atomic_enable(struct drm_crtc *crtc,
> + struct drm_crtc_state *old_state)
> +{
> +}
Please don't add empty functions when not requird (these callbacks should
all be optional). Also I'd squash this patch in with the patch adding the
vblank hrtimer, splitting this out doesn't really make sense.
-Daniel
> +
> +static const struct drm_crtc_helper_funcs vkms_crtc_helper_funcs = {
> + .atomic_check = vkms_crtc_atomic_check,
> + .atomic_enable = vkms_crtc_atomic_enable,
> +};
> +
> int vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
> struct drm_plane *primary, struct drm_plane *cursor)
> {
> @@ -31,5 +47,7 @@ int vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
> return ret;
> }
>
> + drm_crtc_helper_add(crtc, &vkms_crtc_helper_funcs);
> +
> return ret;
> }
> --
> 2.17.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
next prev parent reply other threads:[~2018-07-11 7:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-21 12:15 [PATCH V2 0/5] drm/vkms: Updates to meet basic kms_flip requirements Rodrigo Siqueira
2018-06-21 12:16 ` [PATCH V2 1/5] drm/vkms: Add dumb operations Rodrigo Siqueira
2018-07-05 20:21 ` Haneen Mohammed
2018-07-11 7:26 ` Daniel Vetter
2018-07-11 14:21 ` Rodrigo Siqueira
2018-07-11 15:05 ` Daniel Vetter
2018-07-06 7:27 ` Chris Wilson
2018-07-06 8:57 ` Daniel Vetter
2018-06-21 12:16 ` [PATCH V2 2/5] drm/vkms: Add helper for framebuffer create Rodrigo Siqueira
2018-06-21 12:16 ` [PATCH V2 3/5] drm/vkms: Add atomic helpers functions Rodrigo Siqueira
2018-07-11 7:28 ` Daniel Vetter [this message]
2018-06-21 12:17 ` [PATCH V2 4/5] drm/vkms: Add connectors helpers Rodrigo Siqueira
2018-07-11 7:29 ` Daniel Vetter
2018-06-21 12:17 ` [PATCH V2 5/5] drm/vkms: Add plane helper struct Rodrigo Siqueira
2018-07-11 7:30 ` 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=20180711072816.GP3008@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hamohammed.sa@gmail.com \
--cc=rodrigosiqueiramelo@gmail.com \
/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