Signed-off-by: Robert P. J. Day <[email protected]>
---
diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c
b/drivers/gpu/drm/i915/i915_gem_tiling.c
index f27e523..ef7e227 100644
--- a/drivers/gpu/drm/i915/i915_gem_tiling.c
+++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
@@ -27,6 +27,7 @@
#include "linux/string.h"
#include "linux/bitops.h"
+#include "linux/log2.h"
#include "drmP.h"
#include "drm.h"
#include "i915_drm.h"
@@ -245,7 +246,7 @@ i915_tiling_ok(struct drm_device *dev, int stride, int
size, int tiling_mode)
if (stride < tile_width)
return false;
- if (stride & (stride - 1))
+ if (!is_power_of_2(stride))
return false;
/* We don't handle the aperture area covered by the fence being bigger
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Annoying Kernel Pedantry.
Web page: http://crashcourse.ca
Linked In: http://www.linkedin.com/in/rpjday
Twitter: http://twitter.com/rpjday
========================================================================
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel