Received: by 10.192.165.148 with SMTP id m20csp438958imm; Wed, 25 Apr 2018 01:56:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx49KvDpNUo4ByXfuayfJBbedzPmJiobX7wr3wAW6ICcqaMzh3DicCyvodNgT8mspaUVG60G/ X-Received: by 2002:a17:902:a704:: with SMTP id w4-v6mr28283520plq.5.1524646580714; Wed, 25 Apr 2018 01:56:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524646580; cv=none; d=google.com; s=arc-20160816; b=enEFIjYE1NCDBSaOzbsRnRObsKQQsxiBUHgtxQm1mvxeleB2pVPuP9jBOhT5Nj1v7j FdrrbUHPJ+m1KfLdbuGL+m+MeXpRR+UN3SHtjy3qxEeKAjglxGYCHdlBAZ6BnoX2LvhO paES20kXAALSpvNAL12WiaosjKa8k8mrZ+edeEsU0cj8jD1LU0DxGB1N3LHFQnl+TI0r jezoXH6/I0XBi3C+tuncZ5TfvdmaQGB8V3sKbM7n9PGCJzgw0YUava9DgXF75rje5QRD i2Hs577ao78ORL8hVioAuySsuQLc9x+yyT5Klyd5vSPq0T0KdAXJ1BgYL/bxwbCPHOmz 3F6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=t47eNgCurJ6KgbUO9WJCfK+M9PXh4EMRRVWqhiTYfXE=; b=hDjA1CCqq9T6KGFqX1mblYta0OTn+lEy/qtSda5gPP/+EUsDzLEi4bCmKGNjrBRkQj NGPOpr/dVMQLPjJR8rIRX6kpYDnq2Q1PSrKkeRPuF41MDlD/rcG6g5vq1iMw3Uu48GQY A9IF3m3dvLE1lmshLHq+nXZ/btXNKxucAEHCMzcerMuEaFUmk8krAEQfJv5YwFQbdkjg umAQUMARGpbex5SBSr/BFpZDXFIuWC3H/u+4YxdaJk7lctUIh0kyAC0Jq9RZ8o6yfhLX aL/Gk4AQJAWC8xGCjhg8hewHbhc86/kvFVwnd3ZzLhPiCJgmy46wFlZo5KeHN/1NHvtw BlLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=aI0MTNZM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b1-v6si15562804plc.403.2018.04.25.01.56.06; Wed, 25 Apr 2018 01:56:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=aI0MTNZM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751412AbeDYIyr (ORCPT + 99 others); Wed, 25 Apr 2018 04:54:47 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58654 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750969AbeDYIyn (ORCPT ); Wed, 25 Apr 2018 04:54:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=t47eNgCurJ6KgbUO9WJCfK+M9PXh4EMRRVWqhiTYfXE=; b=aI0MTNZMnuQw0RKKId+8LSehQ v61EiXT83EiqJ+Tpu3Jvvb1NUr6NN4o47UgYXFKp7PFTo7OwqahovmPWsAIgQRfOexerIRZuPAi+e PYbEvdM6lys3GOI7rLhkxo7dJbTkZHQ/jIdnhyq4OOsD/FXiW/b/EGK1POg+5H8dLRz5coUKD3hCi OYmuW1zfkL3R2qiiUDSBymB504+HjwQVisd2BZ3XvatG3K3S4lfNYn09363Ev864vpv7qy75JNJ41 OdhivTqNPRnGKiF6cPPquyS16bF8AZWsLPKQmpfM3mb7GIx5qxS396CLet6Zr1mIQEUimurNECoD+ XQI4JV1HA==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fBGCF-0004QA-CL; Wed, 25 Apr 2018 08:54:39 +0000 Date: Wed, 25 Apr 2018 01:54:39 -0700 From: Christoph Hellwig To: Thierry Reding Cc: Christoph Hellwig , Daniel Vetter , Christian =?iso-8859-1?Q?K=F6nig?= , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Linux Kernel Mailing List , amd-gfx list , Jerome Glisse , dri-devel , Dan Williams , Logan Gunthorpe , "open list:DMA BUFFER SHARING FRAMEWORK" , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org Subject: noveau vs arm dma ops Message-ID: <20180425085439.GA29996@infradead.org> References: <20180420124625.GA31078@infradead.org> <20180420152111.GR31310@phenom.ffwll.local> <20180424184847.GA3247@infradead.org> <20180425054855.GA17038@infradead.org> <20180425064335.GB28100@infradead.org> <20180425074151.GA2271@ulmo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180425074151.GA2271@ulmo> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [discussion about this patch, which should have been cced to the iommu and linux-arm-kernel lists, but wasn't: https://www.spinics.net/lists/dri-devel/msg173630.html] On Wed, Apr 25, 2018 at 09:41:51AM +0200, Thierry Reding wrote: > > API from the iommu/dma-mapping code. Drivers have no business poking > > into these details. > > The interfaces that the above patch uses are all EXPORT_SYMBOL_GPL, > which is rather misleading if they are not meant to be used by drivers > directly. The only reason the DMA ops are exported is because get_arch_dma_ops references (or in case of the coherent ones used to reference). We don't let drivers assign random dma ops. > > > Thierry, please resend this with at least the iommu list and > > linux-arm-kernel in Cc to have a proper discussion on the right API. > > I'm certainly open to help with finding a correct solution, but the > patch above was purposefully terse because this is something that I > hope we can get backported to v4.16 to unbreak Nouveau. Coordinating > such a backport between ARM and DRM trees does not sound like something > that would help getting this fixed in v4.16. Coordinating the backport of a trivial helper in the arm tree is not the end of the world. Really, this cowboy attitude is a good reason why graphics folks have such a bad rep. You keep poking into random kernel internals, don't talk to anoyone and then complain if people are upset. This shouldn't be surprising. > Granted, this issue could've been caught with a little more testing, but > in retrospect I think it would've been a lot better if ARM_DMA_USE_IOMMU > was just enabled unconditionally if it has side-effects that platforms > don't opt in to but have to explicitly opt out of. Agreed on that count. Please send a patch.