]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/buddy: document the unused header bits
authorMatthew Auld <matthew.auld@intel.com>
Tue, 26 Jan 2021 10:30:19 +0000 (10:30 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 24 Mar 2021 18:30:35 +0000 (19:30 +0100)
commit0ec74a4ab5e500eba29ae540fa00819c217d1904
tree12c4b8765b23abc8bf0e012620679d3ac2331c0f
parent184d52bb79e75f5d3b40c7f9f424db8a65da3d14
drm/i915/buddy: document the unused header bits

The largest possible order is (63-PAGE_SHIFT), given that our min chunk
size is PAGE_SIZE. With that we should only need at most 6 bits to
represent all possible orders, giving us back 4 bits for other potential
uses.  Include a simple selftest to verify this.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
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/20210126103019.177622-1-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_buddy.c
drivers/gpu/drm/i915/i915_buddy.h
drivers/gpu/drm/i915/selftests/i915_buddy.c