diff options
author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2017-05-09 11:20:21 +0200 |
---|---|---|
committer | Mika Kuoppala <mika.kuoppala@intel.com> | 2017-05-09 15:02:47 +0200 |
commit | 16586fcd86c4a498bbfc2643490a5a38648e1d5e (patch) | |
tree | 96a784df0f0183357ceb5929084329892e273987 /drivers/gpu/drm/i915/i915_utils.h | |
parent | drm/i915: use memdup_user_nul (diff) | |
download | linux-16586fcd86c4a498bbfc2643490a5a38648e1d5e.tar.xz linux-16586fcd86c4a498bbfc2643490a5a38648e1d5e.zip |
drm/i915: Move uncore definitions into a separate header
In order to allow use of e.g. forcewake_domains in a other feature headers
included from the top of i915_drv.h, move all uncore related definitions
into their own header.
v2: move __mask_next_bit macro to utils header (Mika)
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_utils.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_utils.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h index c5455d36b617..f9d6607ef52f 100644 --- a/drivers/gpu/drm/i915/i915_utils.h +++ b/drivers/gpu/drm/i915/i915_utils.h @@ -92,4 +92,10 @@ __T; \ }) +#define __mask_next_bit(mask) ({ \ + int __idx = ffs(mask) - 1; \ + mask &= ~BIT(__idx); \ + __idx; \ +}) + #endif /* !__I915_UTILS_H */ |