From: Daniel Vetter Subject: Re: [RFC][PATCH 0/2] Allow DMA BUF heaps to be loaded as modules Date: Mon, 4 Nov 2019 10:58:23 +0100 Message-ID: <20191104095823.GD10326@phenom.ffwll.local> References: <20191025234834.28214-1-john.stultz@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20191025234834.28214-1-john.stultz@linaro.org> Sender: linux-kernel-owner@vger.kernel.org To: John Stultz Cc: lkml , Sandeep Patil , Mike Rapoport , Chenbo Feng , Alistair Strachan , Liam Mark , Yue Hu , dri-devel@lists.freedesktop.org, "Andrew F . Davis" , Hridya Valsaraju , Andrew Morton , Pratik Patel List-Id: dri-devel@lists.freedesktop.org On Fri, Oct 25, 2019 at 11:48:32PM +0000, John Stultz wrote: > Now that the DMA BUF heaps core code has been queued, I wanted > to send out some of the pending changes that I've been working > on. > > For use with Android and their GKI effort, it is desired that > DMA BUF heaps are able to be loaded as modules. This is required > for migrating vendors off of ION which was also recently changed > to support modules. > > So this patch series simply provides the necessary exported > symbols and allows the system and CMA drivers to be built > as modules. > > Due to the fact that dmabuf's allocated from a heap may > be in use for quite some time, there isn't a way to safely > unload the driver once it has been loaded. Thus these > drivers do no implement module_exit() functions and will > show up in lsmod as "[permanent]" > > Feedback and thoughts on this would be greatly appreciated! Do we actually want this? I figured if we just state that vendors should set up all the right dma-buf heaps in dt, is that not enough? Exporting symbols for no real in-tree users feels fishy. -Daniel > > thanks > -john > > Cc: Laura Abbott > Cc: Benjamin Gaignard > Cc: Sumit Semwal > Cc: Liam Mark > Cc: Pratik Patel > Cc: Brian Starkey > Cc: Andrew F. Davis > Cc: Andrew Morton > Cc: Yue Hu > Cc: Mike Rapoport > Cc: Chenbo Feng > Cc: Alistair Strachan > Cc: Sandeep Patil > Cc: Hridya Valsaraju > Cc: dri-devel@lists.freedesktop.org > > John Stultz (1): > dma-buf: heaps: Allow system & cma heaps to be configured as a modules > > Sandeep Patil (1): > mm: cma: Export cma symbols for cma heap as a module > > drivers/dma-buf/dma-heap.c | 2 ++ > drivers/dma-buf/heaps/Kconfig | 4 ++-- > drivers/dma-buf/heaps/heap-helpers.c | 2 ++ > kernel/dma/contiguous.c | 1 + > mm/cma.c | 5 +++++ > 5 files changed, 12 insertions(+), 2 deletions(-) > > -- > 2.17.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch