summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_utils.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-03-13 02:41:15 +0300
committerDave Airlie <airlied@redhat.com>2020-03-13 02:41:30 +0300
commitf31d83f047e190bc636505e9b9c31a34e25bfebe (patch)
tree76a588d2427e25dc0f8afd1790eac4c92a6a1605 /drivers/gpu/drm/i915/i915_utils.h
parentd94432653519031f89d2a30cc917e29a02f0200d (diff)
parent14a0d527a479eb2cb6067f9e5e163e1bf35db2a9 (diff)
downloadlinux-f31d83f047e190bc636505e9b9c31a34e25bfebe.tar.xz
Merge tag 'drm-intel-fixes-2020-03-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
drm/i915 fixes for v5.6-rc6: - hard lockup fix - GVT fixes - 32-bit alignment issue fix - timeline wait fixes - cacheline_retire and free Signed-off-by: Dave Airlie <airlied@redhat.com> From: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/87lfo6ksvw.fsf@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_utils.h')
-rw-r--r--drivers/gpu/drm/i915/i915_utils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h
index b0ade76bec90..d34141f7dcd8 100644
--- a/drivers/gpu/drm/i915/i915_utils.h
+++ b/drivers/gpu/drm/i915/i915_utils.h
@@ -234,6 +234,11 @@ static inline u64 ptr_to_u64(const void *ptr)
__idx; \
})
+static inline bool is_power_of_2_u64(u64 n)
+{
+ return (n != 0 && ((n & (n - 1)) == 0));
+}
+
static inline void __list_del_many(struct list_head *head,
struct list_head *first)
{