Re: [PATCH v6 4/5] drm/msm: Refactor address space initialization
From: Eric Anholt
Date: Wed Jun 17 2020 - 16:16:21 EST
On Thu, Apr 9, 2020 at 4:34 PM Jordan Crouse <jcrouse@xxxxxxxxxxxxxx> wrote:
>
> Refactor how address space initialization works. Instead of having the
> address space function create the MMU object (and thus require separate but
> equal functions for gpummu and iommu) use a single function and pass the
> MMU struct in. Make the generic code cleaner by using target specific
> functions to create the address space so a2xx can do its own thing in its
> own space. For all the other targets use a generic helper to initialize
> IOMMU but leave the door open for newer targets to use customization
> if they need it.
I'm seeing regressions in dEQP-VK.memory.allocation.random.* on cheza
after this commit. The symptom is that large allocations fail with
-ENOSPC from MSM_GEM_INFO(IOVA).
Possibly relevant change from having stuffed some debug info in:
before:
[ 3.791436] [drm:msm_gem_address_space_create] *ERROR* msmgem
address space create: 0x1000000 + 0xfeffffff
[ 3.801672] platform 506a000.gmu: Adding to iommu group 6
[ 3.807359] [drm:msm_gem_address_space_create] *ERROR* msmgem
address space create: 0x0 + 0x7fffffff
[ 3.817140] msm ae00000.mdss: bound 5000000.gpu (ops a3xx_ops)
[ 3.823212] msm_dpu ae01000.mdp: [drm:msm_ioremap] *ERROR* failed
to get memory resource: vbif_nrt
[ 3.832429] msm_dpu ae01000.mdp: [drm:msm_ioremap] *ERROR* failed
to get memory resource: regdma
[ 3.841478] [drm:dpu_kms_hw_init:878] dpu hardware revision:0x40000000
[ 3.848193] [drm:msm_gem_address_space_create] *ERROR* msmgem
address space create: 0x1000 + 0xffffefff
after:
[ 3.798707] [drm:msm_gem_address_space_create] *ERROR* msmgem
address space create: 0x1000000 + 0xfffffff
[ 3.808731] platform 506a000.gmu: Adding to iommu group 6
[ 3.814440] [drm:msm_gem_address_space_create] *ERROR* msmgem
address space create: 0x0 + 0x7fffffff
[ 3.820494] hub 2-1:1.0: USB hub found
[ 3.824108] msm ae00000.mdss: bound 5000000.gpu (ops a3xx_ops)
[ 3.828554] hub 2-1:1.0: 4 ports detected
[ 3.833756] msm_dpu ae01000.mdp: [drm:msm_ioremap] *ERROR* failed
to get memory resource: vbif_nrt
[ 3.847038] msm_dpu ae01000.mdp: [drm:msm_ioremap] *ERROR* failed
to get memory resource: regdma
[ 3.856095] [drm:dpu_kms_hw_init:878] dpu hardware revision:0x40000000
[ 3.862840] [drm:msm_gem_address_space_create] *ERROR* msmgem
address space create: 0x1000 + 0xfffffff
256MB for GMU address space?