From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH v2] drm/xen-front: Make shmem backed display buffer coherent Date: Tue, 15 Jan 2019 22:36:31 -0800 Message-ID: <20190116063631.GA10881@infradead.org> References: <20190115140420.4652-1-andr2000@gmail.com> <20190116063002.jq3aas6ofhaogmyk@sirius.home.kraxel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190116063002.jq3aas6ofhaogmyk@sirius.home.kraxel.org> Sender: linux-kernel-owner@vger.kernel.org To: Gerd Hoffmann Cc: Oleksandr Andrushchenko , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, daniel.vetter@intel.com, jgross@suse.com, boris.ostrovsky@oracle.com, noralf@tronnes.org, hch@infradead.org, Oleksandr Andrushchenko List-Id: dri-devel@lists.freedesktop.org On Wed, Jan 16, 2019 at 07:30:02AM +0100, Gerd Hoffmann wrote: > Hi, > > > + if (!dma_map_sg(dev->dev, xen_obj->sgt->sgl, xen_obj->sgt->nents, > > + DMA_BIDIRECTIONAL)) { > > + ret = -EFAULT; > > + goto fail_free_sgt; > > + } > > Hmm, so it seems the arm guys could not come up with a suggestion how to > solve that one in a better way. Ok, lets go with this then. > > But didn't we agree that this deserves a comment exmplaining the purpose > of the dma_map_sg() call is to flush caches and that there is no actual > DMA happening here? Using a dma mapping call to flush caches is complete no-go. But the real question is why you'd even want to flush cashes if you do not want a dma mapping? This whole issue keeps getting more and more confusing.