diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-12-22 08:36:24 +0000 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-12-27 14:16:58 +0100 |
commit | 7173320758e5dfcd7a47a51d3fe2b21c43d9633c (patch) | |
tree | 60d0279dbbccea268131e4e4e72f84bfa9782d29 /include/drm | |
parent | d1bac3a78111c82befc8c8fc185b2d90a64ed4b6 (diff) | |
download | op-kernel-dev-7173320758e5dfcd7a47a51d3fe2b21c43d9633c.zip op-kernel-dev-7173320758e5dfcd7a47a51d3fe2b21c43d9633c.tar.gz |
drm: Promote drm_mm alignment to u64
In places (e.g. i915.ko), the alignment is exported to userspace as u64
and there now exists hardware for which we can indeed utilize a u64
alignment. As such, we need to keep 64bit integers throughout when
handling alignment.
Testcase: igt/drm_mm/align64
Testcase: igt/gem_exec_alignment
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-22-chris@chris-wilson.co.uk
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_mm.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index 5255430..0ce8c36 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h @@ -98,12 +98,12 @@ struct drm_mm { struct rb_root interval_tree; unsigned int scan_check_range : 1; - unsigned scan_alignment; + unsigned int scanned_blocks; unsigned long scan_color; + u64 scan_alignment; u64 scan_size; u64 scan_hit_start; u64 scan_hit_end; - unsigned scanned_blocks; u64 scan_start; u64 scan_end; struct drm_mm_node *prev_scanned_node; @@ -261,7 +261,7 @@ int drm_mm_reserve_node(struct drm_mm *mm, struct drm_mm_node *node); int drm_mm_insert_node_generic(struct drm_mm *mm, struct drm_mm_node *node, u64 size, - unsigned alignment, + u64 alignment, unsigned long color, enum drm_mm_search_flags sflags, enum drm_mm_allocator_flags aflags); @@ -284,7 +284,7 @@ int drm_mm_insert_node_generic(struct drm_mm *mm, static inline int drm_mm_insert_node(struct drm_mm *mm, struct drm_mm_node *node, u64 size, - unsigned alignment, + u64 alignment, enum drm_mm_search_flags flags) { return drm_mm_insert_node_generic(mm, node, size, alignment, 0, flags, @@ -294,7 +294,7 @@ static inline int drm_mm_insert_node(struct drm_mm *mm, int drm_mm_insert_node_in_range_generic(struct drm_mm *mm, struct drm_mm_node *node, u64 size, - unsigned alignment, + u64 alignment, unsigned long color, u64 start, u64 end, @@ -321,7 +321,7 @@ int drm_mm_insert_node_in_range_generic(struct drm_mm *mm, static inline int drm_mm_insert_node_in_range(struct drm_mm *mm, struct drm_mm_node *node, u64 size, - unsigned alignment, + u64 alignment, u64 start, u64 end, enum drm_mm_search_flags flags) @@ -361,11 +361,11 @@ __drm_mm_interval_first(const struct drm_mm *mm, u64 start, u64 last); void drm_mm_init_scan(struct drm_mm *mm, u64 size, - unsigned alignment, + u64 alignment, unsigned long color); void drm_mm_init_scan_with_range(struct drm_mm *mm, u64 size, - unsigned alignment, + u64 alignment, unsigned long color, u64 start, u64 end); |