[1/2] drm/msm: Fix address space size after refactor.
diff mbox series

Message ID 20200617205310.2183722-1-eric@anholt.net
State New
Headers show
Series
  • [1/2] drm/msm: Fix address space size after refactor.
Related show

Commit Message

Eric Anholt June 17, 2020, 8:53 p.m. UTC
Previously the address space went from 16M to ~0u, but with the
refactor one of the 'f's was dropped, limiting us to 256MB.
Additionally, the new interface takes a start and size, not start and
end, so we can't just copy and paste.

Fixes regressions in dEQP-VK.memory.allocation.random.*

Fixes: ccac7ce373c1 ("drm/msm: Refactor address space initialization")
Signed-off-by: Eric Anholt <eric@anholt.net>
---
 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rob Clark June 18, 2020, 2:39 a.m. UTC | #1
On Wed, Jun 17, 2020 at 1:53 PM Eric Anholt <eric@anholt.net> wrote:
>
> Previously the address space went from 16M to ~0u, but with the
> refactor one of the 'f's was dropped, limiting us to 256MB.
> Additionally, the new interface takes a start and size, not start and
> end, so we can't just copy and paste.
>
> Fixes regressions in dEQP-VK.memory.allocation.random.*
>
> Fixes: ccac7ce373c1 ("drm/msm: Refactor address space initialization")
> Signed-off-by: Eric Anholt <eric@anholt.net>


rebased on https://patchwork.freedesktop.org/series/78281/ (which
fixed half of the problem) and pushed this and 2/2 to msm-next so it
should show up in linux-next shortly..

planning to wait a short time more to see if we find any other issues
and then send a -fixes PR

BR,
-R


> ---
>  drivers/gpu/drm/msm/adreno/adreno_gpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> index 89673c7ed473..5db06b590943 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> @@ -194,7 +194,7 @@ adreno_iommu_create_address_space(struct msm_gpu *gpu,
>         struct msm_gem_address_space *aspace;
>
>         aspace = msm_gem_address_space_create(mmu, "gpu", SZ_16M,
> -               0xfffffff);
> +               0xffffffff - SZ_16M);
>
>         if (IS_ERR(aspace) && !IS_ERR(mmu))
>                 mmu->funcs->destroy(mmu);
> --
> 2.26.2
>
Jordan Crouse June 22, 2020, 4:25 p.m. UTC | #2
On Wed, Jun 17, 2020 at 07:39:08PM -0700, Rob Clark wrote:
> On Wed, Jun 17, 2020 at 1:53 PM Eric Anholt <eric@anholt.net> wrote:
> >
> > Previously the address space went from 16M to ~0u, but with the
> > refactor one of the 'f's was dropped, limiting us to 256MB.
> > Additionally, the new interface takes a start and size, not start and
> > end, so we can't just copy and paste.
> >
> > Fixes regressions in dEQP-VK.memory.allocation.random.*
> >
> > Fixes: ccac7ce373c1 ("drm/msm: Refactor address space initialization")
> > Signed-off-by: Eric Anholt <eric@anholt.net>
> 
> 
> rebased on https://patchwork.freedesktop.org/series/78281/ (which
> fixed half of the problem) and pushed this and 2/2 to msm-next so it
> should show up in linux-next shortly..
> 
> planning to wait a short time more to see if we find any other issues
> and then send a -fixes PR

I'll fix up the rest of the flubbed addresses sizes.

Jordan

> BR,
> -R
> 
> 
> > ---
> >  drivers/gpu/drm/msm/adreno/adreno_gpu.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> > index 89673c7ed473..5db06b590943 100644
> > --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> > +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> > @@ -194,7 +194,7 @@ adreno_iommu_create_address_space(struct msm_gpu *gpu,
> >         struct msm_gem_address_space *aspace;
> >
> >         aspace = msm_gem_address_space_create(mmu, "gpu", SZ_16M,
> > -               0xfffffff);
> > +               0xffffffff - SZ_16M);
> >
> >         if (IS_ERR(aspace) && !IS_ERR(mmu))
> >                 mmu->funcs->destroy(mmu);
> > --
> > 2.26.2
> >

Patch
diff mbox series

diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index 89673c7ed473..5db06b590943 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -194,7 +194,7 @@  adreno_iommu_create_address_space(struct msm_gpu *gpu,
 	struct msm_gem_address_space *aspace;
 
 	aspace = msm_gem_address_space_create(mmu, "gpu", SZ_16M,
-		0xfffffff);
+		0xffffffff - SZ_16M);
 
 	if (IS_ERR(aspace) && !IS_ERR(mmu))
 		mmu->funcs->destroy(mmu);