On Tue, Oct 27, 2026 at 04:04:48PM -0700, Rob Clark wrote:
> Now that we have everything unified in one path, switch over to using
> dma addresses for setting up the mapping.  This avoids issues with
> CONFIG_DMABUF_DEBUG stripping the pages from the sgt.
> 
> Tested-by: Jianfeng Liu <[email protected]> # x1e78100 (Acer 
> SFA14-11), v7.3-rc5 + this series, CONFIG_DMABUF_DEBUG=y
> Signed-off-by: Rob Clark <[email protected]>
> ---
>  drivers/gpu/drm/msm/msm_iommu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

This commit seems to break GPU on db410c (which uses qcom_iommu).

[  104.954564] [drm:a3xx_idle] *ERROR* 03000600: timeout waiting for GPU
to idle!
[  104.954932] msm_mdp 1a01000.display-controller: [drm:adreno_load_gpu]
*ERROR* gpu hw init failed: -22
[  105.958559] [drm:a3xx_idle] *ERROR* 03000600: timeout waiting for GPU
to idle!
[  109.082571] [drm:a3xx_idle] *ERROR* 03000600: timeout waiting for GPU
to idle!
[  109.082670] msm_mdp 1a01000.display-controller: [drm:adreno_load_gpu]
*ERROR* gpu hw init failed: -22
[  110.086572] [drm:a3xx_idle] *ERROR* 03000600: timeout waiting for GPU
to idle!
[  111.098576] [drm:a3xx_idle] *ERROR* 03000600: timeout waiting for GPU
to idle!
[  111.098674] msm_mdp 1a01000.display-controller: [drm:adreno_load_gpu]
*ERROR* gpu hw init failed: -22
c[  112.102576] [drm:a3xx_idle] *ERROR* 03000600: timeout waiting for
GPU to idle!
> 
> diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c
> index 479e5450a4dc..c2950d32c507 100644
> --- a/drivers/gpu/drm/msm/msm_iommu.c
> +++ b/drivers/gpu/drm/msm/msm_iommu.c
> @@ -153,9 +153,9 @@ __do_map(unsigned long pgsize_bitmap, u64 iova, struct 
> sg_table *sgt, size_t off
>       u64 addr = iova;
>       unsigned int i;
>  
> -     for_each_sgtable_sg (sgt, sg, i) {
> -             size_t size = sg->length;
> -             phys_addr_t phys = sg_phys(sg);
> +     for_each_sgtable_dma_sg (sgt, sg, i) {
> +             size_t size = sg_dma_len(sg);
> +             phys_addr_t phys = sg_dma_address(sg);
>  
>               if (!len)
>                       break;
> -- 
> 2.56.0
> 

-- 
With best wishes
Dmitry

Reply via email to