Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753051AbdHQOTB (ORCPT ); Thu, 17 Aug 2017 10:19:01 -0400 Received: from 8bytes.org ([81.169.241.247]:44168 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750988AbdHQOTA (ORCPT ); Thu, 17 Aug 2017 10:19:00 -0400 Date: Thu, 17 Aug 2017 16:18:58 +0200 From: Joerg Roedel To: Lucas Stach Cc: Joerg Roedel , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Suravee Suthikulpanit , Russell King , Christian Gmeiner , David Airlie , etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 06/13] drm/etnaviv: Use sychronized interface of the IOMMU-API Message-ID: <20170817141858.GG16908@8bytes.org> References: <1502974596-23835-1-git-send-email-joro@8bytes.org> <1502974596-23835-7-git-send-email-joro@8bytes.org> <1502976758.19806.25.camel@pengutronix.de> <20170817134539.GJ2853@suse.de> <1502978634.19806.27.camel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1502978634.19806.27.camel@pengutronix.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 688 Lines: 17 On Thu, Aug 17, 2017 at 04:03:54PM +0200, Lucas Stach wrote: > There is no IOMMU driver in use. Etnaviv just uses part of the IOMMU API > to manage the GPU internal MMU, see > drivers/gpu/drm/etnaviv/etnaviv_iommu.c That looks like a very fragile construct, because it relies on internal behavior of the iommu code that can change in the future. I strongly suggest to either make etnaviv_iommu.c a real iommu driver an move it to drivers/iommu, or (prefered by me) just call directly into the map/unmap functions of this driver from the rest of the etnaviv_iommu.c. I don't really see a reason why the IOMMU-API needs to be used there as another layer of indirection. Regards, Joerg