diff mbox

[RFC,005/111] staging: etnaviv: remove IOMMUv2 stubs

Message ID 1427988653-754-6-git-send-email-l.stach@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Stach April 2, 2015, 3:29 p.m. UTC
IOMMUv2 support isn't implemented yet, so don't pretend it is there.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/staging/etnaviv/etnaviv_gpu.c      | 10 ++++++----
 drivers/staging/etnaviv/etnaviv_iommu_v2.c | 32 ------------------------------
 drivers/staging/etnaviv/etnaviv_iommu_v2.h | 25 -----------------------
 3 files changed, 6 insertions(+), 61 deletions(-)
 delete mode 100644 drivers/staging/etnaviv/etnaviv_iommu_v2.c
 delete mode 100644 drivers/staging/etnaviv/etnaviv_iommu_v2.h

Comments

Robert Nelson April 2, 2015, 5:14 p.m. UTC | #1
On Thu, Apr 2, 2015 at 10:29 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> IOMMUv2 support isn't implemented yet, so don't pretend it is there.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  drivers/staging/etnaviv/etnaviv_gpu.c      | 10 ++++++----
>  drivers/staging/etnaviv/etnaviv_iommu_v2.c | 32 ------------------------------
>  drivers/staging/etnaviv/etnaviv_iommu_v2.h | 25 -----------------------
>  3 files changed, 6 insertions(+), 61 deletions(-)
>  delete mode 100644 drivers/staging/etnaviv/etnaviv_iommu_v2.c
>  delete mode 100644 drivers/staging/etnaviv/etnaviv_iommu_v2.h

etnaviv_iommu_v2 is still referenced in the Makefile:

etnaviv_iommu_v2.o \

make[3]: *** No rule to make target
'drivers/staging/etnaviv/etnaviv_iommu_v2.o', needed by
'drivers/staging/etnaviv/etnaviv.o'.  Stop.
make[3]: *** Waiting for unfinished jobs....

Regards,
Lucas Stach April 2, 2015, 5:41 p.m. UTC | #2
Am Donnerstag, den 02.04.2015, 12:14 -0500 schrieb Robert Nelson:
> On Thu, Apr 2, 2015 at 10:29 AM, Lucas Stach <l.stach@pengutronix.de> wrote:
> > IOMMUv2 support isn't implemented yet, so don't pretend it is there.
> >
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > ---
> >  drivers/staging/etnaviv/etnaviv_gpu.c      | 10 ++++++----
> >  drivers/staging/etnaviv/etnaviv_iommu_v2.c | 32 ------------------------------
> >  drivers/staging/etnaviv/etnaviv_iommu_v2.h | 25 -----------------------
> >  3 files changed, 6 insertions(+), 61 deletions(-)
> >  delete mode 100644 drivers/staging/etnaviv/etnaviv_iommu_v2.c
> >  delete mode 100644 drivers/staging/etnaviv/etnaviv_iommu_v2.h
> 
> etnaviv_iommu_v2 is still referenced in the Makefile:
> 
> etnaviv_iommu_v2.o \
> 
> make[3]: *** No rule to make target
> 'drivers/staging/etnaviv/etnaviv_iommu_v2.o', needed by
> 'drivers/staging/etnaviv/etnaviv.o'.  Stop.
> make[3]: *** Waiting for unfinished jobs....
> 
Doh! Should have done a build test with a clean tree before sending out.

