Patch "drm/xe/guc: Check error code when initializing the CT mutex" has been added to the 6.8-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/guc: Check error code when initializing the CT mutex

to the 6.8-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-guc-check-error-code-when-initializing-the-ct.patch
and it can be found in the queue-6.8 subdirectory.

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



commit e0b87046f752f632ec5d632be53fc87d4d7fb038
Author: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
Date:   Thu Mar 21 12:55:12 2024 -0700

    drm/xe/guc: Check error code when initializing the CT mutex
    
    [ Upstream commit b4abeb5545bb3ddcdda3c19067680ad0b2259be4 ]
    
    The initialization via drmm_mutex_init can fail, so we need to check the
    return code and escalate the failure.
    
    The mutex initialization has been moved after all the other init steps
    that can't fail, so we're always guaranteed to have those done and don't
    have to check in the cleanup code.
    
    Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
    Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@xxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240321195512.274210-1-daniele.ceraolospurio@xxxxxxxxx
    Stable-dep-of: c002bfe644a2 ("drm/xe: Use ordered WQ for G2H handler")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index 24a33fa36496a..006c6830b55a7 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -138,13 +138,16 @@ int xe_guc_ct_init(struct xe_guc_ct *ct)
 
 	xe_assert(xe, !(guc_ct_size() % PAGE_SIZE));
 
-	drmm_mutex_init(&xe->drm, &ct->lock);
 	spin_lock_init(&ct->fast_lock);
 	xa_init(&ct->fence_lookup);
 	INIT_WORK(&ct->g2h_worker, g2h_worker_func);
 	init_waitqueue_head(&ct->wq);
 	init_waitqueue_head(&ct->g2h_fence_wq);
 
+	err = drmm_mutex_init(&xe->drm, &ct->lock);
+	if (err)
+		return err;
+
 	primelockdep(ct);
 
 	bo = xe_managed_bo_create_pin_map(xe, tile, guc_ct_size(),




[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