2015-04-02 17:29 GMT+02:00 Lucas Stach <l.stach@xxxxxxxxxxxxxx>: > IOMMUv2 support isn't implemented yet, so don't pretend it is there. > > Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx> > --- > 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@xxxxxxxxx> > - * > - * 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@xxxxxxxxx> > - * > - * 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 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel