[Intel-gfx] [PATCH 2/5] intel: Demote the stride field to 32 bits.

Eric Anholt eric at anholt.net
Tue Jun 18 22:32:54 CEST 2013


It comes in to us as a u32, and goes to the kernel as a u32, so
storing as a long in between is silly.
---
 intel/intel_bufmgr_gem.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index b06c99a..f068df6 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -162,7 +162,7 @@ struct _drm_intel_bo_gem {
 	 */
 	uint32_t tiling_mode;
 	uint32_t swizzle_mode;
-	unsigned long stride;
+	uint32_t stride;
 
 	time_t free_time;
 
@@ -620,7 +620,7 @@ drm_intel_gem_bo_alloc_internal(drm_intel_bufmgr *bufmgr,
 				unsigned long size,
 				unsigned long flags,
 				uint32_t tiling_mode,
-				unsigned long stride)
+				uint32_t stride)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bufmgr;
 	drm_intel_bo_gem *bo_gem;
@@ -779,8 +779,8 @@ drm_intel_gem_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name,
 			     unsigned long *pitch, unsigned long flags)
 {
 	drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr;
-	unsigned long size, stride;
-	uint32_t tiling;
+	unsigned long size;
+	uint32_t stride, tiling;
 
 	do {
 		unsigned long aligned_y, height_alignment;
-- 
1.8.3.rc0




More information about the Intel-gfx mailing list