dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Paul <seanpaul@chromium.org>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 01/15] drm: move drv test macros out of drmP.h
Date: Thu, 12 Jul 2018 09:52:21 -0400	[thread overview]
Message-ID: <20180712135221.GZ20303@art_vandelay> (raw)
In-Reply-To: <20180709084016.23750-2-daniel.vetter@ffwll.ch>

On Mon, Jul 09, 2018 at 10:40:02AM +0200, Daniel Vetter wrote:
> Last bit the prevented us from starting to delete the drmP.h monster
> includes from source files!
> 
> Also add kernel-doc while moving them.
> 
> A nice consistent drm_dev_ prefix would be cute for these, but since
> they're used everywhere I've figured I'll leave this bikeshed aside
> for now.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> ---
>  include/drm/drmP.h    | 19 -------------------
>  include/drm/drm_drv.h | 29 +++++++++++++++++++++++++++++
>  2 files changed, 29 insertions(+), 19 deletions(-)
> 
> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> index c5dfbdb7271d..f7a19c2a7a80 100644
> --- a/include/drm/drmP.h
> +++ b/include/drm/drmP.h
> @@ -102,25 +102,6 @@ struct pci_controller;
>  #define DRM_SWITCH_POWER_CHANGING 2
>  #define DRM_SWITCH_POWER_DYNAMIC_OFF 3
>  
> -static inline bool drm_core_check_feature(struct drm_device *dev, int feature)
> -{
> -	return dev->driver->driver_features & feature;
> -}
> -
> -/**
> - * drm_drv_uses_atomic_modeset - check if the driver implements
> - * 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 drm_core_check_feature(dev, DRIVER_ATOMIC) ||
> -		dev->mode_config.funcs->atomic_commit != NULL;
> -}
> -
>  /* returns true if currently okay to sleep */
>  static inline bool drm_can_sleep(void)
>  {
> diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
> index 7e545f5f94d3..46a8009784df 100644
> --- a/include/drm/drm_drv.h
> +++ b/include/drm/drm_drv.h
> @@ -649,6 +649,35 @@ static inline bool drm_dev_is_unplugged(struct drm_device *dev)
>  	return true;
>  }
>  
> +/**
> + * drm_core_check_feature - check driver feature flags
> + * @dev: DRM device to check
> + * @feature: feature flag
> + *
> + * This checks @dev for driver features, see &drm_driver.driver_features and the
> + * various DRIVER_\* flags.
> + *
> + * Returns true if the @feature is supported, false otherwise.
> + */
> +static inline bool drm_core_check_feature(struct drm_device *dev, int feature)
> +{
> +	return dev->driver->driver_features & feature;
> +}
> +
> +/**
> + * drm_drv_uses_atomic_modeset - check if the driver implements
> + * 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 drm_core_check_feature(dev, DRIVER_ATOMIC) ||
> +		dev->mode_config.funcs->atomic_commit != NULL;
> +}
> +
>  
>  int drm_dev_set_unique(struct drm_device *dev, const char *name);
>  
> -- 
> 2.18.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-07-12 13:52 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-09  8:40 [PATCH 00/15] bunch of kerneldocs polish and related cleanup Daniel Vetter
2018-07-09  8:40 ` [PATCH 01/15] drm: move drv test macros out of drmP.h Daniel Vetter
2018-07-12 13:52   ` Sean Paul [this message]
2018-07-09  8:40 ` [PATCH 02/15] drm: Drop drmP.h from drm_connector.c Daniel Vetter
2018-07-12 13:53   ` Sean Paul
2018-07-09  8:40 ` [PATCH 03/15] drm/doc: switch drm_connector_state to inline comments Daniel Vetter
2018-07-12 13:54   ` Sean Paul
2018-07-09  8:40 ` [PATCH 04/15] drm/doc: polish for sturct drm_connector Daniel Vetter
2018-07-12 14:01   ` Sean Paul
2018-07-09  8:40 ` [PATCH 05/15] drm: drop _mode_ from update_edit_property() Daniel Vetter
2018-07-13 14:59   ` Sean Paul
2018-07-13 16:05     ` Daniel Vetter
2018-07-09  8:40 ` [PATCH 06/15] drm: drop _mode_ from drm_mode_connector_attach_encoder Daniel Vetter
2018-07-13 15:01   ` Sean Paul
2018-07-09  8:40 ` [PATCH 07/15] drm: drop _mode_ from remaining connector functions Daniel Vetter
2018-07-13 15:05   ` Sean Paul
2018-07-09  8:40 ` [PATCH 08/15] drm: Switch drm_plane_state to inline kerneldoc style Daniel Vetter
2018-07-13 15:08   ` Sean Paul
2018-07-09  8:40 ` [PATCH 09/15] drm: switch drm_plane to inline comments Daniel Vetter
2018-07-13 15:20   ` Sean Paul
2018-07-09  8:40 ` [PATCH 10/15] drm: drop drmP.h include from drm_plane.c Daniel Vetter
2018-07-13 15:22   ` Sean Paul
2018-07-09  8:40 ` [PATCH 11/15] drm/doc: move struct drm_crtc to in-line comments Daniel Vetter
2018-07-13 15:27   ` Sean Paul
2018-07-09  8:40 ` [PATCH 12/15] drm/doc: Group the fb gem helpers better Daniel Vetter
2018-07-12 12:18   ` Noralf Trønnes
2018-07-09  8:40 ` [PATCH 13/15] drm/doc: Includ drm_of.c helpers Daniel Vetter
2018-07-13 15:28   ` Sean Paul
2018-07-09  8:40 ` [PATCH 14/15] drm/doc: use inline kerneldoc style for drm_crtc_state Daniel Vetter
2018-07-13 15:33   ` Sean Paul
2018-07-09  8:40 ` [PATCH 15/15] drm: drop drmP.h include from drm_crtc.c Daniel Vetter
2018-07-12 13:51   ` Sean Paul
2018-07-13 16:41     ` 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=20180712135221.GZ20303@art_vandelay \
    --to=seanpaul@chromium.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@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