-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rockchip64-6.14: Set dma mask to 64 bit (#7924)
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
patch/kernel/archive/rockchip64-6.14/general-drm-rockchip-Set-dma-mask-to-64-bit.patch
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: SuperKali <[email protected]> | ||
Date: Fri, 7 Mar 2025 15:06:42 +0000 | ||
Subject: drm/rockchip: Set dma mask to 64 bit | ||
|
||
The vop mmu support translate physical address upper 4 GB to iova | ||
below 4 GB. So set dma mask to 64 bit to indicate we support address | ||
> 4GB. | ||
|
||
This can avoid warnging message like this on some boards with DDR | ||
> 4 GB: | ||
|
||
rockchip-drm display-subsystem: swiotlb buffer is full (sz: 266240 bytes), total 32768 (slots), used 130 (slots) | ||
rockchip-drm display-subsystem: swiotlb buffer is full (sz: 266240 bytes), total 32768 (slots), used 0 (slots) | ||
rockchip-drm display-subsystem: swiotlb buffer is full (sz: 266240 bytes), total 32768 (slots), used 130 (slots) | ||
rockchip-drm display-subsystem: swiotlb buffer is full (sz: 266240 bytes), total 32768 (slots), used 130 (slots) | ||
rockchip-drm display-subsystem: swiotlb buffer is full (sz: 266240 bytes), total 32768 (slots), used 0 (slots) | ||
--- | ||
drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 4 +++- | ||
1 file changed, 3 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c | ||
index 111111111111..222222222222 100644 | ||
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c | ||
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c | ||
@@ -472,7 +472,9 @@ static int rockchip_drm_platform_probe(struct platform_device *pdev) | ||
return ret; | ||
} | ||
|
||
- return 0; | ||
+ ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64)); | ||
+ | ||
+ return ret; | ||
} | ||
|
||
static void rockchip_drm_platform_remove(struct platform_device *pdev) | ||
-- | ||
Armbian | ||
|