Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965040AbbBBUaY (ORCPT ); Mon, 2 Feb 2015 15:30:24 -0500 Received: from mail-ig0-f171.google.com ([209.85.213.171]:41738 "EHLO mail-ig0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964927AbbBBUaW (ORCPT ); Mon, 2 Feb 2015 15:30:22 -0500 MIME-Version: 1.0 In-Reply-To: <20150202165405.GX14009@phenom.ffwll.local> References: <1422347154-15258-1-git-send-email-sumit.semwal@linaro.org> <1422347154-15258-2-git-send-email-sumit.semwal@linaro.org> <20150129143908.GA26493@n2100.arm.linux.org.uk> <20150129154718.GB26493@n2100.arm.linux.org.uk> <20150129192610.GE26493@n2100.arm.linux.org.uk> <20150202165405.GX14009@phenom.ffwll.local> Date: Mon, 2 Feb 2015 15:30:21 -0500 Message-ID: Subject: Re: [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms From: Rob Clark To: Rob Clark , Russell King - ARM Linux , Sumit Semwal , LKML , "linux-media@vger.kernel.org" , DRI mailing list , Linaro MM SIG Mailman List , "linux-arm-kernel@lists.infradead.org" , "linux-mm@kvack.org" , Linaro Kernel Mailman List , Tomasz Stanislawski , Robin Murphy , Marek Szyprowski Cc: Daniel Vetter Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1077 Lines: 23 On Mon, Feb 2, 2015 at 11:54 AM, Daniel Vetter wrote: >> My initial thought is for dma-buf to not try to prevent something than >> an exporter can actually do.. I think the scenario you describe could >> be handled by two sg-lists, if the exporter was clever enough. > > That's already needed, each attachment has it's own sg-list. After all > there's no array of dma_addr_t in the sg tables, so you can't use one sg > for more than one mapping. And due to different iommu different devices > can easily end up with different addresses. Well, to be fair it may not be explicitly stated, but currently one should assume the dma_addr_t's in the dmabuf sglist are bogus. With gpu's that implement per-process/context page tables, I'm not really sure that there is a sane way to actually do anything else.. BR, -R -- 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/