Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752840AbbBKMzx (ORCPT ); Wed, 11 Feb 2015 07:55:53 -0500 Received: from mail-wi0-f180.google.com ([209.85.212.180]:35426 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751421AbbBKMzu (ORCPT ); Wed, 11 Feb 2015 07:55:50 -0500 Date: Wed, 11 Feb 2015 13:56:46 +0100 From: Daniel Vetter To: Rob Clark Cc: Russell King - ARM Linux , Marek Szyprowski , Sumit Semwal , Linux Kernel Mailing List , "linux-media@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linaro-mm-sig@lists.linaro.org" , "linux-arm-kernel@lists.infradead.org" , linux-mm , Robin Murphy , Linaro Kernel Mailman List , Tomasz Stanislawski , Daniel Vetter Subject: Re: [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms Message-ID: <20150211125646.GR24485@phenom.ffwll.local> Mail-Followup-To: Rob Clark , Russell King - ARM Linux , Marek Szyprowski , Sumit Semwal , Linux Kernel Mailing List , "linux-media@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linaro-mm-sig@lists.linaro.org" , "linux-arm-kernel@lists.infradead.org" , linux-mm , Robin Murphy , Linaro Kernel Mailman List , Tomasz Stanislawski References: <1422347154-15258-1-git-send-email-sumit.semwal@linaro.org> <1422347154-15258-2-git-send-email-sumit.semwal@linaro.org> <54DB12B5.4080000@samsung.com> <20150211111258.GP8656@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 3.16-2-amd64 User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1503 Lines: 31 On Wed, Feb 11, 2015 at 06:23:52AM -0500, Rob Clark wrote: > On Wed, Feb 11, 2015 at 6:12 AM, Russell King - ARM Linux > wrote: > > As I've already pointed out, there's a major problem if you have already > > had a less restrictive attachment which has an active mapping, and a new > > more restrictive attachment comes along later. > > > > It seems from Rob's descriptions that we also need another flag in the > > importer to indicate whether it wants to have a valid struct page in the > > scatter list, or whether it (correctly) uses the DMA accessors on the > > scatter list - so that exporters can reject importers which are buggy. > > to be completely generic, we would really need a way that the device > could take over only just the last iommu (in case there were multiple > levels of address translation).. I still hold that if the dma api steals the iommu your gpu needs for context switching then that's a bug in the platform setup code. dma api really doesn't have any concept of switchable hw contexts. So trying to work around this brokeness by mandating it as a valid dma-buf use-case is totally backwards. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/