drm/tests: Add a test case for drm buddy clear allocation
authorArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Fri, 19 Apr 2024 06:35:38 +0000 (12:05 +0530)
committerChristian König <christian.koenig@amd.com>
Mon, 22 Apr 2024 17:44:16 +0000 (19:44 +0200)
commitc1696bf8d5f5389c5312aebf9e3ad0267149cdea
treed2bf849a481a155da2d2b6ce3eee140a7a67e57e
parenta68c7eaa7a8ffdec9287ba1561a668d674c20a13
drm/tests: Add a test case for drm buddy clear allocation

Add a new test case for the drm buddy clear and dirty
allocation.

v2:(Matthew)
  - make size as u32
  - rename PAGE_SIZE with SZ_4K
  - dont fragment the address space for all the order allocation
    iterations. we can do it once and just increment and allocate
    the size.
  - create new mm with non power-of-two size to ensure the multi-root
    force_merge during fini.

v3:
  - add randomness in size calculation(Matthew)

Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Suggested-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240419063538.11957-3-Arunpravin.PaneerSelvam@amd.com
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/tests/drm_buddy_test.c