From 436830571eb9045d563979dc6185b1d5145ca4b6 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Thu, 13 Mar 2014 11:07:44 +0100 Subject: drm: Improve on minor type helpers v3 Add a drm_is_legacy() helper, constify argument to drm_is_render_client(), and use / change helpers where appropriate. v2: s/drm_is_legacy/drm_is_legacy_client/ and adapt to new code context. v3: s/legacy_client/primary_client/ Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul --- include/drm/drmP.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/drm') diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 3cf9f46ce2e6..3d06f71bc691 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1202,7 +1202,7 @@ static inline bool drm_modeset_is_locked(struct drm_device *dev) return mutex_is_locked(&dev->mode_config.mutex); } -static inline bool drm_is_render_client(struct drm_file *file_priv) +static inline bool drm_is_render_client(const struct drm_file *file_priv) { return file_priv->minor->type == DRM_MINOR_RENDER; } @@ -1212,6 +1212,11 @@ static inline bool drm_is_control_client(const struct drm_file *file_priv) return file_priv->minor->type == DRM_MINOR_CONTROL; } +static inline bool drm_is_primary_client(const struct drm_file *file_priv) +{ + return file_priv->minor->type == DRM_MINOR_LEGACY; +} + /******************************************************************/ /** \name Internal function definitions */ /*@{*/ -- cgit v1.2.3