From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [RFC, v3 9/9] media: platform: Add Mediatek ISP P1 shared memory device Date: Fri, 26 Jul 2019 00:41:16 -0700 Message-ID: <20190726074116.GA19745@infradead.org> References: <20190611035344.29814-1-jungo.lin@mediatek.com> <20190611035344.29814-10-jungo.lin@mediatek.com> <20190701072532.GB137710@chromium.org> <1562297618.1212.46.camel@mtksdccf07> <1562313579.1212.73.camel@mtksdccf07> <1563870117.1212.455.camel@mtksdccf07> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+glpam-linux-mediatek=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Tomasz Figa Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Sean Cheng =?utf-8?B?KOmEreaYh+W8mCk=?= , Mauro Carvalho Chehab , Rynn Wu =?utf-8?B?KOWQs+iCsuaBqSk=?= , Linux Media Mailing List , srv_heupstream , Rob Herring , Ryan Yu =?utf-8?B?KOS9meWtn+S/rik=?= , Frankie Chiu =?utf-8?B?KOmCseaWh+WHsSk=?= , Hans Verkuil , Jungo Lin , Sj Huang , "moderated list:ARM/Mediatek SoC support" , Laurent Pinchart , ddavenport-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, Frederic Chen =?utf-8?B?KOmZs+S/iuWFgyk=?= , list-Y9sIeH5OGRo@public.gmane.org:IOMMU DRIVERS , Joerg Roedel Could you try dma_get_sgtable() with the SCP struct device and then > dma_map_sg() with the P1 struct device? Please don't do that. dma_get_sgtable is a pretty broken API (see the common near the arm implementation) and we should not add more users of it. If you want a piece of memory that can be mapped to multiple devices allocate it using alloc_pages and then just map it to each device.