summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_mm.h
diff options
context:
space:
mode:
authorChris Wilson2016-12-22 09:36:34 +0100
committerDaniel Vetter2016-12-28 11:51:52 +0100
commit9a956b1548794033d5b893d6d6fcc00b197cfc9b (patch)
tree8b8cfbe1b61e48ac2a8a7aca0620a16bc29fcd15 /include/drm/drm_mm.h
parentdrm: Compute tight evictions for drm_mm_scan (diff)
downloadkernel-qcow2-linux-9a956b1548794033d5b893d6d6fcc00b197cfc9b.tar.gz
kernel-qcow2-linux-9a956b1548794033d5b893d6d6fcc00b197cfc9b.tar.xz
kernel-qcow2-linux-9a956b1548794033d5b893d6d6fcc00b197cfc9b.zip
drm: Optimise power-of-two alignments in drm_mm_scan_add_block()
For power-of-two alignments, we can avoid the 64bit divide and do a simple bitwise add instead. v2: s/alignment_mask/remainder_mask/ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-32-chris@chris-wilson.co.uk
Diffstat (limited to 'include/drm/drm_mm.h')
-rw-r--r--include/drm/drm_mm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h
index 606336fc229a..d6701d56ea74 100644
--- a/include/drm/drm_mm.h
+++ b/include/drm/drm_mm.h
@@ -110,6 +110,7 @@ struct drm_mm_scan {
u64 size;
u64 alignment;
+ u64 remainder_mask;
u64 range_start;
u64 range_end;