Thanks for noticing,
Lucas
Christian Gmeiner April 5, 2015, 6:32 p.m. UTC | #3
2015-04-02 17:29 GMT+02:00 Lucas Stach <l.stach@pengutronix.de>:
> IOMMUv2 support isn't implemented yet, so don't pretend it is there.
>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  drivers/staging/etnaviv/etnaviv_gpu.c      | 10 ++++++----
>  drivers/staging/etnaviv/etnaviv_iommu_v2.c | 32 ------------------------------
>  drivers/staging/etnaviv/etnaviv_iommu_v2.h | 25 -----------------------
>  3 files changed, 6 insertions(+), 61 deletions(-)
>  delete mode 100644 drivers/staging/etnaviv/etnaviv_iommu_v2.c
>  delete mode 100644 drivers/staging/etnaviv/etnaviv_iommu_v2.h
>
> diff --git a/drivers/staging/etnaviv/etnaviv_gpu.c b/drivers/staging/etnaviv/etnaviv_gpu.c
> index d2d0556a9bad..e3b93c293dca 100644
> --- a/drivers/staging/etnaviv/etnaviv_gpu.c
> +++ b/drivers/staging/etnaviv/etnaviv_gpu.c
> @@ -21,7 +21,6 @@
>  #include "etnaviv_gem.h"
>  #include "etnaviv_mmu.h"
>  #include "etnaviv_iommu.h"
> -#include "etnaviv_iommu_v2.h"
>  #include "common.xml.h"
>  #include "state.xml.h"
>  #include "state_hi.xml.h"
> @@ -329,10 +328,13 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
>         mmuv2 = gpu->identity.minor_features1 & chipMinorFeatures1_MMU_VERSION;
>         dev_dbg(gpu->dev->dev, "mmuv2: %d\n", mmuv2);
>
> -       if (!mmuv2)
> +       if (!mmuv2) {
>                 iommu = etnaviv_iommu_domain_alloc(gpu);
> -       else
> -               iommu = etnaviv_iommu_v2_domain_alloc(gpu);
> +       } else {
> +               dev_err(gpu->dev, "IOMMUv2 support is not implemented yet!\n");
> +               ret = -ENODEV;
> +               goto fail;
> +       }
>
>         if (!iommu) {
>                 ret = -ENOMEM;
> diff --git a/drivers/staging/etnaviv/etnaviv_iommu_v2.c b/drivers/staging/etnaviv/etnaviv_iommu_v2.c
> deleted file mode 100644
> index 3039ee9cbc6d..000000000000
> --- a/drivers/staging/etnaviv/etnaviv_iommu_v2.c
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -/*
> - * Copyright (C) 2014 Christian Gmeiner <christian.gmeiner@gmail.com>
> -  *
> - * This program is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License version 2 as published by
> - * the Free Software Foundation.
> - *
> - * This program is distributed in the hope that it will be useful, but WITHOUT
> - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
> - * more details.
> - *
> - * You should have received a copy of the GNU General Public License along with
> - * this program.  If not, see <http://www.gnu.org/licenses/>.
> - */
> -
> -#include <linux/iommu.h>
> -#include <linux/platform_device.h>
> -#include <linux/sizes.h>
> -#include <linux/slab.h>
> -#include <linux/dma-mapping.h>
> -#include <linux/bitops.h>
> -
> -#include "etnaviv_gpu.h"
> -#include "state_hi.xml.h"
> -
> -
> -struct iommu_domain *etnaviv_iommu_v2_domain_alloc(struct etnaviv_gpu *gpu)
> -{
> -       /* TODO */
> -       return NULL;
> -}
> diff --git a/drivers/staging/etnaviv/etnaviv_iommu_v2.h b/drivers/staging/etnaviv/etnaviv_iommu_v2.h
> deleted file mode 100644
> index 603ea41c5389..000000000000
> --- a/drivers/staging/etnaviv/etnaviv_iommu_v2.h
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -/*
> - * Copyright (C) 2014 Christian Gmeiner <christian.gmeiner@gmail.com>
> -  *
> - * This program is free software; you can redistribute it and/or modify it
> - * under the terms of the GNU General Public License version 2 as published by
> - * the Free Software Foundation.
> - *
> - * This program is distributed in the hope that it will be useful, but WITHOUT
> - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
> - * more details.
> - *
> - * You should have received a copy of the GNU General Public License along with
> - * this program.  If not, see <http://www.gnu.org/licenses/>.
> - */
> -
> -#ifndef __ETNAVIV_IOMMU_V2_H__
> -#define __ETNAVIV_IOMMU_V2_H__
> -
> -#include <linux/iommu.h>
> -struct etnaviv_gpu;
> -
> -struct iommu_domain *etnaviv_iommu_v2_domain_alloc(struct etnaviv_gpu *gpu);
> -
> -#endif /* __ETNAVIV_IOMMU_V2_H__ */
> --
> 2.1.4
>

I am fine with this change. You may have seen that I have a code for
mmuv2 ready in my git tree. but at
the moment I have no device to test it. So I will bring back support later.

greets
--
Christian Gmeiner, MSc

https://soundcloud.com/christian-gmeiner
Lucas Stach April 7, 2015, 7:24 a.m. UTC | #4
Hi Christian,

Am Sonntag, den 05.04.2015, 20:32 +0200 schrieb Christian Gmeiner:
> 2015-04-02 17:29 GMT+02:00 Lucas Stach <l.stach@pengutronix.de>:
> > IOMMUv2 support isn't implemented yet, so don't pretend it is there.
> >
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > ---
> >  drivers/staging/etnaviv/etnaviv_gpu.c      | 10 ++++++----
> >  drivers/staging/etnaviv/etnaviv_iommu_v2.c | 32 ------------------------------
> >  drivers/staging/etnaviv/etnaviv_iommu_v2.h | 25 -----------------------
> >  3 files changed, 6 insertions(+), 61 deletions(-)
> >  delete mode 100644 drivers/staging/etnaviv/etnaviv_iommu_v2.c
> >  delete mode 100644 drivers/staging/etnaviv/etnaviv_iommu_v2.h
> >
> > diff --git a/drivers/staging/etnaviv/etnaviv_gpu.c b/drivers/staging/etnaviv/etnaviv_gpu.c
> > index d2d0556a9bad..e3b93c293dca 100644
> > --- a/drivers/staging/etnaviv/etnaviv_gpu.c
> > +++ b/drivers/staging/etnaviv/etnaviv_gpu.c
> > @@ -21,7 +21,6 @@
> >  #include "etnaviv_gem.h"
> >  #include "etnaviv_mmu.h"
> >  #include "etnaviv_iommu.h"
> > -#include "etnaviv_iommu_v2.h"
> >  #include "common.xml.h"
> >  #include "state.xml.h"
> >  #include "state_hi.xml.h"
> > @@ -329,10 +328,13 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
> >         mmuv2 = gpu->identity.minor_features1 & chipMinorFeatures1_MMU_VERSION;
> >         dev_dbg(gpu->dev->dev, "mmuv2: %d\n", mmuv2);
> >
> > -       if (!mmuv2)
> > +       if (!mmuv2) {
> >                 iommu = etnaviv_iommu_domain_alloc(gpu);
> > -       else
> > -               iommu = etnaviv_iommu_v2_domain_alloc(gpu);
> > +       } else {
> > +               dev_err(gpu->dev, "IOMMUv2 support is not implemented yet!\n");
> > +               ret = -ENODEV;
> > +               goto fail;
> > +       }
> >
> >         if (!iommu) {
> >                 ret = -ENOMEM;
> > diff --git a/drivers/staging/etnaviv/etnaviv_iommu_v2.c b/drivers/staging/etnaviv/etnaviv_iommu_v2.c
> > deleted file mode 100644
> > index 3039ee9cbc6d..000000000000
> > --- a/drivers/staging/etnaviv/etnaviv_iommu_v2.c
> > +++ /dev/null
> > @@ -1,32 +0,0 @@
> > -/*
> > - * Copyright (C) 2014 Christian Gmeiner <christian.gmeiner@gmail.com>
> > -  *
> > - * This program is free software; you can redistribute it and/or modify it
> > - * under the terms of the GNU General Public License version 2 as published by
> > - * the Free Software Foundation.
> > - *
> > - * This program is distributed in the hope that it will be useful, but WITHOUT
> > - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> > - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
> > - * more details.
> > - *
> > - * You should have received a copy of the GNU General Public License along with
> > - * this program.  If not, see <http://www.gnu.org/licenses/>.
> > - */
> > -
> > -#include <linux/iommu.h>
> > -#include <linux/platform_device.h>
> > -#include <linux/sizes.h>
> > -#include <linux/slab.h>
> > -#include <linux/dma-mapping.h>
> > -#include <linux/bitops.h>
> > -
> > -#include "etnaviv_gpu.h"
> > -#include "state_hi.xml.h"
> > -
> > -
> > -struct iommu_domain *etnaviv_iommu_v2_domain_alloc(struct etnaviv_gpu *gpu)
> > -{
> > -       /* TODO */
> > -       return NULL;
> > -}
> > diff --git a/drivers/staging/etnaviv/etnaviv_iommu_v2.h b/drivers/staging/etnaviv/etnaviv_iommu_v2.h
> > deleted file mode 100644
> > index 603ea41c5389..000000000000
> > --- a/drivers/staging/etnaviv/etnaviv_iommu_v2.h
> > +++ /dev/null
> > @@ -1,25 +0,0 @@
> > -/*
> > - * Copyright (C) 2014 Christian Gmeiner <christian.gmeiner@gmail.com>
> > -  *
> > - * This program is free software; you can redistribute it and/or modify it
> > - * under the terms of the GNU General Public License version 2 as published by
> > - * the Free Software Foundation.
> > - *
> > - * This program is distributed in the hope that it will be useful, but WITHOUT
> > - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> > - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
> > - * more details.
> > - *
> > - * You should have received a copy of the GNU General Public License along with
> > - * this program.  If not, see <http://www.gnu.org/licenses/>.
> > - */
> > -
> > -#ifndef __ETNAVIV_IOMMU_V2_H__
> > -#define __ETNAVIV_IOMMU_V2_H__
> > -
> > -#include <linux/iommu.h>
> > -struct etnaviv_gpu;
> > -
> > -struct iommu_domain *etnaviv_iommu_v2_domain_alloc(struct etnaviv_gpu *gpu);
> > -
> > -#endif /* __ETNAVIV_IOMMU_V2_H__ */
> > --
> > 2.1.4
> >
> 
> I am fine with this change. You may have seen that I have a code for
> mmuv2 ready in my git tree. but at
> the moment I have no device to test it. So I will bring back support later.
> 

Yes, I noticed that you had something implemented. But given that I
didn't see any hardware where one could test this I would rather leave
it out for now. I'm happy to pull this in once it has been tested on
real hardware.

Regards,
Lucas
Christian Gmeiner April 7, 2015, 8:13 a.m. UTC | #5
Hi Lucas

2015-04-07 9:24 GMT+02:00 Lucas Stach <l.stach@pengutronix.de>:
> Hi Christian,
>
> Am Sonntag, den 05.04.2015, 20:32 +0200 schrieb Christian Gmeiner:
>> 2015-04-02 17:29 GMT+02:00 Lucas Stach <l.stach@pengutronix.de>:
>> > IOMMUv2 support isn't implemented yet, so don't pretend it is there.
>> >
>> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>> > ---
>> >  drivers/staging/etnaviv/etnaviv_gpu.c      | 10 ++++++----
>> >  drivers/staging/etnaviv/etnaviv_iommu_v2.c | 32 ------------------------------
>> >  drivers/staging/etnaviv/etnaviv_iommu_v2.h | 25 -----------------------
>> >  3 files changed, 6 insertions(+), 61 deletions(-)
>> >  delete mode 100644 drivers/staging/etnaviv/etnaviv_iommu_v2.c
>> >  delete mode 100644 drivers/staging/etnaviv/etnaviv_iommu_v2.h
>> >
>> > diff --git a/drivers/staging/etnaviv/etnaviv_gpu.c b/drivers/staging/etnaviv/etnaviv_gpu.c
>> > index d2d0556a9bad..e3b93c293dca 100644
>> > --- a/drivers/staging/etnaviv/etnaviv_gpu.c
>> > +++ b/drivers/staging/etnaviv/etnaviv_gpu.c
>> > @@ -21,7 +21,6 @@
>> >  #include "etnaviv_gem.h"
>> >  #include "etnaviv_mmu.h"
>> >  #include "etnaviv_iommu.h"
>> > -#include "etnaviv_iommu_v2.h"
>> >  #include "common.xml.h"
>> >  #include "state.xml.h"
>> >  #include "state_hi.xml.h"
>> > @@ -329,10 +328,13 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
>> >         mmuv2 = gpu->identity.minor_features1 & chipMinorFeatures1_MMU_VERSION;
>> >         dev_dbg(gpu->dev->dev, "mmuv2: %d\n", mmuv2);
>> >
>> > -       if (!mmuv2)
>> > +       if (!mmuv2) {
>> >                 iommu = etnaviv_iommu_domain_alloc(gpu);
>> > -       else
>> > -               iommu = etnaviv_iommu_v2_domain_alloc(gpu);
>> > +       } else {
>> > +               dev_err(gpu->dev, "IOMMUv2 support is not implemented yet!\n");
>> > +               ret = -ENODEV;
>> > +               goto fail;
>> > +       }
>> >
>> >         if (!iommu) {
>> >                 ret = -ENOMEM;
>> > diff --git a/drivers/staging/etnaviv/etnaviv_iommu_v2.c b/drivers/staging/etnaviv/etnaviv_iommu_v2.c
>> > deleted file mode 100644
>> > index 3039ee9cbc6d..000000000000
>> > --- a/drivers/staging/etnaviv/etnaviv_iommu_v2.c
>> > +++ /dev/null
>> > @@ -1,32 +0,0 @@
>> > -/*
>> > - * Copyright (C) 2014 Christian Gmeiner <christian.gmeiner@gmail.com>
>> > -  *
>> > - * This program is free software; you can redistribute it and/or modify it
>> > - * under the terms of the GNU General Public License version 2 as published by
>> > - * the Free Software Foundation.
>> > - *
>> > - * This program is distributed in the hope that it will be useful, but WITHOUT
>> > - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
>> > - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
>> > - * more details.
>> > - *
>> > - * You should have received a copy of the GNU General Public License along with
>> > - * this program.  If not, see <http://www.gnu.org/licenses/>.
>> > - */
>> > -
>> > -#include <linux/iommu.h>
>> > -#include <linux/platform_device.h>
>> > -#include <linux/sizes.h>
>> > -#include <linux/slab.h>
>> > -#include <linux/dma-mapping.h>
>> > -#include <linux/bitops.h>
>> > -
>> > -#include "etnaviv_gpu.h"
>> > -#include "state_hi.xml.h"
>> > -
>> > -
>> > -struct iommu_domain *etnaviv_iommu_v2_domain_alloc(struct etnaviv_gpu *gpu)
>> > -{
>> > -       /* TODO */
>> > -       return NULL;
>> > -}
>> > diff --git a/drivers/staging/etnaviv/etnaviv_iommu_v2.h b/drivers/staging/etnaviv/etnaviv_iommu_v2.h
>> > deleted file mode 100644
>> > index 603ea41c5389..000000000000
>> > --- a/drivers/staging/etnaviv/etnaviv_iommu_v2.h
>> > +++ /dev/null
>> > @@ -1,25 +0,0 @@
>> > -/*
>> > - * Copyright (C) 2014 Christian Gmeiner <christian.gmeiner@gmail.com>
>> > -  *
>> > - * This program is free software; you can redistribute it and/or modify it
>> > - * under the terms of the GNU General Public License version 2 as published by
>> > - * the Free Software Foundation.
>> > - *
>> > - * This program is distributed in the hope that it will be useful, but WITHOUT
>> > - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
>> > - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
>> > - * more details.
>> > - *
>> > - * You should have received a copy of the GNU General Public License along with
>> > - * this program.  If not, see <http://www.gnu.org/licenses/>.
>> > - */
>> > -
>> > -#ifndef __ETNAVIV_IOMMU_V2_H__
>> > -#define __ETNAVIV_IOMMU_V2_H__
>> > -
>> > -#include <linux/iommu.h>
>> > -struct etnaviv_gpu;
>> > -
>> > -struct iommu_domain *etnaviv_iommu_v2_domain_alloc(struct etnaviv_gpu *gpu);
>> > -
>> > -#endif /* __ETNAVIV_IOMMU_V2_H__ */
>> > --
>> > 2.1.4
>> >
>>
>> I am fine with this change. You may have seen that I have a code for
>> mmuv2 ready in my git tree. but at
>> the moment I have no device to test it. So I will bring back support later.
>>
>
> Yes, I noticed that you had something implemented. But given that I
> didn't see any hardware where one could test this I would rather leave
> it out for now. I'm happy to pull this in once it has been tested on
> real hardware.
>

I know one :) Once it starts to work, there will also be patches.

<6>[1.1, swapper] [    0.780917] Galcore version 4.6.9.9754
<4>[1.1, swapper] [    0.780940] galcore options:
<4>[1.1, swapper] [    0.780960]   irqLine           = 64
<4>[1.1, swapper] [    0.780980]   registerMemBase   = 0xFA000000
<4>[1.1, swapper] [    0.780999]   registerMemSize   = 0x00040000
<4>[1.1, swapper] [    0.781018]   irqLine2D         = 65
<4>[1.1, swapper] [    0.781036]   registerMemBase2D = 0xFA040000
<4>[1.1, swapper] [    0.781055]   registerMemSize2D = 0x00040000
<4>[1.1, swapper] [    0.781074]   contiguousSize    = 152363008
<4>[1.1, swapper] [    0.781094]   contiguousBase    = 0x2B600000
<4>[1.1, swapper] [    0.781113]   bankSize          = 0x02000000
<4>[1.1, swapper] [    0.781133]   fastClear         = -1
<4>[1.1, swapper] [    0.781150]   compression       = -1
<4>[1.1, swapper] [    0.781168]   signal            = 48
<4>[1.1, swapper] [    0.781186]   baseAddress       = 0x00000000
<4>[1.1, swapper] [    0.781205]   physSize          = 0x80000000
<4>[1.1, swapper] [    0.781224]   logFileSize       = 0 KB
<4>[1.1, swapper] [    0.781242]   powerManagement   = 1
<4>[1.1, swapper] [    0.781260]   gpuProfiler   = 0
<3>[1.0, swapper] [    0.782305] Identity: chipModel=4000
<3>[1.0, swapper] [    0.782332] Identity: chipRevision=5222
<3>[1.0, swapper] [    0.782355] Identity: chipFeatures=0xE0287CAD
<3>[1.0, swapper] [    0.782375] Identity: chipMinorFeatures=0xC1799EFB
<3>[1.0, swapper] [    0.782395] Identity: chipMinorFeatures1=0xFEFBFAD9
<3>[1.0, swapper] [    0.782415] Identity: chipMinorFeatures2=0xCB9E4BFF
<3>[1.0, swapper] [    0.782435] Identity: chipMinorFeatures3=0x00000401
<3>[1.0, swapper] [    0.785428] Identity: chipModel=320
<3>[1.0, swapper] [    0.785452] Identity: chipRevision=5220
<3>[1.0, swapper] [    0.785472] Identity: chipFeatures=0xE02C7ECA
<3>[1.0, swapper] [    0.785492] Identity: chipMinorFeatures=0xC1399EFF
<3>[1.0, swapper] [    0.785511] Identity: chipMinorFeatures1=0xFE1FB2DB
<3>[1.0, swapper] [    0.785530] Identity: chipMinorFeatures2=0x02FE4080
<3>[1.0, swapper] [    0.785550] Identity: chipMinorFeatures3=0x00000000
<3>[1.0, swapper] [    0.858153] Identity: chipModel=4000
<3>[1.0, swapper] [    0.858178] Identity: chipRevision=5222
<3>[1.0, swapper] [    0.858199] Identity: chipFeatures=0xE0287CAD
<3>[1.0, swapper] [    0.858219] Identity: chipMinorFeatures=0xC1799EFB
<3>[1.0, swapper] [    0.858239] Identity: chipMinorFeatures1=0xFEFBFAD9
<3>[1.0, swapper] [    0.858259] Identity: chipMinorFeatures2=0xCB9E4BFF
<3>[1.0, swapper] [    0.858279] Identity: chipMinorFeatures3=0x00000401
<3>[1.0, swapper] [    0.859965] Identity: chipModel=320
<3>[1.0, swapper] [    0.859989] Identity: chipRevision=5220
<3>[1.0, swapper] [    0.860009] Identity: chipFeatures=0xE02C7ECA
<3>[1.0, swapper] [    0.860029] Identity: chipMinorFeatures=0xC1399EFF
<3>[1.0, swapper] [    0.860049] Identity: chipMinorFeatures1=0xFE1FB2DB
<3>[1.0, swapper] [    0.860068] Identity: chipMinorFeatures2=0x02FE4080
<3>[1.0, swapper] [    0.860087] Identity: chipMinorFeatures3=0x00000000

greets
--
Christian Gmeiner, MSc

https://soundcloud.com/christian-gmeiner
diff mbox

Patch

diff --git a/drivers/staging/etnaviv/etnaviv_gpu.c b/drivers/staging/etnaviv/etnaviv_gpu.c
index d2d0556a9bad..e3b93c293dca 100644
--- a/drivers/staging/etnaviv/etnaviv_gpu.c
+++ b/drivers/staging/etnaviv/etnaviv_gpu.c
@@ -21,7 +21,6 @@ 
 #include "etnaviv_gem.h"
 #include "etnaviv_mmu.h"
 #include "etnaviv_iommu.h"
-#include "etnaviv_iommu_v2.h"
 #include "common.xml.h"
 #include "state.xml.h"
 #include "state_hi.xml.h"
@@ -329,10 +328,13 @@  int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
 	mmuv2 = gpu->identity.minor_features1 & chipMinorFeatures1_MMU_VERSION;
 	dev_dbg(gpu->dev->dev, "mmuv2: %d\n", mmuv2);
 
-	if (!mmuv2)
+	if (!mmuv2) {
 		iommu = etnaviv_iommu_domain_alloc(gpu);
-	else
-		iommu = etnaviv_iommu_v2_domain_alloc(gpu);
+	} else {
+		dev_err(gpu->dev, "IOMMUv2 support is not implemented yet!\n");
+		ret = -ENODEV;
+		goto fail;
+	}
 
 	if (!iommu) {
 		ret = -ENOMEM;
diff --git a/drivers/staging/etnaviv/etnaviv_iommu_v2.c b/drivers/staging/etnaviv/etnaviv_iommu_v2.c
deleted file mode 100644
index 3039ee9cbc6d..000000000000
--- a/drivers/staging/etnaviv/etnaviv_iommu_v2.c
+++ /dev/null
@@ -1,32 +0,0 @@ 
-/*
- * Copyright (C) 2014 Christian Gmeiner <christian.gmeiner@gmail.com>
-  *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by
- * the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <linux/iommu.h>
-#include <linux/platform_device.h>
-#include <linux/sizes.h>
-#include <linux/slab.h>
-#include <linux/dma-mapping.h>
-#include <linux/bitops.h>
-
-#include "etnaviv_gpu.h"
-#include "state_hi.xml.h"
-
-
-struct iommu_domain *etnaviv_iommu_v2_domain_alloc(struct etnaviv_gpu *gpu)
-{
-	/* TODO */
-	return NULL;
-}
diff --git a/drivers/staging/etnaviv/etnaviv_iommu_v2.h b/drivers/staging/etnaviv/etnaviv_iommu_v2.h
deleted file mode 100644
index 603ea41c5389..000000000000
--- a/drivers/staging/etnaviv/etnaviv_iommu_v2.h
+++ /dev/null
@@ -1,25 +0,0 @@ 
-/*
- * Copyright (C) 2014 Christian Gmeiner <christian.gmeiner@gmail.com>
-  *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by
- * the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __ETNAVIV_IOMMU_V2_H__
-#define __ETNAVIV_IOMMU_V2_H__
-
-#include <linux/iommu.h>
-struct etnaviv_gpu;
-
-struct iommu_domain *etnaviv_iommu_v2_domain_alloc(struct etnaviv_gpu *gpu);
-
-#endif /* __ETNAVIV_IOMMU_V2_H__ */