You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
drm/panfrost: Check for error num after setting mask
[ Upstream commit44ab30b056] 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:f3ba91228e("drm/panfrost: Add initial panfrost driver") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> [Steve: fix Fixes: line] Reviewed-by: Steven Price <steven.price@arm.com> Signed-off-by: Steven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220106030326.2620942-1-jiasheng@iscas.ac.cn Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5d1114ede5
commit
4a9c268a40
@@ -359,8 +359,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");
|
||||
|
||||
Reference in New Issue
Block a user