Patch "drm/panfrost: Check for error num after setting mask" has been added to the 5.17-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/panfrost: Check for error num after setting mask

to the 5.17-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-panfrost-check-for-error-num-after-setting-mask.patch
and it can be found in the queue-5.17 subdirectory.

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



commit 3f12acecd0257591f08fcdfe5a5bb92edf755548
Author: Jiasheng Jiang <jiasheng@xxxxxxxxxxx>
Date:   Thu Jan 6 11:03:26 2022 +0800

    drm/panfrost: Check for error num after setting mask
    
    [ Upstream commit 44ab30b056149bd59dd7989a593dd25ead6007fd ]
    
    Because of the possible failure of the dma_supported(), the
    dma_set_mask_and_coherent() may return error num.
    Therefore, it should be better to check it and return the error if
    fails.
    
    Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
    Signed-off-by: Jiasheng Jiang <jiasheng@xxxxxxxxxxx>
    [Steve: fix Fixes: line]
    Reviewed-by: Steven Price <steven.price@xxxxxxx>
    Signed-off-by: Steven Price <steven.price@xxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220106030326.2620942-1-jiasheng@xxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c
index bbe628b306ee..f8355de6e335 100644
--- a/drivers/gpu/drm/panfrost/panfrost_gpu.c
+++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c
@@ -360,8 +360,11 @@ int panfrost_gpu_init(struct panfrost_device *pfdev)
 
 	panfrost_gpu_init_features(pfdev);
 
-	dma_set_mask_and_coherent(pfdev->dev,
+	err = dma_set_mask_and_coherent(pfdev->dev,
 		DMA_BIT_MASK(FIELD_GET(0xff00, pfdev->features.mmu_features)));
+	if (err)
+		return err;
+
 	dma_set_max_seg_size(pfdev->dev, UINT_MAX);
 
 	irq = platform_get_irq_byname(to_platform_device(pfdev->dev), "gpu");



[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