drm: improve drm_buddy_alloc function
Subsystems (5)
Arunpravin
maintainerPATCH v13 1/5 drm: improve drm_buddy_alloc function
- Make drm_buddy_alloc a single function to handle range allocation and non-range allocation demands
- Implemented a new function alloc_range() which allocates the requested power-of-two block comply with range limitations
- Moved order computation and memory alignment logic from i915 driver to drm buddy
v2:
merged below changes to keep the build unbroken
- drm_buddy_alloc_range() becomes obsolete and may be removed
- enable ttm range allocation (fpfn / lpfn) support in i915 driver
- apply enhanced drm_buddy_alloc() function to i915 driver
v3(Matthew Auld):
- Fix alignment issues and remove unnecessary list_empty check
- add more validation checks for input arguments
- make alloc_range() block allocations as bottom-up
- optimize order computation logic
- replace uint64_t with u64, which is preferred in the kernel
v4(Matthew Auld):
- keep drm_buddy_alloc_range() function implementation for generic actual range allocations
- keep alloc_range() implementation for end bias allocations
v5(Matthew Auld):
- modify drm_buddy_alloc() passing argument place->lpfn to lpfn
as place->lpfn will currently always be zero for i915
v6(Matthew Auld):
- fixup potential uaf - If we are unlucky and can't allocate enough memory when splitting blocks, where we temporarily end up with the given block and its buddy on the respective free list, then we need to ensure we delete both blocks, and no just the buddy, before potentially freeing them
- fix warnings reported by kernel test robot <[email protected]>
v7(Matthew Auld):
- revert fixup potential uaf
- keep __alloc_range() add node to the list logic same as drm_buddy_alloc_blocks() by having a temporary list variable
- at drm_buddy_alloc_blocks() keep i915 range_overflows macro and add a new check for end variable
v8:
- fix warnings reported by kernel test robot <[email protected]>
v9(Matthew Auld):
- remove DRM_BUDDY_RANGE_ALLOCATION flag
- remove unnecessary function description
v10:
- keep DRM_BUDDY_RANGE_ALLOCATION flag as removing the flag and replacing with (end < size) logic fails amdgpu driver load
--- drivers/gpu/drm/drm_buddy.c | 292 +++++++++++++----- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 67 ++-- drivers/gpu/drm/i915/i915_ttm_buddy_manager.h | 2 + include/drm/drm_buddy.h | 13 +- 4 files changed, 257 insertions(+), 117 deletions(-)
drivers/gpu/drm/drm_buddy.c +215 -77
@@ -282,23 +282,97 @@ void drm_buddy_free_list(struct drm_buddy *mm, struct list_head *objects) }EXPORT_SYMBOL (drm_buddy_free_list); -/** -* drm_buddy_alloc_blocks - allocate power-of-two blocks -* -* @mm: DRM buddy manager to allocate from -* @order: size of the allocation -* -* The order value here translates to: -* -* 0 = 2^0 * mm->chunk_size -* 1 = 2^1 * mm->chunk_size -* 2 = 2^2 * mm->chunk_size -* -* Returns: -* allocated ptr to the &drm_buddy_block on success -*/ -struct drm_buddy_block * -drm_buddy_alloc_blocks (struct drm_buddy *mm,unsigned int order) +static inline bool overlaps (u64 s1,u64 e1,u64 s2,u64 e2) +{ +return s1 <= e2 && e1 >= s2; +} + +static inline bool contains (u64 s1,u64 e1,u64 s2,u64 e2) +{ +return s1 <= s2 && e1 >= e2; +} + +static struct drm_buddy_block * +alloc_range_bias (struct drm_buddy *mm, +u64 start,u64 end, +unsigned int order) +{ +struct drm_buddy_block *block; +struct drm_buddy_block *buddy; +LIST_HEAD (dfs); +int err; +int i; + + end = end -1 ; + +for (i =0 ; i < mm->n_roots; ++i) +list_add_tail (&mm->roots[i]->tmp_link, &dfs); + +do { +u64 block_start; +u64 block_end; + + block =list_first_entry_or_null (&dfs, + struct drm_buddy_block, + tmp_link); +if (!block) +break ; + +list_del (&block->tmp_link); + +if (drm_buddy_block_order (block) < order) +continue ; + + block_start =drm_buddy_block_offset (block); + block_end = block_start +drm_buddy_block_size (mm, block) -1 ; + +if (!overlaps (start, end, block_start, block_end)) +continue ; + +if (drm_buddy_block_is_allocated (block)) +continue ; + +if (contains (start, end, block_start, block_end) && + order ==drm_buddy_block_order (block)) { +/* +* Find the free block within the range. +*/ +if (drm_buddy_block_is_free (block)) +return block; + +continue ; + } + +if (!drm_buddy_block_is_split (block)) { + err =split_block (mm, block); +if (unlikely (err)) + goto err_undo; + } + +list_add (&block->right->tmp_link, &dfs); +list_add (&block->left->tmp_link, &dfs); + }while (1 ); + +return ERR_PTR (-ENOSPC ); + +err_undo: +/* +* We really don't want to leave around a bunch of split blocks, since +* bigger is better, so make sure we merge everything back before we +* free the allocated blocks. +*/ + buddy =get_buddy (block); +if (buddy && + (drm_buddy_block_is_free (block) && +drm_buddy_block_is_free (buddy))) +__drm_buddy_free (mm, block); +return ERR_PTR (err); +} + +static struct drm_buddy_block * +alloc_from_freelist (struct drm_buddy *mm, +unsigned int order, +unsigned long flags) {struct drm_buddy_block *block =NULL ;unsigned int i;
@@ -320,78 +394,29 @@ drm_buddy_alloc_blocks(struct drm_buddy *mm, unsigned int order)while (i != order) { err =split_block (mm, block);if (unlikely (err)) - goto out_free; + goto err_undo; -/* Go low */ - block = block->left; + block = block->right; i--; } - -mark_allocated (block); - mm->avail -=drm_buddy_block_size (mm, block); -kmemleak_update_trace (block);return block; -out_free: +err_undo:if (i != order)__drm_buddy_free (mm, block);return ERR_PTR (err); } -EXPORT_SYMBOL (drm_buddy_alloc_blocks); - -static inline bool overlaps (u64 s1,u64 e1,u64 s2,u64 e2) -{ -return s1 <= e2 && e1 >= s2; -} - -static inline bool contains (u64 s1,u64 e1,u64 s2,u64 e2) -{ -return s1 <= s2 && e1 >= e2; -} -/** -* drm_buddy_alloc_range - allocate range -* -* @mm: DRM buddy manager to allocate from -* @blocks: output list head to add allocated blocks -* @start: start of the allowed range for this block -* @size: size of the allocation -* -* Intended for pre-allocating portions of the address space, for example to -* reserve a block for the initial framebuffer or similar, hence the expectation -* here is that drm_buddy_alloc_blocks() is still the main vehicle for -* allocations, so if that's not the case then the drm_mm range allocator is -* probably a much better fit, and so you should probably go use that instead. -* -* Note that it's safe to chain together multiple alloc_ranges -* with the same blocks list -* -* Returns: -* 0 on success, error code on failure. -*/ -int drm_buddy_alloc_range (struct drm_buddy *mm, -struct list_head *blocks, -u64 start,u64 size) +static int __alloc_range (struct drm_buddy *mm, +struct list_head *dfs, +u64 start,u64 size, +struct list_head *blocks) {struct drm_buddy_block *block;struct drm_buddy_block *buddy;LIST_HEAD (allocated); -LIST_HEAD (dfs);u64 end;int err; -int i; - -if (size < mm->chunk_size) -return -EINVAL ; - -if (!IS_ALIGNED (size | start, mm->chunk_size)) -return -EINVAL ; - -if (range_overflows (start, size, mm->size)) -return -EINVAL ; - -for (i =0 ; i < mm->n_roots; ++i) -list_add_tail (&mm->roots[i]->tmp_link, &dfs); end = start + size -1 ;
@@ -399,7 +424,7 @@ int drm_buddy_alloc_range(struct drm_buddy *mm,u64 block_start;u64 block_end; - block =list_first_entry_or_null (&dfs, + block =list_first_entry_or_null (dfs, struct drm_buddy_block, tmp_link);if (!block)
@@ -436,8 +461,8 @@ int drm_buddy_alloc_range(struct drm_buddy *mm, goto err_undo; } -list_add (&block->right->tmp_link, &dfs); -list_add (&block->left->tmp_link, &dfs); +list_add (&block->right->tmp_link, dfs); +list_add (&block->left->tmp_link, dfs); }while (1 );list_splice_tail (&allocated, blocks);
@@ -459,7 +484,120 @@ int drm_buddy_alloc_range(struct drm_buddy *mm,drm_buddy_free_list (mm, &allocated);return err; } -EXPORT_SYMBOL (drm_buddy_alloc_range); + +static int __drm_buddy_alloc_range (struct drm_buddy *mm, +u64 start, +u64 size, +struct list_head *blocks) +{ +LIST_HEAD (dfs); +int i; + +for (i =0 ; i < mm->n_roots; ++i) +list_add_tail (&mm->roots[i]->tmp_link, &dfs); + +return __alloc_range (mm, &dfs, start, size, blocks); +} + +/** +* drm_buddy_alloc_blocks - allocate power-of-two blocks +* +* @mm: DRM buddy manager to allocate from +* @start: start of the allowed range for this block +* @end: end of the allowed range for this block +* @size: size of the allocation +* @min_page_size: alignment of the allocation +* @blocks: output list head to add allocated blocks +* @flags: DRM_BUDDY_*_ALLOCATION flags +* +* alloc_range_bias() called on range limitations, which traverses +* the tree and returns the desired block. +* +* alloc_from_freelist() called when *no* range restrictions +* are enforced, which picks the block from the freelist. +* +* Returns: +* 0 on success, error code on failure. +*/ +int drm_buddy_alloc_blocks (struct drm_buddy *mm, +u64 start,u64 end,u64 size, +u64 min_page_size, +struct list_head *blocks, +unsigned long flags) +{ +struct drm_buddy_block *block =NULL ; +unsigned int min_order, order; +unsigned long pages; +LIST_HEAD (allocated); +int err; + +if (size < mm->chunk_size) +return -EINVAL ; + +if (min_page_size < mm->chunk_size) +return -EINVAL ; + +if (!is_power_of_2 (min_page_size)) +return -EINVAL ; + +if (!IS_ALIGNED (start | end | size, mm->chunk_size)) +return -EINVAL ; + +if (end > mm->size) +return -EINVAL ; + +if (range_overflows (start, size, mm->size)) +return -EINVAL ; + +/* Actual range allocation */ +if (start + size == end) +return __drm_buddy_alloc_range (mm, start, size, blocks); + + pages = size >>ilog2 (mm->chunk_size); + order =fls (pages) -1 ; + min_order =ilog2 (min_page_size) -ilog2 (mm->chunk_size); + +do { + order =min (order, (unsigned int )fls (pages) -1 ); +BUG_ON (order > mm->max_order); +BUG_ON (order < min_order); + +do { +if (flags &DRM_BUDDY_RANGE_ALLOCATION ) +/* Allocate traversing within the range */ + block =alloc_range_bias (mm, start, end, order); +else +/* Allocate from freelist */ + block =alloc_from_freelist (mm, order, flags); + +if (!IS_ERR (block)) +break ; + +if (order-- == min_order) { + err = -ENOSPC ; + goto err_free; + } + }while (1 ); + +mark_allocated (block); + mm->avail -=drm_buddy_block_size (mm, block); +kmemleak_update_trace (block); +list_add_tail (&block->link, &allocated); + + pages -=BIT (order); + +if (!pages) +break ; + }while (1 ); + +list_splice_tail (&allocated, blocks); +return 0 ; + +err_free: +drm_buddy_free_list (mm, &allocated); +return err; +} +EXPORT_SYMBOL (drm_buddy_alloc_blocks);/** * drm_buddy_block_print - print block information
drivers/gpu/drm/i915/i915_ttm_buddy_manager.c +33 -34
106 lines not on this page · raw message
drivers/gpu/drm/i915/i915_ttm_buddy_manager.h +2 -0
@@ -20,6 +20,7 @@ struct drm_buddy;* * @base: struct ttm_resource base class we extend * @blocks: the list of struct i915_buddy_block for this resource/allocation +* @flags: DRM_BUDDY_*_ALLOCATION flags * @mm: the struct i915_buddy_mm for this resource * * Extends the struct ttm_resource to manage an address space allocation with
@@ -28,6 +29,7 @@ struct drm_buddy;struct i915_ttm_buddy_resource {struct ttm_resource base;struct list_head blocks; +unsigned long flags;struct drm_buddy *mm; };
include/drm/drm_buddy.h +7 -6
@@ -22,6 +22,8 @@ start__ >= max__ || size__ > max__ - start__; \ }) +#define DRM_BUDDY_RANGE_ALLOCATION (1 << 0) +struct drm_buddy_block {#define DRM_BUDDY_HEADER_OFFSET GENMASK_ULL(63, 12)#define DRM_BUDDY_HEADER_STATE GENMASK_ULL(11, 10)
@@ -131,12 +133,11 @@ int drm_buddy_init(struct drm_buddy *mm, u64 size, u64 chunk_size);void drm_buddy_fini (struct drm_buddy *mm); -struct drm_buddy_block * -drm_buddy_alloc_blocks (struct drm_buddy *mm,unsigned int order); - -int drm_buddy_alloc_range (struct drm_buddy *mm, -struct list_head *blocks, -u64 start,u64 size); +int drm_buddy_alloc_blocks (struct drm_buddy *mm, +u64 start,u64 end,u64 size, +u64 min_page_size, +struct list_head *blocks, +unsigned long flags);void drm_buddy_free_block (struct drm_buddy *mm,struct drm_buddy_block *block);
base-commit: 4f574e4e0184dfccce23b438846b95bbb4d14e39
Signature · 1 line
2.25.1
Arunpravin
maintainerPATCH v13 2/5 drm: implement top-down allocation method
Implemented a function which walk through the order list, compares the offset and returns the maximum offset block, this method is unpredictable in obtaining the high range address blocks which depends on allocation and deallocation. for instance, if driver requests address at a low specific range, allocator traverses from the root block and splits the larger blocks until it reaches the specific block and in the process of splitting, lower orders in the freelist are occupied with low range address blocks and for the subsequent TOPDOWN memory request we may return the low range blocks.To overcome this issue, we may go with the below approach.
The other approach, sorting each order list entries in ascending order and compares the last entry of each order list in the freelist and return the max block. This creates sorting overhead on every drm_buddy_free() request and split up of larger blocks for a single page request.
v2:
- Fix alignment issues(Matthew Auld)
- Remove unnecessary list_empty check(Matthew Auld)
- merged the below patch to see the feature in action
- add top-down alloc support to i915 driver
--- drivers/gpu/drm/drm_buddy.c | 36 ++++++++++++++++--- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 3 ++ include/drm/drm_buddy.h | 1 + 3 files changed, 35 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_buddy.c +31 -5
@@ -369,6 +369,26 @@ alloc_range_bias(struct drm_buddy *mm,return ERR_PTR (err); } +static struct drm_buddy_block * +get_maxblock (struct list_head *head) +{ +struct drm_buddy_block *max_block =NULL , *node; + + max_block =list_first_entry_or_null (head, + struct drm_buddy_block, + link); +if (!max_block) +return NULL ; + +list_for_each_entry (node, head, link) { +if (drm_buddy_block_offset (node) > +drm_buddy_block_offset (max_block)) + max_block = node; + } + +return max_block; +} +static struct drm_buddy_block * alloc_from_freelist(struct drm_buddy *mm, unsigned int order,
@@ -379,11 +399,17 @@ alloc_from_freelist(struct drm_buddy *mm,int err;for (i = order; i <= mm->max_order; ++i) { - block =list_first_entry_or_null (&mm->free_list[i], - struct drm_buddy_block, - link); -if (block) -break ; +if (flags &DRM_BUDDY_TOPDOWN_ALLOCATION ) { + block =get_maxblock (&mm->free_list[i]); +if (block) +break ; + }else { + block =list_first_entry_or_null (&mm->free_list[i], + struct drm_buddy_block, + link); +if (block) +break ; + } }if (!block)
drivers/gpu/drm/i915/i915_ttm_buddy_manager.c +3 -0
@@ -53,6 +53,9 @@ static int i915_ttm_buddy_man_alloc(struct ttm_resource_manager *man,INIT_LIST_HEAD (&bman_res->blocks); bman_res->mm = mm; +if (place->flags &TTM_PL_FLAG_TOPDOWN ) + bman_res->flags |=DRM_BUDDY_TOPDOWN_ALLOCATION ; +if (place->fpfn || lpfn != man->size) bman_res->flags |=DRM_BUDDY_RANGE_ALLOCATION ;
include/drm/drm_buddy.h +1 -0
@@ -23,6 +23,7 @@ })#define DRM_BUDDY_RANGE_ALLOCATION (1 << 0) +#define DRM_BUDDY_TOPDOWN_ALLOCATION (1 << 1)struct drm_buddy_block {#define DRM_BUDDY_HEADER_OFFSET GENMASK_ULL(63, 12)
Signature · 1 line
2.25.1
Arunpravin
maintainerPATCH v13 3/5 drm: implement a method to free unused pages
In reply to ArunpravinOn contiguous allocation, we round up the size to the *next* power of 2, implement a function to free the unused pages after the newly allocate block.
v2(Matthew Auld):
- replace function name 'drm_buddy_free_unused_pages' with drm_buddy_block_trim
- replace input argument name 'actual_size' with 'new_size'
- add more validation checks for input arguments
- add overlaps check to avoid needless searching and splitting
- merged the below patch to see the feature in action
- add free unused pages support to i915 driver
- lock drm_buddy_block_trim() function as it calls mark_free/mark_split are all globally visible
v3(Matthew Auld):
- remove trim method error handling as we address the failure case at drm_buddy_block_trim() function
v4:
- in case of trim, at __alloc_range() split_block failure path marks the block as free and removes it from the original list, potentially also freeing it, to overcome this problem, we turn the drm_buddy_block_trim() input node into a temporary node to prevent recursively freeing itself, but still retain the un-splitting/freeing of the other nodes(Matthew Auld)
- modify the drm_buddy_block_trim() function return type
v5(Matthew Auld):
- revert drm_buddy_block_trim() function return type changes in v4
- modify drm_buddy_block_trim() passing argument n_pages to original_size as n_pages has already been rounded up to the next power-of-two and passing n_pages results noop
v6:
- fix warnings reported by kernel test robot <[email protected]>
v7:
- modify drm_buddy_block_trim() function doc description
- at drm_buddy_block_trim() handle non-allocated block as a serious programmer error
- fix a typo
--- drivers/gpu/drm/drm_buddy.c | 69 +++++++++++++++++++ drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 10 +++ include/drm/drm_buddy.h | 4 ++ 3 files changed, 83 insertions(+)
drivers/gpu/drm/drm_buddy.c +69 -0
@@ -525,6 +525,75 @@ static int __drm_buddy_alloc_range(struct drm_buddy *mm,return __alloc_range (mm, &dfs, start, size, blocks); } +/** +* drm_buddy_block_trim - free unused pages +* +* @mm: DRM buddy manager +* @new_size: original size requested +* @blocks: Input and output list of allocated blocks. +* MUST contain single block as input to be trimmed. +* On success will contain the newly allocated blocks +* making up the @new_size. Blocks always appear in +* ascending order +* +* For contiguous allocation, we round up the size to the nearest +* power of two value, drivers consume *actual* size, so remaining +* portions are unused and can be optionally freed with this function +* +* Returns: +* 0 on success, error code on failure. +*/ +int drm_buddy_block_trim (struct drm_buddy *mm, +u64 new_size, +struct list_head *blocks) +{ +struct drm_buddy_block *parent; +struct drm_buddy_block *block; +LIST_HEAD (dfs); +u64 new_start; +int err; + +if (!list_is_singular (blocks)) +return -EINVAL ; + + block =list_first_entry (blocks, + struct drm_buddy_block, + link); + +if (WARN_ON (!drm_buddy_block_is_allocated (block))) +return -EINVAL ; + +if (new_size >drm_buddy_block_size (mm, block)) +return -EINVAL ; + +if (!new_size || !IS_ALIGNED (new_size, mm->chunk_size)) +return -EINVAL ; + +if (new_size ==drm_buddy_block_size (mm, block)) +return 0 ; + +list_del (&block->link); +mark_free (mm, block); + mm->avail +=drm_buddy_block_size (mm, block); + +/* Prevent recursively freeing this node */ + parent = block->parent; + block->parent =NULL ; + + new_start =drm_buddy_block_offset (block); +list_add (&block->tmp_link, &dfs); + err =__alloc_range (mm, &dfs, new_start, new_size, blocks); +if (err) { +mark_allocated (block); + mm->avail -=drm_buddy_block_size (mm, block); +list_add (&block->link, blocks); + } + + block->parent = parent; +return err; +} +EXPORT_SYMBOL (drm_buddy_block_trim); +/** * drm_buddy_alloc_blocks - allocate power-of-two blocks *
drivers/gpu/drm/i915/i915_ttm_buddy_manager.c +10 -0
@@ -97,6 +97,16 @@ static int i915_ttm_buddy_man_alloc(struct ttm_resource_manager *man,if (unlikely (err)) goto err_free_blocks; +if (place->flags &TTM_PL_FLAG_CONTIGUOUS ) { +u64 original_size = (u64 )bman_res->base.num_pages <<PAGE_SHIFT ; + +mutex_lock (&bman->lock); +drm_buddy_block_trim (mm, + original_size, + &bman_res->blocks); +mutex_unlock (&bman->lock); + } + *res = &bman_res->base;return 0 ;
include/drm/drm_buddy.h +4 -0
@@ -140,6 +140,10 @@ int drm_buddy_alloc_blocks(struct drm_buddy *mm,struct list_head *blocks, unsigned long flags); +int drm_buddy_block_trim (struct drm_buddy *mm, +u64 new_size, +struct list_head *blocks); +void drm_buddy_free_block (struct drm_buddy *mm,struct drm_buddy_block *block);void drm_buddy_free_list (struct drm_buddy *mm,struct list_head *objects);
Signature · 1 line
2.25.1
Arunpravin
maintainerPATCH v13 4/5 drm/amdgpu: move vram inline functions into a header
In reply to ArunpravinMove shared vram inline functions and structs
into a header file
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 51 ++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h new file +51 -0
@@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: MIT +* Copyright 2021 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +*/ + +#ifndef __AMDGPU_VRAM_MGR_H__ +#define __AMDGPU_VRAM_MGR_H__ + +#include <drm/drm_buddy.h> + +struct amdgpu_vram_mgr_node { +struct ttm_resource base; +struct list_head blocks; +unsigned long flags; +}; + +static inline u64 amdgpu_node_start (struct drm_buddy_block *block) +{ +return drm_buddy_block_offset (block); +} + +static inline u64 amdgpu_node_size (struct drm_buddy_block *block) +{ +return PAGE_SIZE <<drm_buddy_block_order (block); +} + +static inline struct amdgpu_vram_mgr_node * +to_amdgpu_vram_mgr_node (struct ttm_resource *res) +{ + return container_of(res, struct amdgpu_vram_mgr_node, base); +} + +#endif
Signature · 1 line
2.25.1
Christian König
maintainerRe: [PATCH v13 4/5] drm/amdgpu: move vram inline functions into a header
Am 21.02.22 um 17:45 schrieb Arunpravin:
Quoted 4 lines
Move shared vram inline functions and structs
into a header fileSigned-off-by Arunpravin <[email protected]>
Patches #1-#3 haven been pushed to drm-misc-next.
For this one it might be better to squash that into commit #5 as well since this is otherwise unused.
Might be a good idea to move the vram_mgr structur and function from amdgpu_ttm.h over to this file as well.
Regards,
Christian.
Quoted 62 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h | 51 ++++++++++++++++++++ 1 file changed, 51 insertions(+)create mode 100644
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.hdrivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.h new file +51
-0@@ -0,0 +1,51 @@ +/* SPDX-License-Identifier: MIT +* Copyright 2021 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +*/ + +#ifndef __AMDGPU_VRAM_MGR_H__ +#define __AMDGPU_VRAM_MGR_H__ + +#include <drm/drm_buddy.h> + +struct amdgpu_vram_mgr_node { +struct ttm_resource base; +struct list_head blocks; +unsigned long flags; +}; + +static inline u64 amdgpu_node_start (struct drm_buddy_block *block) +{ +return drm_buddy_block_offset (block); +} + +static inline u64 amdgpu_node_size (struct drm_buddy_block *block) +{ +return PAGE_SIZE <<drm_buddy_block_order (block); +} + +static inline struct amdgpu_vram_mgr_node * +to_amdgpu_vram_mgr_node (struct ttm_resource *res) +{ + return container_of(res, struct amdgpu_vram_mgr_node, base); +} + +#endif
Arunpravin
maintainerPATCH v13 5/5 drm/amdgpu: add drm buddy support to amdgpu
In reply to Arunpravin- Remove drm_mm references and replace with drm buddy functionalities
- Add res cursor support for drm buddy
v2(Matthew Auld):
- replace spinlock with mutex as we call kmem_cache_zalloc (..., GFP_KERNEL) in drm_buddy_alloc() function
- lock drm_buddy_block_trim() function as it calls mark_free/mark_split are all globally visible
v3(Matthew Auld):
- remove trim method error handling as we address the failure case at drm_buddy_block_trim() function
v4:
- fix warnings reported by kernel test robot <[email protected]>
v5:
- fix merge conflict issue
v6:
- fix warnings reported by kernel test robot <[email protected]>
v7:
- remove DRM_BUDDY_RANGE_ALLOCATION flag usage
v8:
- keep DRM_BUDDY_RANGE_ALLOCATION flag usage
- resolve conflicts created by drm/amdgpu: remove VRAM accounting v2
--- drivers/gpu/drm/Kconfig | 1 + .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 97 +++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 256 ++++++++++-------- 4 files changed, 229 insertions(+), 132 deletions(-)
drivers/gpu/drm/Kconfig +1 -0
@@ -279,6 +279,7 @@ config DRM_AMDGPU select HWMON select BACKLIGHT_CLASS_DEVICE select INTERVAL_TREE + select DRM_BUDDY help Choose this option if you have a recent AMD Radeon graphics card.
drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h +78 -19
133 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +5 -2
@@ -26,6 +26,7 @@#include <linux/dma-direction.h> #include <drm/gpu_scheduler.h> +#include <drm/drm_buddy.h> #include "amdgpu.h" #define AMDGPU_PL_GDS (TTM_PL_PRIV + 0)
@@ -40,11 +41,13 @@struct amdgpu_vram_mgr {struct ttm_resource_manager manager; -struct drm_mm mm; -spinlock_t lock; +struct drm_buddy mm; +/* protects access to buffer objects */ +struct mutex lock;struct list_head reservations_pending;struct list_head reserved_pages;atomic64_t vis_usage; +u64 default_page_size; };struct amdgpu_gtt_mgr {
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +145 -111
432 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH v13 5/5] drm/amdgpu: add drm buddy support to amdgpu
Am 21.02.22 um 17:45 schrieb Arunpravin:
Quoted 79 lines
- Remove
drm_mmreferences and replace with drm buddy functionalities
- Add res cursor support for drm buddyv2(Matthew Auld):
- replace spinlock with mutex as we callkmem_cache_zalloc(...,GFP_KERNEL) indrm_buddy_alloc()function- lock
drm_buddy_block_trim()function as it calls mark_free/mark_split are all globally visiblev3(Matthew Auld):
- remove trim method error handling as we address the failure case atdrm_buddy_block_trim()functionv4:
- fix warnings reported by kernel test robot <[email protected]>v5:
- fix merge conflict issuev6:
- fix warnings reported by kernel test robot <[email protected]>v7:
- removeDRM_BUDDY_RANGE_ALLOCATIONflag usagev8:
- keepDRM_BUDDY_RANGE_ALLOCATIONflag usage
- resolve conflicts created by drm/amdgpu: remove VRAM accounting v2Signed-off-by Arunpravin <[email protected]>--- drivers/gpu/drm/Kconfig | 1 + .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 97 +++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 256 ++++++++++-------- 4 files changed, 229 insertions(+), 132 deletions(-)drivers/gpu/drm/Kconfig +1
-0@@ -279,6 +279,7 @@ config DRM_AMDGPU select HWMON select BACKLIGHT_CLASS_DEVICE select INTERVAL_TREE + select DRM_BUDDY help Choose this option if you have a recent AMD Radeon graphics card.drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h +6
-1@@ -30,12 +30,15 @@#include <drm/ttm/ttm_resource.h> #include <drm/ttm/ttm_range_manager.h> +#include "amdgpu_vram_mgr.h" +/* state back for walking over vram_mgr and gtt_mgr allocations */ struct amdgpu_res_cursor {uint64_t start;uint64_t size;uint64_t remaining; -struct drm_mm_node *node; +void *node; +uint32_t mem_type; };/** @@ -52,27 +55,63 @@ static inline void amdgpu_res_first(struct ttm_resource *res, uint64_t start, uint64_t size, struct amdgpu_res_cursor *cur) { + struct drm_buddy_block *block; +struct list_head *head, *next;struct drm_mm_node *node;
drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h static inline void amdgpu_res_first(struct ttm_resource *res, · line 63
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h +2
-8-if (!res || res->mem_type ==TTM_PL_SYSTEM ) { - cur->start = start; - cur->size = size; - cur->remaining = size; - cur->node =NULL ; -WARN_ON (res && start + size > res->num_pages <<PAGE_SHIFT ); -return ; - } +if (!res) + goto err_out;
It's not really an error to not have a resource. So I would rather name the label fallback or something like that.
Quoted 118 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h +70
-10BUG_ON (start + size > res->num_pages <<PAGE_SHIFT ); - node =to_ttm_range_mgr_node (res)->mm_nodes; -while (start >= node->size <<PAGE_SHIFT ) - start -= node++->size <<PAGE_SHIFT ; + cur->mem_type = res->mem_type; + +switch (cur->mem_type) { +case TTM_PL_VRAM : + head = &to_amdgpu_vram_mgr_node (res)->blocks; + + block =list_first_entry_or_null (head, + struct drm_buddy_block, + link); +if (!block) + goto err_out; + +while (start >=amdgpu_node_size (block)) { + start -=amdgpu_node_size (block); + + next = block->link.next; +if (next != head) + block = list_entry(next, struct drm_buddy_block, link); + } + + cur->start =amdgpu_node_start (block) + start; + cur->size =min (amdgpu_node_size (block) - start, size); + cur->remaining = size; + cur->node = block; +break ; +case TTM_PL_TT : + node =to_ttm_range_mgr_node (res)->mm_nodes; +while (start >= node->size <<PAGE_SHIFT ) + start -= node++->size <<PAGE_SHIFT ; + + cur->start = (node->start <<PAGE_SHIFT ) + start; + cur->size =min ((node->size <<PAGE_SHIFT ) - start, size); + cur->remaining = size; + cur->node = node; +break ; +default : + goto err_out; + } - cur->start = (node->start <<PAGE_SHIFT ) + start; - cur->size =min ((node->size <<PAGE_SHIFT ) - start, size); +return ; + +err_out: + cur->start = start; + cur->size = size; cur->remaining = size; - cur->node = node; + cur->node =NULL ; +WARN_ON (res && start + size > res->num_pages <<PAGE_SHIFT ); +return ; }/** @@ -85,7 +124,9 @@ static inline void amdgpu_res_first(struct ttm_resource *res,*/ static inline void amdgpu_res_next (struct amdgpu_res_cursor *cur,uint64_t size) { -struct drm_mm_node *node = cur->node; +struct drm_buddy_block *block; +struct drm_mm_node *node; +struct list_head *next;BUG_ON (size > cur->remaining);@@ -99,9 +140,27 @@ static inline void amdgpu_res_next(struct amdgpu_res_cursor *cur, uint64_t size)return ; } - cur->node = ++node; - cur->start = node->start <<PAGE_SHIFT ; - cur->size =min (node->size <<PAGE_SHIFT , cur->remaining); +switch (cur->mem_type) { +case TTM_PL_VRAM : + block = cur->node; + + next = block->link.next; + block = list_entry(next, struct drm_buddy_block, link); + + cur->node = block; + cur->start =amdgpu_node_start (block); + cur->size =min (amdgpu_node_size (block), cur->remaining); +break ; +case TTM_PL_TT : + node = cur->node; + + cur->node = ++node; + cur->start = node->start <<PAGE_SHIFT ; + cur->size =min (node->size <<PAGE_SHIFT , cur->remaining); +break ; +default : +return ; + } }#endif drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +1
-0@@ -26,6 +26,7 @@#include <linux/dma-direction.h> #include <drm/gpu_scheduler.h> +#include <drm/drm_buddy.h> #include "amdgpu.h" #define AMDGPU_PL_GDS (TTM_PL_PRIV + 0)@@ -40,11 +41,13 @@struct amdgpu_vram_mgr {struct ttm_resource_manager manager;
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h line 51
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +4
-2-struct drm_mm mm; -spinlock_t lock; +struct drm_buddy mm; +/* protects access to buffer objects */ +struct mutex lock;struct list_head reservations_pending;struct list_head reserved_pages;atomic64_t vis_usage; +u64 default_page_size; };
Can we move that to amdgpu_vram_mgr.h as well?
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c line 37
Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +0
-0struct amdgpu_gtt_mgr {drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +3
-0@@ -32,8 +32,11 @@#include "atom.h" struct amdgpu_vram_reservation { +u64 start; +u64 size; +unsigned long flags;
Looks like we will always use the same flags and that can be dropped.
Quoted 65 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +14
-15+struct list_head block;struct list_head node; -struct drm_mm_node mm_node; }; static inline struct amdgpu_vram_mgr *@@ -194,10 +197,10 @@ const struct attribute_group amdgpu_vram_mgr_attr_group = {* Calculate how many bytes of the MM node are inside visible VRAM */ static u64 amdgpu_vram_mgr_vis_size (struct amdgpu_device *adev, -struct drm_mm_node *node) +struct drm_buddy_block *block) { -uint64_t start = node->start <<PAGE_SHIFT ; -uint64_t end = (node->size + node->start) <<PAGE_SHIFT ; +u64 start =amdgpu_node_start (block); +u64 end = start +amdgpu_node_size (block);if (start >= adev->gmc.visible_vram_size)return 0 ;@@ -218,9 +221,9 @@ u64 amdgpu_vram_mgr_bo_visible_size(struct amdgpu_bo *bo) {struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev);struct ttm_resource *res = bo->tbo.resource; -unsigned pages = res->num_pages; -struct drm_mm_node *mm; -u64 usage; +struct amdgpu_vram_mgr_node *node =to_amdgpu_vram_mgr_node (res); +struct drm_buddy_block *block; +u64 usage =0 ;if (amdgpu_gmc_vram_full_visible (&adev->gmc))return amdgpu_bo_size (bo);@@ -228,9 +231,8 @@ u64 amdgpu_vram_mgr_bo_visible_size(struct amdgpu_bo *bo)if (res->start >= adev->gmc.visible_vram_size >>PAGE_SHIFT )return 0 ; - mm = &container_of(res, struct ttm_range_mgr_node, base)->mm_nodes[0]; -for (usage =0 ; pages; pages -= mm->size, mm++) - usage +=amdgpu_vram_mgr_vis_size (adev, mm); +list_for_each_entry (block, &node->blocks, link) + usage +=amdgpu_vram_mgr_vis_size (adev, block);return usage; }@@ -240,23 +242,31 @@ static void amdgpu_vram_mgr_do_reserve(struct ttm_resource_manager *man) {struct amdgpu_vram_mgr *mgr =to_vram_mgr (man);struct amdgpu_device *adev =to_amdgpu_device (mgr); -struct drm_mm *mm = &mgr->mm; +struct drm_buddy *mm = &mgr->mm;struct amdgpu_vram_reservation *rsv, *temp; +struct drm_buddy_block *block;uint64_t vis_usage;list_for_each_entry_safe (rsv, temp, &mgr->reservations_pending, node) { -if (drm_mm_reserve_node (mm, &rsv->mm_node)) +if (drm_buddy_alloc_blocks (mm, rsv->start, rsv->start + rsv->size, + rsv->size, mm->chunk_size, &rsv->block, + rsv->flags))continue ; -dev_dbg (adev->dev,"Reservation 0x%llx - %lld, Succeeded\n" , - rsv->mm_node.start, rsv->mm_node.size); -
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c static void amdgpu_vram_mgr_do_reserve(struct ttm_resource_manager *man) · line 259
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +4
-6- vis_usage =amdgpu_vram_mgr_vis_size (adev, &rsv->mm_node); -atomic64_add (vis_usage, &mgr->vis_usage); -spin_lock (&man->bdev->lru_lock); - man->usage += rsv->mm_node.size <<PAGE_SHIFT ; -spin_unlock (&man->bdev->lru_lock); -list_move (&rsv->node, &mgr->reserved_pages); + block =list_first_entry_or_null (&rsv->block, + struct drm_buddy_block, + link); +if (block) {
Rather make that an "if (!block) continue;".
Quoted 113 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +28
-37+dev_dbg (adev->dev,"Reservation 0x%llx - %lld, Succeeded\n" , + rsv->start, rsv->size); + + vis_usage =amdgpu_vram_mgr_vis_size (adev, block); +atomic64_add (vis_usage, &mgr->vis_usage); +spin_lock (&man->bdev->lru_lock); + man->usage += rsv->size; +spin_unlock (&man->bdev->lru_lock); +list_move (&rsv->node, &mgr->reserved_pages); + } } }@@ -279,13 +289,16 @@ int amdgpu_vram_mgr_reserve_range(struct amdgpu_vram_mgr *mgr,return -ENOMEM ;INIT_LIST_HEAD (&rsv->node); - rsv->mm_node.start = start >>PAGE_SHIFT ; - rsv->mm_node.size = size >>PAGE_SHIFT ; +INIT_LIST_HEAD (&rsv->block); + + rsv->start = start; + rsv->size = size; + rsv->flags |=DRM_BUDDY_RANGE_ALLOCATION ; -spin_lock (&mgr->lock); +mutex_lock (&mgr->lock);list_add_tail (&rsv->node, &mgr->reservations_pending);amdgpu_vram_mgr_do_reserve (&mgr->manager); -spin_unlock (&mgr->lock); +mutex_unlock (&mgr->lock);return 0 ; }@@ -307,19 +320,19 @@ int amdgpu_vram_mgr_query_page_status(struct amdgpu_vram_mgr *mgr,struct amdgpu_vram_reservation *rsv;int ret; -spin_lock (&mgr->lock); +mutex_lock (&mgr->lock);list_for_each_entry (rsv, &mgr->reservations_pending, node) { -if ((rsv->mm_node.start <= start) && - (start < (rsv->mm_node.start + rsv->mm_node.size))) { +if (rsv->start <= start && + (start < (rsv->start + rsv->size))) { ret = -EBUSY ; goto out; } }list_for_each_entry (rsv, &mgr->reserved_pages, node) { -if ((rsv->mm_node.start <= start) && - (start < (rsv->mm_node.start + rsv->mm_node.size))) { +if (rsv->start <= start && + (start < (rsv->start + rsv->size))) { ret =0 ; goto out; }@@ -327,32 +340,10 @@ int amdgpu_vram_mgr_query_page_status(struct amdgpu_vram_mgr *mgr, ret = -ENOENT ; out: -spin_unlock (&mgr->lock); +mutex_unlock (&mgr->lock);return ret; } -/** -* amdgpu_vram_mgr_virt_start - update virtual start address -* -* @mem: ttm_resource to update -* @node: just allocated node -* -* Calculate a virtual BO start address to easily check if everything is CPU -* accessible. -*/ -static void amdgpu_vram_mgr_virt_start (struct ttm_resource *mem, -struct drm_mm_node *node) -{ -unsigned long start; - - start = node->start + node->size; -if (start > mem->num_pages) - start -= mem->num_pages; -else - start =0 ; - mem->start =max (mem->start, start); -} -/** * amdgpu_vram_mgr_new - allocate new ranges * @@ -368,13 +359,13 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man,const struct ttm_place *place, struct ttm_resource **res) { - unsigned long lpfn, num_nodes, pages_per_node, pages_left, pages; + unsigned long lpfn, pages_per_node, pages_left, pages, n_pages; +u64 vis_usage =0 , mem_bytes, max_bytes, min_page_size;struct amdgpu_vram_mgr *mgr =to_vram_mgr (man);struct amdgpu_device *adev =to_amdgpu_device (mgr); -uint64_t vis_usage =0 , mem_bytes, max_bytes; -struct ttm_range_mgr_node *node; -struct drm_mm *mm = &mgr->mm; -enum drm_mm_insert_mode mode; +struct amdgpu_vram_mgr_node *node; +struct drm_buddy *mm = &mgr->mm; +struct drm_buddy_block *block;unsigned i;int r;
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, · line 383
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +2
-3@@ -387,10 +378,9 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, max_bytes -=AMDGPU_VM_RESERVED_VRAM ; mem_bytes = tbo->base.size; -if (place->flags &TTM_PL_FLAG_CONTIGUOUS ) { +if (place->flags &TTM_PL_FLAG_CONTIGUOUS ) pages_per_node = ~0ul ; - num_nodes =1 ; - }else { +else {
Please keep the } else { here, see coding style rules.
Quoted 50 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +11
-13#ifdef CONFIG_TRANSPARENT_HUGEPAGE pages_per_node =HPAGE_PMD_NR ;#else @@ -399,11 +389,9 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man,#endif pages_per_node =max_t (uint32_t, pages_per_node, tbo->page_alignment); - num_nodes =DIV_ROUND_UP_ULL (PFN_UP (mem_bytes), pages_per_node); } - node =kvmalloc (struct_size (node, mm_nodes, num_nodes), -GFP_KERNEL | __GFP_ZERO); + node =kzalloc (sizeof (*node),GFP_KERNEL );if (!node)return -ENOMEM ;@@ -415,9 +403,17 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, goto error_fini; } - mode =DRM_MM_INSERT_BEST ; +INIT_LIST_HEAD (&node->blocks); +if (place->flags &TTM_PL_FLAG_TOPDOWN ) - mode =DRM_MM_INSERT_HIGH ; + node->flags |=DRM_BUDDY_TOPDOWN_ALLOCATION ; + +if (place->fpfn || lpfn != man->size >>PAGE_SHIFT ) +/* Allocate blocks in desired range */ + node->flags |=DRM_BUDDY_RANGE_ALLOCATION ; + + min_page_size = mgr->default_page_size; +BUG_ON (min_page_size < mm->chunk_size); pages_left = node->base.num_pages;@@ -425,36 +421,61 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, pages =min (pages_left,2UL << (30 -PAGE_SHIFT )); i =0 ; -spin_lock (&mgr->lock);while (pages_left) { -uint32_t alignment = tbo->page_alignment; -if (pages >= pages_per_node) - alignment = pages_per_node; - - r =drm_mm_insert_node_in_range (mm, &node->mm_nodes[i], pages, - alignment,0 , place->fpfn, - lpfn, mode);
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, · line 426
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1
-9-if (unlikely (r)) { -if (pages > pages_per_node) { -if (is_power_of_2 (pages)) - pages = pages /2 ; -else - pages =rounddown_pow_of_two (pages); -continue ; - } - goto error_free; + pages = pages_per_node;
When I see that correctly then this is a rather bad idea.
That would limit each allocated block to only 2MiB, but we really want allocations up to 1GiB!
Quoted 39 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +28
-3+ + n_pages = pages; + +if (place->flags &TTM_PL_FLAG_CONTIGUOUS ) { + n_pages =roundup_pow_of_two (n_pages); + min_page_size = (u64 )n_pages <<PAGE_SHIFT ; + +if (n_pages > lpfn) + lpfn = n_pages; } - vis_usage +=amdgpu_vram_mgr_vis_size (adev, &node->mm_nodes[i]); -amdgpu_vram_mgr_virt_start (&node->base, &node->mm_nodes[i]); +mutex_lock (&mgr->lock); + r =drm_buddy_alloc_blocks (mm, (u64 )place->fpfn <<PAGE_SHIFT , + (u64 )lpfn <<PAGE_SHIFT , + (u64 )n_pages <<PAGE_SHIFT , + min_page_size, + &node->blocks, + node->flags); +mutex_unlock (&mgr->lock); +if (unlikely (r)) + goto error_free_blocks; + pages_left -= pages; ++i;if (pages > pages_left) pages = pages_left; } -spin_unlock (&mgr->lock); + +/* Free unused pages for contiguous allocation */ +if (place->flags &TTM_PL_FLAG_CONTIGUOUS ) { +u64 actual_size = (u64 )node->base.num_pages <<PAGE_SHIFT ; + +mutex_lock (&mgr->lock); + drm_buddy_block_trim(mm, + actual_size,
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, · line 472
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +10
-0+ &node->blocks); +mutex_unlock (&mgr->lock); + } + +list_for_each_entry (block, &node->blocks, link) + vis_usage +=amdgpu_vram_mgr_vis_size (adev, block); + + block =list_first_entry_or_null (&node->blocks, + struct drm_buddy_block, + link);
This is a repeating patter, you should probably add a helper function for it.
Regards,
Christian.
Quoted 137 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +44
-25+if (!block) { + r = -EINVAL ; + goto error_fini; + } + + node->base.start =amdgpu_node_start (block) >>PAGE_SHIFT ;if (i ==1 ) node->base.placement |=TTM_PL_FLAG_CONTIGUOUS ;@@ -468,13 +489,13 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, *res = &node->base;return 0 ; -error_free: -while (i--) -drm_mm_remove_node (&node->mm_nodes[i]); -spin_unlock (&mgr->lock); +error_free_blocks: +mutex_lock (&mgr->lock); +drm_buddy_free_list (mm, &node->blocks); +mutex_unlock (&mgr->lock); error_fini:ttm_resource_fini (man, &node->base); -kvfree (node); +kfree (node);return r; }@@ -490,27 +511,26 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man,static void amdgpu_vram_mgr_del (struct ttm_resource_manager *man,struct ttm_resource *res) { -struct ttm_range_mgr_node *node =to_ttm_range_mgr_node (res); +struct amdgpu_vram_mgr_node *node =to_amdgpu_vram_mgr_node (res);struct amdgpu_vram_mgr *mgr =to_vram_mgr (man);struct amdgpu_device *adev =to_amdgpu_device (mgr); +struct drm_buddy *mm = &mgr->mm; +struct drm_buddy_block *block;uint64_t vis_usage =0 ; -unsigned i, pages; -spin_lock (&mgr->lock); -for (i =0 , pages = res->num_pages; pages; - pages -= node->mm_nodes[i].size, ++i) { -struct drm_mm_node *mm = &node->mm_nodes[i]; +mutex_lock (&mgr->lock); +list_for_each_entry (block, &node->blocks, link) + vis_usage +=amdgpu_vram_mgr_vis_size (adev, block); -drm_mm_remove_node (mm); - vis_usage +=amdgpu_vram_mgr_vis_size (adev, mm); - }amdgpu_vram_mgr_do_reserve (man); -spin_unlock (&mgr->lock); + +drm_buddy_free_list (mm, &node->blocks); +mutex_unlock (&mgr->lock);atomic64_sub (vis_usage, &mgr->vis_usage);ttm_resource_fini (man, res); -kvfree (node); +kfree (node); }/** @@ -648,13 +668,22 @@ static void amdgpu_vram_mgr_debug(struct ttm_resource_manager *man, struct drm_printer *printer) {struct amdgpu_vram_mgr *mgr =to_vram_mgr (man); +struct drm_buddy *mm = &mgr->mm; +struct drm_buddy_block *block;drm_printf (printer," vis usage:%llu\n" ,amdgpu_vram_mgr_vis_usage (mgr)); -spin_lock (&mgr->lock); -drm_mm_print (&mgr->mm, printer); -spin_unlock (&mgr->lock); +mutex_lock (&mgr->lock); +drm_printf (printer,"default_page_size: %lluKiB\n" , + mgr->default_page_size >>10 ); + +drm_buddy_print (mm, printer); + +drm_printf (printer,"reserved:\n" ); +list_for_each_entry (block, &mgr->reserved_pages, link) +drm_buddy_block_print (mm, block, printer); +mutex_unlock (&mgr->lock); }static const struct ttm_resource_manager_func amdgpu_vram_mgr_func = {@@ -674,16 +703,21 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev) {struct amdgpu_vram_mgr *mgr = &adev->mman.vram_mgr;struct ttm_resource_manager *man = &mgr->manager; +int err;ttm_resource_manager_init (man, &adev->mman.bdev, adev->gmc.real_vram_size); man->func = &amdgpu_vram_mgr_func; -drm_mm_init (&mgr->mm,0 , man->size >>PAGE_SHIFT ); -spin_lock_init (&mgr->lock); + err =drm_buddy_init (&mgr->mm, man->size,PAGE_SIZE ); +if (err) +return err; + +mutex_init (&mgr->lock);INIT_LIST_HEAD (&mgr->reservations_pending);INIT_LIST_HEAD (&mgr->reserved_pages); + mgr->default_page_size =PAGE_SIZE ;ttm_set_driver_manager (&adev->mman.bdev,TTM_PL_VRAM , &mgr->manager);ttm_resource_manager_set_used (man, true);@@ -711,16 +745,16 @@ void amdgpu_vram_mgr_fini(struct amdgpu_device *adev)if (ret)return ; -spin_lock (&mgr->lock); +mutex_lock (&mgr->lock);list_for_each_entry_safe (rsv, temp, &mgr->reservations_pending, node)kfree (rsv);list_for_each_entry_safe (rsv, temp, &mgr->reserved_pages, node) { -drm_mm_remove_node (&rsv->mm_node); +drm_buddy_free_list (&mgr->mm, &rsv->block);kfree (rsv); } -drm_mm_takedown (&mgr->mm); -spin_unlock (&mgr->lock); +drm_buddy_fini (&mgr->mm); +mutex_unlock (&mgr->lock);ttm_resource_manager_cleanup (man);ttm_set_driver_manager (&adev->mman.bdev,TTM_PL_VRAM ,NULL );
Arunpravin
maintainerRe: [PATCH v13 5/5] drm/amdgpu: add drm buddy support to amdgpu
Quoted 507 lines · Christian König
Am 21.02.22 um 17:45 schrieb Arunpravin:
Quoted 79 lines
- Remove
drm_mmreferences and replace with drm buddy functionalities
- Add res cursor support for drm buddyv2(Matthew Auld):
- replace spinlock with mutex as we callkmem_cache_zalloc(...,GFP_KERNEL) indrm_buddy_alloc()function- lock
drm_buddy_block_trim()function as it calls mark_free/mark_split are all globally visiblev3(Matthew Auld):
- remove trim method error handling as we address the failure case atdrm_buddy_block_trim()functionv4:
- fix warnings reported by kernel test robot <[email protected]>v5:
- fix merge conflict issuev6:
- fix warnings reported by kernel test robot <[email protected]>v7:
- removeDRM_BUDDY_RANGE_ALLOCATIONflag usagev8:
- keepDRM_BUDDY_RANGE_ALLOCATIONflag usage
- resolve conflicts created by drm/amdgpu: remove VRAM accounting v2Signed-off-by Arunpravin <[email protected]>--- drivers/gpu/drm/Kconfig | 1 + .../gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 97 +++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 256 ++++++++++-------- 4 files changed, 229 insertions(+), 132 deletions(-)drivers/gpu/drm/Kconfig +1
-0@@ -279,6 +279,7 @@ config DRM_AMDGPU select HWMON select BACKLIGHT_CLASS_DEVICE select INTERVAL_TREE + select DRM_BUDDY help Choose this option if you have a recent AMD Radeon graphics card.drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h +6
-1@@ -30,12 +30,15 @@#include <drm/ttm/ttm_resource.h> #include <drm/ttm/ttm_range_manager.h> +#include "amdgpu_vram_mgr.h" +/* state back for walking over vram_mgr and gtt_mgr allocations */ struct amdgpu_res_cursor {uint64_t start;uint64_t size;uint64_t remaining; -struct drm_mm_node *node; +void *node; +uint32_t mem_type; };/** @@ -52,27 +55,63 @@ static inline void amdgpu_res_first(struct ttm_resource *res, uint64_t start, uint64_t size, struct amdgpu_res_cursor *cur) { + struct drm_buddy_block *block; +struct list_head *head, *next;struct drm_mm_node *node;drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h static inline void amdgpu_res_first(struct ttm_resource *res, · line 63
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h +2
-8-if (!res || res->mem_type ==TTM_PL_SYSTEM ) { - cur->start = start; - cur->size = size; - cur->remaining = size; - cur->node =NULL ; -WARN_ON (res && start + size > res->num_pages <<PAGE_SHIFT ); -return ; - } +if (!res) + goto err_out;It's not really an error to not have a resource. So I would rather name the label fallback or something like that.
Quoted 118 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h +70
-10BUG_ON (start + size > res->num_pages <<PAGE_SHIFT ); - node =to_ttm_range_mgr_node (res)->mm_nodes; -while (start >= node->size <<PAGE_SHIFT ) - start -= node++->size <<PAGE_SHIFT ; + cur->mem_type = res->mem_type; + +switch (cur->mem_type) { +case TTM_PL_VRAM : + head = &to_amdgpu_vram_mgr_node (res)->blocks; + + block =list_first_entry_or_null (head, + struct drm_buddy_block, + link); +if (!block) + goto err_out; + +while (start >=amdgpu_node_size (block)) { + start -=amdgpu_node_size (block); + + next = block->link.next; +if (next != head) + block = list_entry(next, struct drm_buddy_block, link); + } + + cur->start =amdgpu_node_start (block) + start; + cur->size =min (amdgpu_node_size (block) - start, size); + cur->remaining = size; + cur->node = block; +break ; +case TTM_PL_TT : + node =to_ttm_range_mgr_node (res)->mm_nodes; +while (start >= node->size <<PAGE_SHIFT ) + start -= node++->size <<PAGE_SHIFT ; + + cur->start = (node->start <<PAGE_SHIFT ) + start; + cur->size =min ((node->size <<PAGE_SHIFT ) - start, size); + cur->remaining = size; + cur->node = node; +break ; +default : + goto err_out; + } - cur->start = (node->start <<PAGE_SHIFT ) + start; - cur->size =min ((node->size <<PAGE_SHIFT ) - start, size); +return ; + +err_out: + cur->start = start; + cur->size = size; cur->remaining = size; - cur->node = node; + cur->node =NULL ; +WARN_ON (res && start + size > res->num_pages <<PAGE_SHIFT ); +return ; }/** @@ -85,7 +124,9 @@ static inline void amdgpu_res_first(struct ttm_resource *res,*/ static inline void amdgpu_res_next (struct amdgpu_res_cursor *cur,uint64_t size) { -struct drm_mm_node *node = cur->node; +struct drm_buddy_block *block; +struct drm_mm_node *node; +struct list_head *next;BUG_ON (size > cur->remaining);@@ -99,9 +140,27 @@ static inline void amdgpu_res_next(struct amdgpu_res_cursor *cur, uint64_t size)return ; } - cur->node = ++node; - cur->start = node->start <<PAGE_SHIFT ; - cur->size =min (node->size <<PAGE_SHIFT , cur->remaining); +switch (cur->mem_type) { +case TTM_PL_VRAM : + block = cur->node; + + next = block->link.next; + block = list_entry(next, struct drm_buddy_block, link); + + cur->node = block; + cur->start =amdgpu_node_start (block); + cur->size =min (amdgpu_node_size (block), cur->remaining); +break ; +case TTM_PL_TT : + node = cur->node; + + cur->node = ++node; + cur->start = node->start <<PAGE_SHIFT ; + cur->size =min (node->size <<PAGE_SHIFT , cur->remaining); +break ; +default : +return ; + } }#endif drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +1
-0@@ -26,6 +26,7 @@#include <linux/dma-direction.h> #include <drm/gpu_scheduler.h> +#include <drm/drm_buddy.h> #include "amdgpu.h" #define AMDGPU_PL_GDS (TTM_PL_PRIV + 0)@@ -40,11 +41,13 @@struct amdgpu_vram_mgr {struct ttm_resource_manager manager;drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h line 51
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +4
-2-struct drm_mm mm; -spinlock_t lock; +struct drm_buddy mm; +/* protects access to buffer objects */ +struct mutex lock;struct list_head reservations_pending;struct list_head reserved_pages;atomic64_t vis_usage; +u64 default_page_size; };Can we move that to
amdgpu_vram_mgr.has well?drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c line 37
Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +0
-0struct amdgpu_gtt_mgr {drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +3
-0@@ -32,8 +32,11 @@#include "atom.h" struct amdgpu_vram_reservation { +u64 start; +u64 size; +unsigned long flags;Looks like we will always use the same flags and that can be dropped.
Quoted 65 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +14
-15+struct list_head block;struct list_head node; -struct drm_mm_node mm_node; }; static inline struct amdgpu_vram_mgr *@@ -194,10 +197,10 @@ const struct attribute_group amdgpu_vram_mgr_attr_group = {* Calculate how many bytes of the MM node are inside visible VRAM */ static u64 amdgpu_vram_mgr_vis_size (struct amdgpu_device *adev, -struct drm_mm_node *node) +struct drm_buddy_block *block) { -uint64_t start = node->start <<PAGE_SHIFT ; -uint64_t end = (node->size + node->start) <<PAGE_SHIFT ; +u64 start =amdgpu_node_start (block); +u64 end = start +amdgpu_node_size (block);if (start >= adev->gmc.visible_vram_size)return 0 ;@@ -218,9 +221,9 @@ u64 amdgpu_vram_mgr_bo_visible_size(struct amdgpu_bo *bo) {struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev);struct ttm_resource *res = bo->tbo.resource; -unsigned pages = res->num_pages; -struct drm_mm_node *mm; -u64 usage; +struct amdgpu_vram_mgr_node *node =to_amdgpu_vram_mgr_node (res); +struct drm_buddy_block *block; +u64 usage =0 ;if (amdgpu_gmc_vram_full_visible (&adev->gmc))return amdgpu_bo_size (bo);@@ -228,9 +231,8 @@ u64 amdgpu_vram_mgr_bo_visible_size(struct amdgpu_bo *bo)if (res->start >= adev->gmc.visible_vram_size >>PAGE_SHIFT )return 0 ; - mm = &container_of(res, struct ttm_range_mgr_node, base)->mm_nodes[0]; -for (usage =0 ; pages; pages -= mm->size, mm++) - usage +=amdgpu_vram_mgr_vis_size (adev, mm); +list_for_each_entry (block, &node->blocks, link) + usage +=amdgpu_vram_mgr_vis_size (adev, block);return usage; }@@ -240,23 +242,31 @@ static void amdgpu_vram_mgr_do_reserve(struct ttm_resource_manager *man) {struct amdgpu_vram_mgr *mgr =to_vram_mgr (man);struct amdgpu_device *adev =to_amdgpu_device (mgr); -struct drm_mm *mm = &mgr->mm; +struct drm_buddy *mm = &mgr->mm;struct amdgpu_vram_reservation *rsv, *temp; +struct drm_buddy_block *block;uint64_t vis_usage;list_for_each_entry_safe (rsv, temp, &mgr->reservations_pending, node) { -if (drm_mm_reserve_node (mm, &rsv->mm_node)) +if (drm_buddy_alloc_blocks (mm, rsv->start, rsv->start + rsv->size, + rsv->size, mm->chunk_size, &rsv->block, + rsv->flags))continue ; -dev_dbg (adev->dev,"Reservation 0x%llx - %lld, Succeeded\n" , - rsv->mm_node.start, rsv->mm_node.size); -drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c static void amdgpu_vram_mgr_do_reserve(struct ttm_resource_manager *man) · line 259
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +4
-6- vis_usage =amdgpu_vram_mgr_vis_size (adev, &rsv->mm_node); -atomic64_add (vis_usage, &mgr->vis_usage); -spin_lock (&man->bdev->lru_lock); - man->usage += rsv->mm_node.size <<PAGE_SHIFT ; -spin_unlock (&man->bdev->lru_lock); -list_move (&rsv->node, &mgr->reserved_pages); + block =list_first_entry_or_null (&rsv->block, + struct drm_buddy_block, + link); +if (block) {Rather make that an "if (!block) continue;".
Quoted 113 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +28
-37+dev_dbg (adev->dev,"Reservation 0x%llx - %lld, Succeeded\n" , + rsv->start, rsv->size); + + vis_usage =amdgpu_vram_mgr_vis_size (adev, block); +atomic64_add (vis_usage, &mgr->vis_usage); +spin_lock (&man->bdev->lru_lock); + man->usage += rsv->size; +spin_unlock (&man->bdev->lru_lock); +list_move (&rsv->node, &mgr->reserved_pages); + } } }@@ -279,13 +289,16 @@ int amdgpu_vram_mgr_reserve_range(struct amdgpu_vram_mgr *mgr,return -ENOMEM ;INIT_LIST_HEAD (&rsv->node); - rsv->mm_node.start = start >>PAGE_SHIFT ; - rsv->mm_node.size = size >>PAGE_SHIFT ; +INIT_LIST_HEAD (&rsv->block); + + rsv->start = start; + rsv->size = size; + rsv->flags |=DRM_BUDDY_RANGE_ALLOCATION ; -spin_lock (&mgr->lock); +mutex_lock (&mgr->lock);list_add_tail (&rsv->node, &mgr->reservations_pending);amdgpu_vram_mgr_do_reserve (&mgr->manager); -spin_unlock (&mgr->lock); +mutex_unlock (&mgr->lock);return 0 ; }@@ -307,19 +320,19 @@ int amdgpu_vram_mgr_query_page_status(struct amdgpu_vram_mgr *mgr,struct amdgpu_vram_reservation *rsv;int ret; -spin_lock (&mgr->lock); +mutex_lock (&mgr->lock);list_for_each_entry (rsv, &mgr->reservations_pending, node) { -if ((rsv->mm_node.start <= start) && - (start < (rsv->mm_node.start + rsv->mm_node.size))) { +if (rsv->start <= start && + (start < (rsv->start + rsv->size))) { ret = -EBUSY ; goto out; } }list_for_each_entry (rsv, &mgr->reserved_pages, node) { -if ((rsv->mm_node.start <= start) && - (start < (rsv->mm_node.start + rsv->mm_node.size))) { +if (rsv->start <= start && + (start < (rsv->start + rsv->size))) { ret =0 ; goto out; }@@ -327,32 +340,10 @@ int amdgpu_vram_mgr_query_page_status(struct amdgpu_vram_mgr *mgr, ret = -ENOENT ; out: -spin_unlock (&mgr->lock); +mutex_unlock (&mgr->lock);return ret; } -/** -* amdgpu_vram_mgr_virt_start - update virtual start address -* -* @mem: ttm_resource to update -* @node: just allocated node -* -* Calculate a virtual BO start address to easily check if everything is CPU -* accessible. -*/ -static void amdgpu_vram_mgr_virt_start (struct ttm_resource *mem, -struct drm_mm_node *node) -{ -unsigned long start; - - start = node->start + node->size; -if (start > mem->num_pages) - start -= mem->num_pages; -else - start =0 ; - mem->start =max (mem->start, start); -} -/** * amdgpu_vram_mgr_new - allocate new ranges * @@ -368,13 +359,13 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man,const struct ttm_place *place, struct ttm_resource **res) { - unsigned long lpfn, num_nodes, pages_per_node, pages_left, pages; + unsigned long lpfn, pages_per_node, pages_left, pages, n_pages; +u64 vis_usage =0 , mem_bytes, max_bytes, min_page_size;struct amdgpu_vram_mgr *mgr =to_vram_mgr (man);struct amdgpu_device *adev =to_amdgpu_device (mgr); -uint64_t vis_usage =0 , mem_bytes, max_bytes; -struct ttm_range_mgr_node *node; -struct drm_mm *mm = &mgr->mm; -enum drm_mm_insert_mode mode; +struct amdgpu_vram_mgr_node *node; +struct drm_buddy *mm = &mgr->mm; +struct drm_buddy_block *block;unsigned i;int r;drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, · line 383
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +2
-3@@ -387,10 +378,9 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, max_bytes -=AMDGPU_VM_RESERVED_VRAM ; mem_bytes = tbo->base.size; -if (place->flags &TTM_PL_FLAG_CONTIGUOUS ) { +if (place->flags &TTM_PL_FLAG_CONTIGUOUS ) pages_per_node = ~0ul ; - num_nodes =1 ; - }else { +else {Please keep the } else { here, see coding style rules.
Quoted 50 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +11
-13#ifdef CONFIG_TRANSPARENT_HUGEPAGE pages_per_node =HPAGE_PMD_NR ;#else @@ -399,11 +389,9 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man,#endif pages_per_node =max_t (uint32_t, pages_per_node, tbo->page_alignment); - num_nodes =DIV_ROUND_UP_ULL (PFN_UP (mem_bytes), pages_per_node); } - node =kvmalloc (struct_size (node, mm_nodes, num_nodes), -GFP_KERNEL | __GFP_ZERO); + node =kzalloc (sizeof (*node),GFP_KERNEL );if (!node)return -ENOMEM ;@@ -415,9 +403,17 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, goto error_fini; } - mode =DRM_MM_INSERT_BEST ; +INIT_LIST_HEAD (&node->blocks); +if (place->flags &TTM_PL_FLAG_TOPDOWN ) - mode =DRM_MM_INSERT_HIGH ; + node->flags |=DRM_BUDDY_TOPDOWN_ALLOCATION ; + +if (place->fpfn || lpfn != man->size >>PAGE_SHIFT ) +/* Allocate blocks in desired range */ + node->flags |=DRM_BUDDY_RANGE_ALLOCATION ; + + min_page_size = mgr->default_page_size; +BUG_ON (min_page_size < mm->chunk_size); pages_left = node->base.num_pages;@@ -425,36 +421,61 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, pages =min (pages_left,2UL << (30 -PAGE_SHIFT )); i =0 ; -spin_lock (&mgr->lock);while (pages_left) { -uint32_t alignment = tbo->page_alignment; -if (pages >= pages_per_node) - alignment = pages_per_node; - - r =drm_mm_insert_node_in_range (mm, &node->mm_nodes[i], pages, - alignment,0 , place->fpfn, - lpfn, mode);drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, · line 426
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +1
-9-if (unlikely (r)) { -if (pages > pages_per_node) { -if (is_power_of_2 (pages)) - pages = pages /2 ; -else - pages =rounddown_pow_of_two (pages); -continue ; - } - goto error_free; + pages = pages_per_node;When I see that correctly then this is a rather bad idea.
Quoted 3 lines
That would limit each allocated block to only 2MiB, but we really want allocations up to 1GiB!
Hi Christian,
please review the new patch which has the following changes
* Each node maximum size is 2GiB
* Alignment design
how min_page_size is determined? min_page_size is the argument passed to drm_buddy, If we dont find a node equivalent to min_page_size, drm_buddy returns -ENOSPC
First we determine pages_per_node, it is the alignment size within the required total size, If huge page enabled pages_per_node = HPAGE_PMD_NR; Else, pages_per_node = 2MB, finally we take pages_per_node = max of (pages_per_node, tbo->page_alignment)
case 1 : If required pages > pages_per_node, then min_page_size = pages_per_node
case 2 : If required pages < pages_per_node, then min_page_size = tbo->page_alignment if available , else defaults to 4KB
case 3: If CONTIGUOUS flag enabled, min_page_size = size;
pages_per_node is the alignment size within the required total size min_page_size is the argument passed to drm_buddy
If we dont find a node equivalent to min_page_size, drm_buddy returns -ENOSPC
* when required size is > 2GB
say for example required size = 3GB, since the max node size is 2GB, we don't get continuous 3GB of allocation if required, we get 2GB contiguous and 1GB contiguous
Thanks,
Arun
Quoted 194 lines
Quoted 39 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +28
-3+ + n_pages = pages; + +if (place->flags &TTM_PL_FLAG_CONTIGUOUS ) { + n_pages =roundup_pow_of_two (n_pages); + min_page_size = (u64 )n_pages <<PAGE_SHIFT ; + +if (n_pages > lpfn) + lpfn = n_pages; } - vis_usage +=amdgpu_vram_mgr_vis_size (adev, &node->mm_nodes[i]); -amdgpu_vram_mgr_virt_start (&node->base, &node->mm_nodes[i]); +mutex_lock (&mgr->lock); + r =drm_buddy_alloc_blocks (mm, (u64 )place->fpfn <<PAGE_SHIFT , + (u64 )lpfn <<PAGE_SHIFT , + (u64 )n_pages <<PAGE_SHIFT , + min_page_size, + &node->blocks, + node->flags); +mutex_unlock (&mgr->lock); +if (unlikely (r)) + goto error_free_blocks; + pages_left -= pages; ++i;if (pages > pages_left) pages = pages_left; } -spin_unlock (&mgr->lock); + +/* Free unused pages for contiguous allocation */ +if (place->flags &TTM_PL_FLAG_CONTIGUOUS ) { +u64 actual_size = (u64 )node->base.num_pages <<PAGE_SHIFT ; + +mutex_lock (&mgr->lock); + drm_buddy_block_trim(mm, + actual_size,drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, · line 472
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +10
-0+ &node->blocks); +mutex_unlock (&mgr->lock); + } + +list_for_each_entry (block, &node->blocks, link) + vis_usage +=amdgpu_vram_mgr_vis_size (adev, block); + + block =list_first_entry_or_null (&node->blocks, + struct drm_buddy_block, + link);This is a repeating patter, you should probably add a helper function for it.
Regards,
Christian.Quoted 137 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +44
-25+if (!block) { + r = -EINVAL ; + goto error_fini; + } + + node->base.start =amdgpu_node_start (block) >>PAGE_SHIFT ;if (i ==1 ) node->base.placement |=TTM_PL_FLAG_CONTIGUOUS ;@@ -468,13 +489,13 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, *res = &node->base;return 0 ; -error_free: -while (i--) -drm_mm_remove_node (&node->mm_nodes[i]); -spin_unlock (&mgr->lock); +error_free_blocks: +mutex_lock (&mgr->lock); +drm_buddy_free_list (mm, &node->blocks); +mutex_unlock (&mgr->lock); error_fini:ttm_resource_fini (man, &node->base); -kvfree (node); +kfree (node);return r; }@@ -490,27 +511,26 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man,static void amdgpu_vram_mgr_del (struct ttm_resource_manager *man,struct ttm_resource *res) { -struct ttm_range_mgr_node *node =to_ttm_range_mgr_node (res); +struct amdgpu_vram_mgr_node *node =to_amdgpu_vram_mgr_node (res);struct amdgpu_vram_mgr *mgr =to_vram_mgr (man);struct amdgpu_device *adev =to_amdgpu_device (mgr); +struct drm_buddy *mm = &mgr->mm; +struct drm_buddy_block *block;uint64_t vis_usage =0 ; -unsigned i, pages; -spin_lock (&mgr->lock); -for (i =0 , pages = res->num_pages; pages; - pages -= node->mm_nodes[i].size, ++i) { -struct drm_mm_node *mm = &node->mm_nodes[i]; +mutex_lock (&mgr->lock); +list_for_each_entry (block, &node->blocks, link) + vis_usage +=amdgpu_vram_mgr_vis_size (adev, block); -drm_mm_remove_node (mm); - vis_usage +=amdgpu_vram_mgr_vis_size (adev, mm); - }amdgpu_vram_mgr_do_reserve (man); -spin_unlock (&mgr->lock); + +drm_buddy_free_list (mm, &node->blocks); +mutex_unlock (&mgr->lock);atomic64_sub (vis_usage, &mgr->vis_usage);ttm_resource_fini (man, res); -kvfree (node); +kfree (node); }/** @@ -648,13 +668,22 @@ static void amdgpu_vram_mgr_debug(struct ttm_resource_manager *man, struct drm_printer *printer) {struct amdgpu_vram_mgr *mgr =to_vram_mgr (man); +struct drm_buddy *mm = &mgr->mm; +struct drm_buddy_block *block;drm_printf (printer," vis usage:%llu\n" ,amdgpu_vram_mgr_vis_usage (mgr)); -spin_lock (&mgr->lock); -drm_mm_print (&mgr->mm, printer); -spin_unlock (&mgr->lock); +mutex_lock (&mgr->lock); +drm_printf (printer,"default_page_size: %lluKiB\n" , + mgr->default_page_size >>10 ); + +drm_buddy_print (mm, printer); + +drm_printf (printer,"reserved:\n" ); +list_for_each_entry (block, &mgr->reserved_pages, link) +drm_buddy_block_print (mm, block, printer); +mutex_unlock (&mgr->lock); }static const struct ttm_resource_manager_func amdgpu_vram_mgr_func = {@@ -674,16 +703,21 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev) {struct amdgpu_vram_mgr *mgr = &adev->mman.vram_mgr;struct ttm_resource_manager *man = &mgr->manager; +int err;ttm_resource_manager_init (man, &adev->mman.bdev, adev->gmc.real_vram_size); man->func = &amdgpu_vram_mgr_func; -drm_mm_init (&mgr->mm,0 , man->size >>PAGE_SHIFT ); -spin_lock_init (&mgr->lock); + err =drm_buddy_init (&mgr->mm, man->size,PAGE_SIZE ); +if (err) +return err; + +mutex_init (&mgr->lock);INIT_LIST_HEAD (&mgr->reservations_pending);INIT_LIST_HEAD (&mgr->reserved_pages); + mgr->default_page_size =PAGE_SIZE ;ttm_set_driver_manager (&adev->mman.bdev,TTM_PL_VRAM , &mgr->manager);ttm_resource_manager_set_used (man, true);@@ -711,16 +745,16 @@ void amdgpu_vram_mgr_fini(struct amdgpu_device *adev)if (ret)return ; -spin_lock (&mgr->lock); +mutex_lock (&mgr->lock);list_for_each_entry_safe (rsv, temp, &mgr->reservations_pending, node)kfree (rsv);list_for_each_entry_safe (rsv, temp, &mgr->reserved_pages, node) { -drm_mm_remove_node (&rsv->mm_node); +drm_buddy_free_list (&mgr->mm, &rsv->block);kfree (rsv); } -drm_mm_takedown (&mgr->mm); -spin_unlock (&mgr->lock); +drm_buddy_fini (&mgr->mm); +mutex_unlock (&mgr->lock);ttm_resource_manager_cleanup (man);ttm_set_driver_manager (&adev->mman.bdev,TTM_PL_VRAM ,NULL );
Christian König
maintainerGoing to let that sit on the mailing list till tomorrow, if I don't get any objections till then I will push it to drm-misc-next.
Thanks,
Christian.
Am 21.02.22 um 17:45 schrieb Arunpravin:
Quoted 582 lines
- Make
drm_buddy_alloca single function to handle range allocation and non-range allocation demands- Implemented a new function
alloc_range()which allocates the requested power-of-two block comply with range limitations- Moved order computation and memory alignment logic from i915 driver to drm buddy
v2:
merged below changes to keep the build unbroken
-drm_buddy_alloc_range()becomes obsolete and may be removed
- enable ttm range allocation (fpfn / lpfn) support in i915 driver
- apply enhanceddrm_buddy_alloc()function to i915 driverv3(Matthew Auld):
- Fix alignment issues and remove unnecessarylist_emptycheck
- add more validation checks for input arguments
- makealloc_range()block allocations as bottom-up
- optimize order computation logic
- replaceuint64_twith u64, which is preferred in the kernelv4(Matthew Auld):
- keepdrm_buddy_alloc_range()function implementation for generic actual range allocations
- keepalloc_range()implementation for end bias allocationsv5(Matthew Auld):
- modifydrm_buddy_alloc()passing argumentplace->lpfnto lpfnas place->lpfn will currently always be zero for i915v6(Matthew Auld):
- fixup potential uaf - If we are unlucky and can't allocate enough memory when splitting blocks, where we temporarily end up with the given block and its buddy on the respective free list, then we need to ensure we delete both blocks, and no just the buddy, before potentially freeing them- fix warnings reported by kernel test robot <[email protected]>
v7(Matthew Auld):
- revert fixup potential uaf
- keep__alloc_range()add node to the list logic same asdrm_buddy_alloc_blocks()by having a temporary list variable
- atdrm_buddy_alloc_blocks()keep i915range_overflowsmacro and add a new check for end variablev8:
- fix warnings reported by kernel test robot <[email protected]>v9(Matthew Auld):
- removeDRM_BUDDY_RANGE_ALLOCATIONflag
- remove unnecessary function descriptionv10:
- keepDRM_BUDDY_RANGE_ALLOCATIONflag as removing the flag and replacing with (end < size) logic fails amdgpu driver loadSigned-off-by Arunpravin <[email protected]>Reviewed-by Matthew Auld <[email protected]>--- drivers/gpu/drm/drm_buddy.c | 292 +++++++++++++----- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 67 ++-- drivers/gpu/drm/i915/i915_ttm_buddy_manager.h | 2 + include/drm/drm_buddy.h | 13 +- 4 files changed, 257 insertions(+), 117 deletions(-)drivers/gpu/drm/drm_buddy.c +215
-77@@ -282,23 +282,97 @@ void drm_buddy_free_list(struct drm_buddy *mm, struct list_head *objects) }EXPORT_SYMBOL (drm_buddy_free_list); -/** -* drm_buddy_alloc_blocks - allocate power-of-two blocks -* -* @mm: DRM buddy manager to allocate from -* @order: size of the allocation -* -* The order value here translates to: -* -* 0 = 2^0 * mm->chunk_size -* 1 = 2^1 * mm->chunk_size -* 2 = 2^2 * mm->chunk_size -* -* Returns: -* allocated ptr to the &drm_buddy_block on success -*/ -struct drm_buddy_block * -drm_buddy_alloc_blocks (struct drm_buddy *mm,unsigned int order) +static inline bool overlaps (u64 s1,u64 e1,u64 s2,u64 e2) +{ +return s1 <= e2 && e1 >= s2; +} + +static inline bool contains (u64 s1,u64 e1,u64 s2,u64 e2) +{ +return s1 <= s2 && e1 >= e2; +} + +static struct drm_buddy_block * +alloc_range_bias (struct drm_buddy *mm, +u64 start,u64 end, +unsigned int order) +{ +struct drm_buddy_block *block; +struct drm_buddy_block *buddy; +LIST_HEAD (dfs); +int err; +int i; + + end = end -1 ; + +for (i =0 ; i < mm->n_roots; ++i) +list_add_tail (&mm->roots[i]->tmp_link, &dfs); + +do { +u64 block_start; +u64 block_end; + + block =list_first_entry_or_null (&dfs, + struct drm_buddy_block, + tmp_link); +if (!block) +break ; + +list_del (&block->tmp_link); + +if (drm_buddy_block_order (block) < order) +continue ; + + block_start =drm_buddy_block_offset (block); + block_end = block_start +drm_buddy_block_size (mm, block) -1 ; + +if (!overlaps (start, end, block_start, block_end)) +continue ; + +if (drm_buddy_block_is_allocated (block)) +continue ; + +if (contains (start, end, block_start, block_end) && + order ==drm_buddy_block_order (block)) { +/* +* Find the free block within the range. +*/ +if (drm_buddy_block_is_free (block)) +return block; + +continue ; + } + +if (!drm_buddy_block_is_split (block)) { + err =split_block (mm, block); +if (unlikely (err)) + goto err_undo; + } + +list_add (&block->right->tmp_link, &dfs); +list_add (&block->left->tmp_link, &dfs); + }while (1 ); + +return ERR_PTR (-ENOSPC ); + +err_undo: +/* +* We really don't want to leave around a bunch of split blocks, since +* bigger is better, so make sure we merge everything back before we +* free the allocated blocks. +*/ + buddy =get_buddy (block); +if (buddy && + (drm_buddy_block_is_free (block) && +drm_buddy_block_is_free (buddy))) +__drm_buddy_free (mm, block); +return ERR_PTR (err); +} + +static struct drm_buddy_block * +alloc_from_freelist (struct drm_buddy *mm, +unsigned int order, +unsigned long flags) {struct drm_buddy_block *block =NULL ;unsigned int i;@@ -320,78 +394,29 @@ drm_buddy_alloc_blocks(struct drm_buddy *mm, unsigned int order)while (i != order) { err =split_block (mm, block);if (unlikely (err)) - goto out_free; + goto err_undo; -/* Go low */ - block = block->left; + block = block->right; i--; } - -mark_allocated (block); - mm->avail -=drm_buddy_block_size (mm, block); -kmemleak_update_trace (block);return block; -out_free: +err_undo:if (i != order)__drm_buddy_free (mm, block);return ERR_PTR (err); } -EXPORT_SYMBOL (drm_buddy_alloc_blocks); - -static inline bool overlaps (u64 s1,u64 e1,u64 s2,u64 e2) -{ -return s1 <= e2 && e1 >= s2; -} - -static inline bool contains (u64 s1,u64 e1,u64 s2,u64 e2) -{ -return s1 <= s2 && e1 >= e2; -} -/** -* drm_buddy_alloc_range - allocate range -* -* @mm: DRM buddy manager to allocate from -* @blocks: output list head to add allocated blocks -* @start: start of the allowed range for this block -* @size: size of the allocation -* -* Intended for pre-allocating portions of the address space, for example to -* reserve a block for the initial framebuffer or similar, hence the expectation -* here is that drm_buddy_alloc_blocks() is still the main vehicle for -* allocations, so if that's not the case then the drm_mm range allocator is -* probably a much better fit, and so you should probably go use that instead. -* -* Note that it's safe to chain together multiple alloc_ranges -* with the same blocks list -* -* Returns: -* 0 on success, error code on failure. -*/ -int drm_buddy_alloc_range (struct drm_buddy *mm, -struct list_head *blocks, -u64 start,u64 size) +static int __alloc_range (struct drm_buddy *mm, +struct list_head *dfs, +u64 start,u64 size, +struct list_head *blocks) {struct drm_buddy_block *block;struct drm_buddy_block *buddy;LIST_HEAD (allocated); -LIST_HEAD (dfs);u64 end;int err; -int i; - -if (size < mm->chunk_size) -return -EINVAL ; - -if (!IS_ALIGNED (size | start, mm->chunk_size)) -return -EINVAL ; - -if (range_overflows (start, size, mm->size)) -return -EINVAL ; - -for (i =0 ; i < mm->n_roots; ++i) -list_add_tail (&mm->roots[i]->tmp_link, &dfs); end = start + size -1 ;@@ -399,7 +424,7 @@ int drm_buddy_alloc_range(struct drm_buddy *mm,u64 block_start;u64 block_end; - block =list_first_entry_or_null (&dfs, + block =list_first_entry_or_null (dfs, struct drm_buddy_block, tmp_link);if (!block)@@ -436,8 +461,8 @@ int drm_buddy_alloc_range(struct drm_buddy *mm, goto err_undo; } -list_add (&block->right->tmp_link, &dfs); -list_add (&block->left->tmp_link, &dfs); +list_add (&block->right->tmp_link, dfs); +list_add (&block->left->tmp_link, dfs); }while (1 );list_splice_tail (&allocated, blocks);@@ -459,7 +484,120 @@ int drm_buddy_alloc_range(struct drm_buddy *mm,drm_buddy_free_list (mm, &allocated);return err; } -EXPORT_SYMBOL (drm_buddy_alloc_range); + +static int __drm_buddy_alloc_range (struct drm_buddy *mm, +u64 start, +u64 size, +struct list_head *blocks) +{ +LIST_HEAD (dfs); +int i; + +for (i =0 ; i < mm->n_roots; ++i) +list_add_tail (&mm->roots[i]->tmp_link, &dfs); + +return __alloc_range (mm, &dfs, start, size, blocks); +} + +/** +* drm_buddy_alloc_blocks - allocate power-of-two blocks +* +* @mm: DRM buddy manager to allocate from +* @start: start of the allowed range for this block +* @end: end of the allowed range for this block +* @size: size of the allocation +* @min_page_size: alignment of the allocation +* @blocks: output list head to add allocated blocks +* @flags: DRM_BUDDY_*_ALLOCATION flags +* +* alloc_range_bias() called on range limitations, which traverses +* the tree and returns the desired block. +* +* alloc_from_freelist() called when *no* range restrictions +* are enforced, which picks the block from the freelist. +* +* Returns: +* 0 on success, error code on failure. +*/ +int drm_buddy_alloc_blocks (struct drm_buddy *mm, +u64 start,u64 end,u64 size, +u64 min_page_size, +struct list_head *blocks, +unsigned long flags) +{ +struct drm_buddy_block *block =NULL ; +unsigned int min_order, order; +unsigned long pages; +LIST_HEAD (allocated); +int err; + +if (size < mm->chunk_size) +return -EINVAL ; + +if (min_page_size < mm->chunk_size) +return -EINVAL ; + +if (!is_power_of_2 (min_page_size)) +return -EINVAL ; + +if (!IS_ALIGNED (start | end | size, mm->chunk_size)) +return -EINVAL ; + +if (end > mm->size) +return -EINVAL ; + +if (range_overflows (start, size, mm->size)) +return -EINVAL ; + +/* Actual range allocation */ +if (start + size == end) +return __drm_buddy_alloc_range (mm, start, size, blocks); + + pages = size >>ilog2 (mm->chunk_size); + order =fls (pages) -1 ; + min_order =ilog2 (min_page_size) -ilog2 (mm->chunk_size); + +do { + order =min (order, (unsigned int )fls (pages) -1 ); +BUG_ON (order > mm->max_order); +BUG_ON (order < min_order); + +do { +if (flags &DRM_BUDDY_RANGE_ALLOCATION ) +/* Allocate traversing within the range */ + block =alloc_range_bias (mm, start, end, order); +else +/* Allocate from freelist */ + block =alloc_from_freelist (mm, order, flags); + +if (!IS_ERR (block)) +break ; + +if (order-- == min_order) { + err = -ENOSPC ; + goto err_free; + } + }while (1 ); + +mark_allocated (block); + mm->avail -=drm_buddy_block_size (mm, block); +kmemleak_update_trace (block); +list_add_tail (&block->link, &allocated); + + pages -=BIT (order); + +if (!pages) +break ; + }while (1 ); + +list_splice_tail (&allocated, blocks); +return 0 ; + +err_free: +drm_buddy_free_list (mm, &allocated); +return err; +} +EXPORT_SYMBOL (drm_buddy_alloc_blocks);/** * drm_buddy_block_print - print block information drivers/gpu/drm/i915/i915_ttm_buddy_manager.c +33
-34@@ -36,13 +36,14 @@ static int i915_ttm_buddy_man_alloc(struct ttm_resource_manager *man,struct i915_ttm_buddy_manager *bman =to_buddy_manager (man);struct i915_ttm_buddy_resource *bman_res;struct drm_buddy *mm = &bman->mm; -unsigned long n_pages; -unsigned int min_order; +unsigned long n_pages, lpfn;u64 min_page_size;u64 size;int err; -GEM_BUG_ON (place->fpfn || place->lpfn); + lpfn = place->lpfn; +if (!lpfn) + lpfn = man->size; bman_res =kzalloc (sizeof (*bman_res),GFP_KERNEL );if (!bman_res)@@ -52,6 +53,9 @@ static int i915_ttm_buddy_man_alloc(struct ttm_resource_manager *man,INIT_LIST_HEAD (&bman_res->blocks); bman_res->mm = mm; +if (place->fpfn || lpfn != man->size) + bman_res->flags |=DRM_BUDDY_RANGE_ALLOCATION ; +GEM_BUG_ON (!bman_res->base.num_pages); size = bman_res->base.num_pages <<PAGE_SHIFT ;@@ -60,10 +64,16 @@ static int i915_ttm_buddy_man_alloc(struct ttm_resource_manager *man, min_page_size = bo->page_alignment <<PAGE_SHIFT ;GEM_BUG_ON (min_page_size < mm->chunk_size); - min_order =ilog2 (min_page_size) -ilog2 (mm->chunk_size); +if (place->flags &TTM_PL_FLAG_CONTIGUOUS ) { +unsigned long pages; + size =roundup_pow_of_two (size); - min_order =ilog2 (size) -ilog2 (mm->chunk_size); + min_page_size = size; + + pages = size >>ilog2 (mm->chunk_size); +if (pages > lpfn) + lpfn = pages; }if (size > mm->size) {@@ -73,34 +83,16 @@ static int i915_ttm_buddy_man_alloc(struct ttm_resource_manager *man, n_pages = size >>ilog2 (mm->chunk_size); -do { -struct drm_buddy_block *block; -unsigned int order; - - order =fls (n_pages) -1 ; -GEM_BUG_ON (order > mm->max_order); -GEM_BUG_ON (order < min_order); - -do { -mutex_lock (&bman->lock); - block =drm_buddy_alloc_blocks (mm, order); -mutex_unlock (&bman->lock); -if (!IS_ERR (block)) -break ; - -if (order-- == min_order) { - err = -ENOSPC ; - goto err_free_blocks; - } - }while (1 ); - - n_pages -=BIT (order); - -list_add_tail (&block->link, &bman_res->blocks); - -if (!n_pages) -break ; - }while (1 ); +mutex_lock (&bman->lock); + err =drm_buddy_alloc_blocks (mm, (u64 )place->fpfn <<PAGE_SHIFT , + (u64 )lpfn <<PAGE_SHIFT , + (u64 )n_pages <<PAGE_SHIFT , + min_page_size, + &bman_res->blocks, + bman_res->flags); +mutex_unlock (&bman->lock); +if (unlikely (err)) + goto err_free_blocks; *res = &bman_res->base;return 0 ;@@ -268,10 +260,17 @@ int i915_ttm_buddy_man_reserve(struct ttm_resource_manager *man, {struct i915_ttm_buddy_manager *bman =to_buddy_manager (man);struct drm_buddy *mm = &bman->mm; +unsigned long flags =0 ;int ret; + flags |=DRM_BUDDY_RANGE_ALLOCATION ; +mutex_lock (&bman->lock); - ret =drm_buddy_alloc_range (mm, &bman->reserved, start, size); + ret =drm_buddy_alloc_blocks (mm, start, + start + size, + size, mm->chunk_size, + &bman->reserved, + flags);mutex_unlock (&bman->lock);return ret;drivers/gpu/drm/i915/i915_ttm_buddy_manager.h +2
-0@@ -20,6 +20,7 @@ struct drm_buddy;* * @base: struct ttm_resource base class we extend * @blocks: the list of struct i915_buddy_block for this resource/allocation +* @flags: DRM_BUDDY_*_ALLOCATION flags * @mm: the struct i915_buddy_mm for this resource * * Extends the struct ttm_resource to manage an address space allocation with @@ -28,6 +29,7 @@ struct drm_buddy;struct i915_ttm_buddy_resource {struct ttm_resource base;struct list_head blocks; +unsigned long flags;struct drm_buddy *mm; };include/drm/drm_buddy.h +7
-6@@ -22,6 +22,8 @@ start__ >= max__ || size__ > max__ - start__; \ }) +#define DRM_BUDDY_RANGE_ALLOCATION (1 << 0) +struct drm_buddy_block {#define DRM_BUDDY_HEADER_OFFSET GENMASK_ULL(63, 12)#define DRM_BUDDY_HEADER_STATE GENMASK_ULL(11, 10)@@ -131,12 +133,11 @@ int drm_buddy_init(struct drm_buddy *mm, u64 size, u64 chunk_size);void drm_buddy_fini (struct drm_buddy *mm); -struct drm_buddy_block * -drm_buddy_alloc_blocks (struct drm_buddy *mm,unsigned int order); - -int drm_buddy_alloc_range (struct drm_buddy *mm, -struct list_head *blocks, -u64 start,u64 size); +int drm_buddy_alloc_blocks (struct drm_buddy *mm, +u64 start,u64 end,u64 size, +u64 min_page_size, +struct list_head *blocks, +unsigned long flags);void drm_buddy_free_block (struct drm_buddy *mm,struct drm_buddy_block *block);base-commit:
4f574e4e0184dfccce23b438846b95bbb4d14e39
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v13,1/5] drm: improve drm_buddy_alloc function
In reply to Arunpravin== Series Details ==
== Series Details ==
Series: series starting with [v13,1/5] drm: improve drm_buddy_alloc function
URL : https://patchwork.freedesktop.org/series/100509/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 1ae185a2649e drm: improve drm_buddy_alloc function -:372: WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() #372: FILE: drivers/gpu/drm/drm_buddy.c:562: + BUG_ON(order > mm->max_order);
-:373: WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() #373: FILE: drivers/gpu/drm/drm_buddy.c:563:
+ BUG_ON(order < min_order);
total: 0 errors, 2 warnings, 0 checks, 483 lines checkedcf3ca8204216 drm: implement top-down allocation method520affca2185 drm: implement a method to free unused pagesc101b2692614 drm/amdgpu: move vram inline functions into a header
-:12: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #12:
new file mode 100644
total: 0 errors, 1 warnings, 0 checks, 51 lines checked 824dc64040ae drm/amdgpu: add drm buddy support to amdgpu -:67: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u32' over 'uint32_t' #67: FILE: drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h:41:
+ uint32_t mem_type;
-:426: CHECK:BRACES: Unbalanced braces around else statement #426: FILE: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:383:
+ else {
-:459: WARNING:AVOID_BUG: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() #459: FILE: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:416:
+ BUG_ON(min_page_size < mm->chunk_size);
total: 0 errors, 1 warnings, 2 checks, 594 lines checked
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v13,1/5] drm: improve drm_buddy_alloc function
In reply to Arunpravin== Series Details ==
== Series Details ==
Series: series starting with [v13,1/5] drm: improve drm_buddy_alloc function
URL : https://patchwork.freedesktop.org/series/100509/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_11264 -> Patchwork_22344
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/index.html
Participating hosts (44 -> 42)
------------------------------
Additional (3): bat-dg2-8 fi-bdw-5557u fi-pnv-d510
Missing (5): shard-tglu fi-bsw-cyan fi-kbl-8809g shard-rkl shard-dg1
Known issues
------------
Here are the changes found in Patchwork_22344 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_basic@semaphore:
- fi-hsw-4770: NOTRUN -> [SKIP][1] ([fdo#109271] / [fdo#109315]) +17 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-hsw-4770/igt@amdgpu/[email protected]
* igt@gem_huc_copy@huc-copy:
- fi-skl-6600u: NOTRUN -> [SKIP][2] ([fdo#109271] / [i915#2190])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-skl-6600u/igt@[email protected]
- fi-pnv-d510: NOTRUN -> [SKIP][3] ([fdo#109271]) +57 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-pnv-d510/igt@[email protected]
* igt@gem_lmem_swapping@verify-random:
- fi-skl-6600u: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#4613]) +3 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-skl-6600u/igt@[email protected]
* igt@i915_selftest@live:
- fi-skl-6600u: NOTRUN -> [FAIL][5] ([i915#4547])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-skl-6600u/igt@[email protected]
* igt@i915_selftest@live@execlists:
- fi-bsw-kefka: [PASS][6] -> [INCOMPLETE][7] ([i915#2940])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/fi-bsw-kefka/igt@i915_selftest@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-bsw-kefka/igt@i915_selftest@[email protected]
* igt@kms_chamelium@vga-edid-read:
- fi-skl-6600u: NOTRUN -> [SKIP][8] ([fdo#109271] / [fdo#111827]) +8 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-skl-6600u/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-skl-6600u: NOTRUN -> [SKIP][9] ([fdo#109271]) +3 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-skl-6600u/igt@[email protected]
* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- fi-skl-6600u: NOTRUN -> [SKIP][10] ([fdo#109271] / [i915#533])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-skl-6600u/igt@[email protected]
* igt@kms_pipe_crc_basic@read-crc-pipe-b:
- fi-cfl-8109u: [PASS][11] -> [DMESG-WARN][12] ([i915#295]) +12 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/fi-cfl-8109u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-cfl-8109u/igt@[email protected]
* igt@runner@aborted:
- fi-bsw-kefka: NOTRUN -> [FAIL][13] ([fdo#109271] / [i915#1436] / [i915#2722] / [i915#3428] / [i915#4312])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-bsw-kefka/igt@[email protected]
- fi-bdw-5557u: NOTRUN -> [FAIL][14] ([i915#2426] / [i915#4312])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-bdw-5557u/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s3@smem:
- fi-skl-6600u: [INCOMPLETE][15] ([i915#4547]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/fi-skl-6600u/igt@gem_exec_suspend@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-skl-6600u/igt@gem_exec_suspend@[email protected]
* igt@i915_selftest@live@gt_pm:
- fi-tgl-1115g4: [DMESG-FAIL][17] ([i915#3987]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/fi-tgl-1115g4/igt@i915_selftest@live@gt_pm.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-tgl-1115g4/igt@i915_selftest@live@gt_pm.html
* igt@i915_selftest@live@gt_timelines:
- {fi-tgl-dsi}: [INCOMPLETE][19] -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/fi-tgl-dsi/igt@i915_selftest@live@gt_timelines.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-tgl-dsi/igt@i915_selftest@live@gt_timelines.html
* igt@i915_selftest@live@hangcheck:
- fi-hsw-4770: [INCOMPLETE][21] ([i915#3303]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/fi-hsw-4770/igt@i915_selftest@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-hsw-4770/igt@i915_selftest@[email protected]
#### Warnings ####
* igt@i915_selftest@live@hangcheck:
- bat-dg1-5: [DMESG-FAIL][23] ([i915#4494] / [i915#4957]) -> [DMESG-FAIL][24] ([i915#4957])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/bat-dg1-5/igt@i915_selftest@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/bat-dg1-5/igt@i915_selftest@[email protected]
* igt@runner@aborted:
- fi-skl-6600u: [FAIL][25] ([i915#4312]) -> [FAIL][26] ([i915#1436] / [i915#4312])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/fi-skl-6600u/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/fi-skl-6600u/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#1759]: https://gitlab.freedesktop.org/drm/intel/issues/1759
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2373]: https://gitlab.freedesktop.org/drm/intel/issues/2373
[i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
[i915#2940]: https://gitlab.freedesktop.org/drm/intel/issues/2940
[i915#295]: https://gitlab.freedesktop.org/drm/intel/issues/295
[i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303
[i915#3428]: https://gitlab.freedesktop.org/drm/intel/issues/3428
[i915#3987]: https://gitlab.freedesktop.org/drm/intel/issues/3987
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4494]: https://gitlab.freedesktop.org/drm/intel/issues/4494
[i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4898]: https://gitlab.freedesktop.org/drm/intel/issues/4898
[i915#4957]: https://gitlab.freedesktop.org/drm/intel/issues/4957
[i915#5127]: https://gitlab.freedesktop.org/drm/intel/issues/5127
[i915#5137]: https://gitlab.freedesktop.org/drm/intel/issues/5137
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
Build changes
-------------
* Linux: CI_DRM_11264 -> Patchwork_22344
CI-20190529: 20190529
CI_DRM_11264: 3b562232559bd940e63f977619548e5cc70da985 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6349: 0513032006f385f34fcd094c810b93f31cbed09d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_22344: 824dc64040ae150e06af6f5192406bcc75f77887 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
824dc64040ae drm/amdgpu: add drm buddy support to amdgpu c101b2692614 drm/amdgpu: move vram inline functions into a header 520affca2185 drm: implement a method to free unused pages cf3ca8204216 drm: implement top-down allocation method 1ae185a2649e drm: improve drm_buddy_alloc function
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/index.html
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [v13,1/5] drm: improve drm_buddy_alloc function
In reply to Arunpravin== Series Details ==
== Series Details ==
Series: series starting with [v13,1/5] drm: improve drm_buddy_alloc function
URL : https://patchwork.freedesktop.org/series/100509/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_11264_full -> Patchwork_22344_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (13 -> 13)
------------------------------
No changes in participating hosts
Known issues
------------
Here are the changes found in Patchwork_22344_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_persistence@many-contexts:
- shard-glk: [PASS][1] -> [DMESG-WARN][2] ([i915#118]) +3 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-glk5/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-glk7/igt@[email protected]
* igt@gem_exec_balancer@parallel-ordering:
- shard-kbl: NOTRUN -> [DMESG-FAIL][3] ([i915#5076])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl1/igt@[email protected]
* igt@gem_exec_fair@basic-pace@rcs0:
- shard-kbl: NOTRUN -> [FAIL][4] ([i915#2842])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl3/igt@gem_exec_fair@[email protected]
- shard-iclb: [PASS][5] -> [FAIL][6] ([i915#2842]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-iclb7/igt@gem_exec_fair@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb3/igt@gem_exec_fair@[email protected]
* igt@gem_lmem_swapping@heavy-multi:
- shard-kbl: NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#4613])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl1/igt@[email protected]
* igt@gem_lmem_swapping@parallel-random-engines:
- shard-skl: NOTRUN -> [SKIP][8] ([fdo#109271] / [i915#4613])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl1/igt@[email protected]
* igt@gem_lmem_swapping@smem-oom:
- shard-apl: NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#4613])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-apl2/igt@[email protected]
* igt@gem_pwrite@basic-exhaustion:
- shard-skl: NOTRUN -> [WARN][10] ([i915#2658])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl1/igt@[email protected]
* igt@gem_render_copy@y-tiled-mc-ccs-to-vebox-y-tiled:
- shard-iclb: NOTRUN -> [SKIP][11] ([i915#768]) +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb8/igt@[email protected]
* igt@i915_pm_dc@dc6-dpms:
- shard-kbl: NOTRUN -> [FAIL][12] ([i915#454])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl1/igt@[email protected]
* igt@i915_pm_rpm@cursor:
- shard-iclb: [PASS][13] -> [INCOMPLETE][14] ([i915#5096])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-iclb8/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb4/igt@[email protected]
* igt@i915_pm_rpm@system-suspend-execbuf:
- shard-skl: [PASS][15] -> [INCOMPLETE][16] ([i915#151])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-skl4/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl2/igt@[email protected]
* igt@i915_selftest@mock@hugepages:
- shard-skl: NOTRUN -> [INCOMPLETE][17] ([i915#5123])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl1/igt@i915_selftest@[email protected]
- shard-kbl: NOTRUN -> [INCOMPLETE][18] ([i915#5123])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl7/igt@i915_selftest@[email protected]
* igt@i915_suspend@sysfs-reader:
- shard-apl: [PASS][19] -> [DMESG-WARN][20] ([i915#180]) +4 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-apl2/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-apl6/igt@[email protected]
- shard-kbl: NOTRUN -> [DMESG-WARN][21] ([i915#180])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl4/igt@[email protected]
* igt@kms_async_flips@alternate-sync-async-flip:
- shard-skl: [PASS][22] -> [FAIL][23] ([i915#2521])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-skl7/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl2/igt@[email protected]
* igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-0-hflip:
- shard-kbl: NOTRUN -> [SKIP][24] ([fdo#109271] / [i915#3777])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl3/igt@[email protected]
* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip:
- shard-apl: NOTRUN -> [SKIP][25] ([fdo#109271] / [i915#3777])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-apl2/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip.html
* igt@kms_big_fb@yf-tiled-8bpp-rotate-0:
- shard-iclb: NOTRUN -> [SKIP][26] ([fdo#110723])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb8/igt@[email protected]
* igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-hflip:
- shard-skl: NOTRUN -> [SKIP][27] ([fdo#109271] / [i915#3777])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl1/igt@[email protected]
* igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_gen12_rc_ccs_cc:
- shard-kbl: NOTRUN -> [SKIP][28] ([fdo#109271] / [i915#3886]) +1 similar issue
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl3/igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_gen12_rc_ccs_cc.html
* igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_mc_ccs:
- shard-apl: NOTRUN -> [SKIP][29] ([fdo#109271] / [i915#3886]) +2 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-apl8/igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_mc_ccs.html
* igt@kms_ccs@pipe-b-random-ccs-data-y_tiled_gen12_mc_ccs:
- shard-iclb: NOTRUN -> [SKIP][30] ([fdo#109278] / [i915#3886]) +2 similar issues
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb8/igt@kms_ccs@pipe-b-random-ccs-data-y_tiled_gen12_mc_ccs.html
* igt@kms_ccs@pipe-c-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc:
- shard-skl: NOTRUN -> [SKIP][31] ([fdo#109271] / [i915#3886]) +3 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl1/igt@kms_ccs@pipe-c-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc.html
* igt@kms_ccs@pipe-d-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc:
- shard-kbl: NOTRUN -> [SKIP][32] ([fdo#109271]) +65 similar issues
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl3/igt@kms_ccs@pipe-d-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc.html
* igt@kms_chamelium@hdmi-hpd-fast:
- shard-iclb: NOTRUN -> [SKIP][33] ([fdo#109284] / [fdo#111827]) +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb8/igt@[email protected]
* igt@kms_chamelium@hdmi-mode-timings:
- shard-kbl: NOTRUN -> [SKIP][34] ([fdo#109271] / [fdo#111827]) +6 similar issues
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl3/igt@[email protected]
* igt@kms_chamelium@vga-hpd-enable-disable-mode:
- shard-apl: NOTRUN -> [SKIP][35] ([fdo#109271] / [fdo#111827]) +2 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-apl2/igt@[email protected]
* igt@kms_color_chamelium@pipe-c-ctm-negative:
- shard-skl: NOTRUN -> [SKIP][36] ([fdo#109271] / [fdo#111827]) +5 similar issues
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl1/igt@[email protected]
* igt@kms_cursor_crc@pipe-b-cursor-32x32-onscreen:
- shard-skl: NOTRUN -> [SKIP][37] ([fdo#109271]) +64 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl2/igt@[email protected]
* igt@kms_cursor_crc@pipe-d-cursor-128x128-onscreen:
- shard-apl: NOTRUN -> [SKIP][38] ([fdo#109271]) +55 similar issues
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-apl8/igt@[email protected]
* igt@kms_cursor_crc@pipe-d-cursor-32x32-rapid-movement:
- shard-iclb: NOTRUN -> [SKIP][39] ([fdo#109278]) +3 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb8/igt@[email protected]
* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
- shard-skl: [PASS][40] -> [FAIL][41] ([i915#2346] / [i915#533])
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-skl7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl4/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
* igt@kms_cursor_legacy@flip-vs-cursor-varying-size:
- shard-skl: [PASS][42] -> [FAIL][43] ([i915#2346])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-skl3/igt@[email protected]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl2/igt@[email protected]
* igt@kms_cursor_legacy@pipe-d-single-bo:
- shard-skl: NOTRUN -> [SKIP][44] ([fdo#109271] / [i915#533])
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl1/igt@[email protected]
* igt@kms_flip@2x-plain-flip-fb-recreate:
- shard-iclb: NOTRUN -> [SKIP][45] ([fdo#109274])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb8/igt@[email protected]
* igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile-downscaling:
- shard-iclb: [PASS][46] -> [SKIP][47] ([i915#3701])
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-iclb5/igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile-downscaling.html
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb2/igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile-downscaling.html
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-mmap-gtt:
- shard-iclb: NOTRUN -> [SKIP][48] ([fdo#109280]) +3 similar issues
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-mmap-gtt.html
* igt@kms_hdr@bpc-switch-suspend:
- shard-kbl: [PASS][49] -> [DMESG-WARN][50] ([i915#180])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-kbl3/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl4/igt@[email protected]
- shard-skl: NOTRUN -> [FAIL][51] ([i915#1188])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl1/igt@[email protected]
* igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d:
- shard-apl: NOTRUN -> [SKIP][52] ([fdo#109271] / [i915#533])
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-apl8/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb:
- shard-skl: NOTRUN -> [FAIL][53] ([i915#265])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl7/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-alpha-7efc:
- shard-apl: NOTRUN -> [FAIL][54] ([fdo#108145] / [i915#265])
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-apl2/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
- shard-kbl: NOTRUN -> [FAIL][55] ([fdo#108145] / [i915#265])
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl4/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [PASS][56] -> [FAIL][57] ([fdo#108145] / [i915#265]) +1 similar issue
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-skl1/igt@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl10/igt@[email protected]
* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: NOTRUN -> [SKIP][58] ([i915#3536]) +1 similar issue
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb3/igt@[email protected]
* igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping:
- shard-skl: NOTRUN -> [SKIP][59] ([fdo#109271] / [i915#2733])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl1/igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping.html
* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area:
- shard-iclb: NOTRUN -> [SKIP][60] ([fdo#111068] / [i915#658])
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb8/igt@[email protected]
* igt@kms_psr2_su@page_flip-nv12:
- shard-skl: NOTRUN -> [SKIP][61] ([fdo#109271] / [i915#658])
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl1/igt@kms_psr2_su@page_flip-nv12.html
* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [PASS][62] -> [SKIP][63] ([fdo#109441]) +1 similar issue
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb7/igt@kms_psr@psr2_sprite_plane_move.html
* igt@kms_vblank@pipe-b-ts-continuation-suspend:
- shard-apl: NOTRUN -> [DMESG-WARN][64] ([i915#180])
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-apl1/igt@[email protected]
* igt@kms_vblank@pipe-d-wait-idle:
- shard-kbl: NOTRUN -> [SKIP][65] ([fdo#109271] / [i915#533]) +1 similar issue
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl3/igt@[email protected]
* igt@kms_writeback@writeback-pixel-formats:
- shard-skl: NOTRUN -> [SKIP][66] ([fdo#109271] / [i915#2437])
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl1/igt@[email protected]
* igt@nouveau_crc@pipe-c-source-outp-complete:
- shard-iclb: NOTRUN -> [SKIP][67] ([i915#2530])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb8/igt@[email protected]
* igt@perf_pmu@module-unload:
- shard-iclb: NOTRUN -> [FAIL][68] ([i915#5136])
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb8/igt@[email protected]
* igt@prime_nv_pcopy@test1_macro:
- shard-tglb: NOTRUN -> [SKIP][69] ([fdo#109291])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-tglb6/igt@prime_nv_pcopy@test1_macro.html
- shard-iclb: NOTRUN -> [SKIP][70] ([fdo#109291])
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-iclb3/igt@prime_nv_pcopy@test1_macro.html
* igt@syncobj_timeline@invalid-transfer-non-existent-point:
- shard-apl: NOTRUN -> [DMESG-WARN][71] ([i915#5098])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-apl8/igt@[email protected]
* igt@sysfs_clients@create:
- shard-apl: NOTRUN -> [SKIP][72] ([fdo#109271] / [i915#2994])
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-apl8/igt@[email protected]
* igt@sysfs_clients@sema-50:
- shard-kbl: NOTRUN -> [SKIP][73] ([fdo#109271] / [i915#2994])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl3/igt@[email protected]
#### Possible fixes ####
* igt@feature_discovery@psr1:
- {shard-rkl}: [SKIP][74] ([i915#658]) -> [PASS][75]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@[email protected]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@gem_exec_capture@pi@vcs0:
- {shard-tglu}: [INCOMPLETE][76] ([i915#3371]) -> [PASS][77]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-tglu-3/igt@gem_exec_capture@[email protected]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-tglu-2/igt@gem_exec_capture@[email protected]
* igt@gem_exec_fair@basic-none@vcs1:
- shard-kbl: [FAIL][78] ([i915#2842]) -> [PASS][79]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-kbl4/igt@gem_exec_fair@[email protected]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl7/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [FAIL][80] ([i915#2842]) -> [PASS][81]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-glk4/igt@gem_exec_fair@[email protected]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-glk7/igt@gem_exec_fair@[email protected]
- {shard-rkl}: [FAIL][82] ([i915#2842]) -> [PASS][83]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-4/igt@gem_exec_fair@[email protected]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-4/igt@gem_exec_fair@[email protected]
* igt@i915_pm_rpm@basic-pci-d3-state:
- {shard-rkl}: [SKIP][84] ([fdo#109308]) -> [PASS][85]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@[email protected]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@i915_pm_rpm@modeset-lpsp:
- {shard-rkl}: ([PASS][86], [SKIP][87]) ([i915#1397]) -> [PASS][88]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-6/igt@[email protected]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-4/igt@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@i915_pm_rpm@modeset-non-lpsp:
- {shard-dg1}: [SKIP][89] ([i915#1397]) -> [PASS][90]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-dg1-12/igt@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-dg1-18/igt@[email protected]
* igt@kms_atomic@atomic-invalid-params:
- {shard-rkl}: ([SKIP][91], [SKIP][92]) ([i915#1845]) -> [PASS][93] +1 similar issue
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@[email protected]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-4/igt@[email protected]
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@kms_big_fb@linear-16bpp-rotate-180:
- {shard-rkl}: ([SKIP][94], [PASS][95]) ([i915#1845]) -> [PASS][96]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-4/igt@[email protected]
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-6/igt@[email protected]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip:
- {shard-rkl}: [SKIP][97] ([i915#1845]) -> [PASS][98] +10 similar issues
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html
* igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_rc_ccs:
- {shard-rkl}: [SKIP][99] ([i915#1845] / [i915#4098]) -> [PASS][100]
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_rc_ccs.html
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_rc_ccs.html
* igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_gen12_rc_ccs:
- {shard-rkl}: ([SKIP][101], [SKIP][102]) ([i915#1845] / [i915#4098]) -> [PASS][103]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_gen12_rc_ccs.html
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-4/igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_gen12_rc_ccs.html
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_gen12_rc_ccs.html
* igt@kms_color@pipe-a-ctm-negative:
- {shard-rkl}: [SKIP][104] ([i915#1149] / [i915#1849] / [i915#4070]) -> [PASS][105]
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@[email protected]
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@kms_concurrent@pipe-a:
- {shard-rkl}: [SKIP][106] ([i915#1845] / [i915#4070]) -> [PASS][107] +1 similar issue
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@[email protected]
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@kms_cursor_crc@pipe-a-cursor-256x256-rapid-movement:
- {shard-rkl}: [SKIP][108] ([fdo#112022] / [i915#4070]) -> [PASS][109] +5 similar issues
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@[email protected]
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-skl: [INCOMPLETE][110] ([i915#300]) -> [PASS][111]
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-skl1/igt@[email protected]
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl3/igt@[email protected]
* igt@kms_cursor_edge_walk@pipe-a-256x256-top-edge:
- {shard-rkl}: [SKIP][112] ([i915#1849] / [i915#4070]) -> [PASS][113] +2 similar issues
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@[email protected]
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size:
- {shard-rkl}: ([SKIP][114], [SKIP][115]) ([fdo#111825] / [i915#4070]) -> [PASS][116]
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@[email protected]
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-4/igt@[email protected]
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@kms_cursor_legacy@flip-vs-cursor-crc-atomic:
- {shard-rkl}: [SKIP][117] ([fdo#111825] / [i915#4070]) -> [PASS][118] +5 similar issues
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@[email protected]
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@kms_draw_crc@draw-method-rgb565-blt-xtiled:
- {shard-rkl}: [SKIP][119] ([fdo#111314]) -> [PASS][120] +2 similar issues
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@[email protected]
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank@c-edp1:
- shard-skl: [FAIL][121] ([i915#79]) -> [PASS][122]
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-skl10/igt@kms_flip@[email protected]
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-skl8/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
- shard-kbl: [DMESG-WARN][123] ([i915#180]) -> [PASS][124] +6 similar issues
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-kbl6/igt@kms_flip@[email protected]
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-kbl6/igt@kms_flip@[email protected]
* igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile-upscaling:
- shard-glk: [FAIL][125] ([i915#4911]) -> [PASS][126]
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-glk8/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile-upscaling.html
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-glk5/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile-upscaling.html
* igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytile-upscaling:
- {shard-rkl}: [INCOMPLETE][127] ([i915#3701]) -> [PASS][128]
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytile-upscaling.html
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytile-upscaling.html
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-blt:
- {shard-rkl}: ([SKIP][129], [SKIP][130]) ([i915#1849] / [i915#4098]) -> [PASS][131]
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-4/igt@[email protected]
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@[email protected]
[131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-cpu:
- {shard-rkl}: ([SKIP][132], [PASS][133]) ([i915#4098]) -> [PASS][134]
[132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-cpu.html
[133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-cpu.html
[134]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-cpu.html
* igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-mmap-cpu:
- {shard-rkl}: [SKIP][135] ([i915#1849]) -> [PASS][136] +16 similar issues
[135]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@[email protected]
[136]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@kms_invalid_mode@bad-vsync-start:
- {shard-rkl}: [SKIP][137] ([i915#4278]) -> [PASS][138]
[137]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@[email protected]
[138]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-rkl-6/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend@pipe-a-planes:
- shard-apl: [DMESG-WARN][139] ([i915#180]) -> [PASS][140] +2 similar issues
[139]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-apl6/igt@kms_plane@[email protected]
[140]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/shard-apl8/igt@kms_plane@[email protected]
* igt@kms_plane@plane-position-hole-dpms@pipe-b-planes:
- {shard-rkl}: [SKIP][141] ([i915#1849] / [i915#3558]) -> [PASS][142] +1 similar issue
[141]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11264/shard-rkl-2/igt@kms_plane@[email protected]
[142]: https://intel-
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22344/index.html