From: Ander Conselvan De Oliveira <conselvan2@gmail.com>
To: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Ben Skeggs <bskeggs@redhat.com>,
dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 1/2] drm: Wrap the check for atomic_commit implementation
Date: Thu, 22 Dec 2016 10:36:01 +0200 [thread overview]
Message-ID: <1482395761.4759.32.camel@gmail.com> (raw)
In-Reply-To: <1482351129-10398-1-git-send-email-dhinakaran.pandiyan@intel.com>
On Wed, 2016-12-21 at 12:12 -0800, Dhinakaran Pandiyan wrote:
> This check is useful for drivers that do not have DRIVER_ATOMIC set but
> have atomic modesetting internally implemented. Wrap the check into a
> function since this is used in many places and as a bonus, the function
> name helps to document what the check is for.
>
> v2:
> Change return type to bool (Ville)
> Move the function drm_atomic.h (Daniel)
>
> Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
> drivers/gpu/drm/drm_fb_helper.c | 6 +++---
> drivers/gpu/drm/nouveau/nouveau_connector.c | 5 +++--
> drivers/gpu/drm/nouveau/nouveau_display.c | 6 +++---
> drivers/gpu/drm/nouveau/nouveau_fbcon.c | 3 ++-
> include/drm/drm_atomic.h | 11 +++++++++++
> 5 files changed, 22 insertions(+), 9 deletions(-)
>
...
> diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
> index 8cc7ca2..43db162 100644
> --- a/include/drm/drm_atomic.h
> +++ b/include/drm/drm_atomic.h
> @@ -419,5 +419,16 @@ drm_atomic_crtc_needs_modeset(const struct drm_crtc_state
> *state)
> state->connectors_changed;
> }
>
> +/* drm_drv_uses_atomic_modeset - check if the driver implements
Shouldn't this be
/**
* drm_drv_uses_atomic_modeset - ...
so it is included in the generated documentation?
Ander
> + * atomic_commit()
> + * @dev: DRM device
> + *
> + * This check is useful if drivers do not have DRIVER_ATOMIC set but
> + * have atomic modesetting internally implemented.
> + */
> +static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev)
> +{
> + return dev->mode_config.funcs->atomic_commit ? true : false;
> +}
>
> #endif /* DRM_ATOMIC_H_ */
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-12-22 8:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-21 1:03 [PATCH 1/2] drm: Wrap the check for atomic_commit implementation Dhinakaran Pandiyan
2016-12-21 1:03 ` [PATCH 2/2] drm: Get atomic property value even if DRIVER_ATOMIC is not set Dhinakaran Pandiyan
2016-12-21 8:53 ` Daniel Vetter
2016-12-21 1:45 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm: Wrap the check for atomic_commit implementation Patchwork
2016-12-21 8:51 ` [PATCH 1/2] " Daniel Vetter
2016-12-21 20:12 ` [PATCH v2 " Dhinakaran Pandiyan
2016-12-21 20:12 ` [PATCH v2 2/2] drm: Get atomic property value even if DRIVER_ATOMIC is not set Dhinakaran Pandiyan
2017-01-03 16:06 ` Alex Deucher
2016-12-22 7:11 ` [PATCH v2 1/2] drm: Wrap the check for atomic_commit implementation Daniel Vetter
2016-12-22 8:07 ` kbuild test robot
2016-12-22 8:36 ` Ander Conselvan De Oliveira [this message]
[not found] ` <1482395761.4759.32.camel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-12-22 8:52 ` [Intel-gfx] " Daniel Vetter
2016-12-22 9:14 ` Pandiyan, Dhinakaran
2016-12-21 9:23 ` [PATCH " Ville Syrjälä
2016-12-21 20:31 ` ✗ Fi.CI.BAT: failure for series starting with [v2,2/2] drm: Get atomic property value even if DRIVER_ATOMIC is not set (rev3) Patchwork
2016-12-21 22:14 ` Pandiyan, Dhinakaran
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=1482395761.4759.32.camel@gmail.com \
--to=conselvan2@gmail.com \
--cc=bskeggs@redhat.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dhinakaran.pandiyan@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=nouveau@lists.freedesktop.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).