[PATCH 03/18] drm/etnaviv: only check if the cmdbuf is inside the linear window on MMUv1

2016-08-22 Thread Lucas Stach
Am Montag, den 22.08.2016, 12:22 +0100 schrieb Russell King - ARM Linux:
> On Mon, Aug 22, 2016 at 01:00:57PM +0200, Lucas Stach wrote:
> > There is no linear window on MMUv2 and the FE can access the full 4GB
> > address space either directly (as long as the MMU isn't configured) or
> > through the MMU, once it is up.
> > 
> > Signed-off-by: Lucas Stach 
> > ---
> >  drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c 
> > b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> > index 433d2df0907b..2306962330a0 100644
> > --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> > +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> > @@ -678,7 +678,9 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
> > dev_err(gpu->dev, "could not create command buffer\n");
> > goto destroy_iommu;
> > }
> > -   if (gpu->buffer->paddr - gpu->memory_base > 0x8000) {
> > +
> > +   if (!(gpu->identity.minor_features1 & chipMinorFeatures1_MMU_VERSION) &&
> 
> Why are you using a different test to the one in patch 2?  By this
> time, we've already setup the MMU, so the test can be the same.
> 
That's right. I'll change this to be consistent.



[PATCH 03/18] drm/etnaviv: only check if the cmdbuf is inside the linear window on MMUv1

2016-08-22 Thread Lucas Stach
There is no linear window on MMUv2 and the FE can access the full 4GB
address space either directly (as long as the MMU isn't configured) or
through the MMU, once it is up.

Signed-off-by: Lucas Stach 
---
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c 
b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 433d2df0907b..2306962330a0 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -678,7 +678,9 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
dev_err(gpu->dev, "could not create command buffer\n");
goto destroy_iommu;
}
-   if (gpu->buffer->paddr - gpu->memory_base > 0x8000) {
+
+   if (!(gpu->identity.minor_features1 & chipMinorFeatures1_MMU_VERSION) &&
+   gpu->buffer->paddr - gpu->memory_base > 0x8000) {
ret = -EINVAL;
dev_err(gpu->dev,
"command buffer outside valid memory window\n");
-- 
2.8.1



[PATCH 03/18] drm/etnaviv: only check if the cmdbuf is inside the linear window on MMUv1

2016-08-22 Thread Russell King - ARM Linux
On Mon, Aug 22, 2016 at 01:00:57PM +0200, Lucas Stach wrote:
> There is no linear window on MMUv2 and the FE can access the full 4GB
> address space either directly (as long as the MMU isn't configured) or
> through the MMU, once it is up.
> 
> Signed-off-by: Lucas Stach 
> ---
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c 
> b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> index 433d2df0907b..2306962330a0 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> @@ -678,7 +678,9 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
>   dev_err(gpu->dev, "could not create command buffer\n");
>   goto destroy_iommu;
>   }
> - if (gpu->buffer->paddr - gpu->memory_base > 0x8000) {
> +
> + if (!(gpu->identity.minor_features1 & chipMinorFeatures1_MMU_VERSION) &&

Why are you using a different test to the one in patch 2?  By this
time, we've already setup the MMU, so the test can be the same.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.