]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/tests: Add a unit test for range bias allocation
authorArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Tue, 14 May 2024 14:56:36 +0000 (20:26 +0530)
committerDave Airlie <airlied@redhat.com>
Thu, 16 May 2024 02:50:14 +0000 (12:50 +1000)
commit431c590c3ab0469dfedad3a832fe73556396ee52
tree228c725645d89f1f3b89d11ab54cf41d1f06f335
parentbb21700baf7bc7ff9db8085fb0f097e8f8bcc0c5
drm/tests: Add a unit test for range bias allocation

Allocate cleared blocks in the bias range when the DRM
buddy's clear avail is zero. This will validate the bias
range allocation in scenarios like system boot when no
cleared blocks are available and exercise the fallback
path too. The resulting blocks should always be dirty.

v1:(Matthew)
  - move the size to the variable declaration section.
  - move the mm.clear_avail init to allocator init.

Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240514145636.16253-2-Arunpravin.PaneerSelvam@amd.com
drivers/gpu/drm/tests/drm_buddy_test.c