drm/i915: be more solid in checking the alignment
authorMatthew Auld <matthew.auld@intel.com>
Thu, 5 Mar 2020 20:35:34 +0000 (20:35 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 6 Mar 2020 10:07:44 +0000 (10:07 +0000)
commit2920516b2f719546f55079bc39a7fe409d9e80ab
tree5f61a9e1f64f4bfcafa25678894346a439bed223
parent64dc802aa5accfe36d431814ffdf15303b7f7b2b
drm/i915: be more solid in checking the alignment

The alignment is u64, and yet is_power_of_2() assumes unsigned long,
which might give different results between 32b and 64b kernel.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200305203534.210466-1-matthew.auld@intel.com
Cc: stable@vger.kernel.org
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_utils.h