Patch "drm/xe/pf: Limit fair VF LMEM provisioning" has been added to the 6.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/xe/pf: Limit fair VF LMEM provisioning

to the 6.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-xe-pf-limit-fair-vf-lmem-provisioning.patch
and it can be found in the queue-6.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3818c73cc2a52d592025b3d7c531cbc5f3d9e826
Author: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
Date:   Thu Jul 11 21:23:19 2024 +0200

    drm/xe/pf: Limit fair VF LMEM provisioning
    
    [ Upstream commit bf07ca963d4fd11c88a9d4b058f2bd62e8d46a98 ]
    
    Due to the current design of the BO and VRAM manager, any object
    with XE_BO_FLAG_PINNED flag, which the PF driver uses during VF
    LMEM provisionining, is created with the TTM_PL_FLAG_CONTIGUOUS
    flag, which may cause VRAM fragmentation that prevents subsequent
    allocations of larger objects, like fair VF LMEM provisioning.
    
    To avoid such failures, round down fair VF LMEM provisioning size
    to next power of two size, to compensate what xe_ttm_vram_mgr is
    doing to achieve contiguous allocations.
    
    Fixes: ac6598aed1b3 ("drm/xe/pf: Add support to configure SR-IOV VFs")
    Signed-off-by: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
    Reviewed-by: Piotr Piórkowski <piotr.piorkowski@xxxxxxxxx>
    Reviewed-by: Jonathan Cavitt <jonathan.cavitt@xxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240711192320.1198-2-michal.wajdeczko@xxxxxxxxx
    Signed-off-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
    (cherry picked from commit 4c3fe5eae46b92e2fd961b19f7779608352e5368)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
index 6c2cfc54442ce..4f40fe24c649c 100644
--- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
+++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
@@ -1527,6 +1527,7 @@ static u64 pf_estimate_fair_lmem(struct xe_gt *gt, unsigned int num_vfs)
 	u64 fair;
 
 	fair = div_u64(available, num_vfs);
+	fair = rounddown_pow_of_two(fair);	/* XXX: ttm_vram_mgr & drm_buddy limitation */
 	fair = ALIGN_DOWN(fair, alignment);
 #ifdef MAX_FAIR_LMEM
 	fair = min_t(u64, MAX_FAIR_LMEM, fair);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux