fix hunk failure and resolve compilation issue against supported osv's - #554
Open
akanksh5-intc wants to merge 3 commits into
Open
akanksh5-intc wants to merge 3 commits into
akanksh5-intc wants to merge 3 commits into
Conversation
| vres->flags |= GPU_BUDDY_RANGE_ALLOCATION; | ||
| @@ -164,28 +163,12 @@ static int xe_ttm_vram_mgr_new(struct ttm_resource_manager *man, | ||
| goto error_unlock; | ||
| } |
There was a problem hiding this comment.
Since trimming is happening after "xe_ttm_vram_buddy_alloc" due to this older approach is treating as rounded memory, then trimming is happening.
In latest post trimming guc initialization is happening.
Contributor
Author
There was a problem hiding this comment.
Yes, as you correctly mentioned earlier first vram size is rounded up two and then trimming was happening. But in current approach the requested vram block is trimmed prior returning to xe_ttm_vram_buddy_alloc()
| --- a/src/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | ||
| +++ b/src/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | ||
| @@ -130,10 +130,9 @@ static int xe_ttm_vram_mgr_new(struct ttm_resource_manager *man, | ||
|
|
There was a problem hiding this comment.
Instead of adding new please remove the existing
patches/0001-drm-xe-firmware-signature-failure-plus-vram-mgr-follow-up.patch
and FYI this patch doesnt apply directly since src is there in path
Patches update for rebase Reviewed-by: Kanaka Raju Nayana <kanaka.raju.nayana@intel.com> Signed-off-by: Akanksha Hotta <akanksha.hotta@intel.com>
…ck fallback gpu_buddy_allocated_addr_to_block() was introduced as a helper for GPU buddy manager. So the kernels using the older interface for drm_buddy will lack with this helper, causing the compilation error. error: ------------------------------------------------------------------------------- error: implicit declaration of function gpu_buddy_allocated_addr_to_block ------------------------------------------------------------------------------- Therefore, added no-ops with drm_buddy mappings which will maintain the backport compatability against the older kernels. Reviewed-by: Kanaka Raju Nayana <kanaka.raju.nayana@intel.com> Signed-off-by: Akanksha Hotta <akanksha.hotta@intel.com>
…uddy compat layer Older kernel versions lack native contiguous allocation support in drm_buddy (DRM_BUDDY_CONTIGUOUS_ALLOCATION), which supports power-of-two block sizes. Consequently, when kernel requests for an arbitrary memory-size which is non-power-of-two buffer size, it will fail and return fragmented blocks, preventing firmware initialization with -EINVAL. error: ------------------------------------------------------------------------------- xe: [drm] *ERROR* Tile0: GT0: GuC init failed with -EINVAL xe: [drm] *ERROR* Tile0: GT0: Failed to initialize uC (-EINVAL) ------------------------------------------------------------------------------- But, now when we use xe_ttm_vram_buddy_alloc() helper, if we probe the rounding sizes upto powers of two and trimming after the function call, this will break vram_allocation path. So to resolve this, implemented backport_gpu_buddy_alloc_blocks() in the compat layer under BPM_DRM_BUDDY_CONTIGUOUS_ALLOCATION_NOT_PRESENT, which will allocate contiguous memory of power-of-two block size by using the underlying drm_buddy_alloc_blocks() and trim excess memory using gpu_buddy_block_trim() back to the requested size. Signed-off-by: Akanksha Hotta <akanksha.hotta@intel.com>
akanksh5-intc
force-pushed
the
oot-backport/main
branch
from
September 11, 2026 07:40
6931dcd to
9e2daf0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.