Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-24 Thread Ohad Ben-Cohen
On Fri, May 21, 2010 at 12:42 PM, Felipe Contreras felipe.contre...@gmail.com wrote: Although I'm still worried that VM_IO != write-combine, but I guess it's a safe assumption to do for now. small update we missed: The original code is ignoring VM_IO buffers as well: static int

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-24 Thread Felipe Contreras
On Mon, May 24, 2010 at 7:19 PM, Ohad Ben-Cohen o...@wizery.com wrote: On Fri, May 21, 2010 at 12:42 PM, Felipe Contreras felipe.contre...@gmail.com wrote: Although I'm still worried that VM_IO != write-combine, but I guess it's a safe assumption to do for now. small update we missed: The

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-24 Thread Ohad Ben-Cohen
On Mon, May 24, 2010 at 10:21 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Mon, May 24, 2010 at 7:19 PM, Ohad Ben-Cohen o...@wizery.com wrote: On Fri, May 21, 2010 at 12:42 PM, Felipe Contreras felipe.contre...@gmail.com wrote: Although I'm still worried that VM_IO !=

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-21 Thread Felipe Contreras
On Fri, May 21, 2010 at 12:22 AM, Ohad Ben-Cohen o...@wizery.com wrote: On Wed, May 19, 2010 at 7:50 PM, Felipe Contreras felipe.contre...@gmail.com wrote: I don't know what VM_IO means, but essentially we don't want to go find each and page when we know the memory is contiguous. Although the

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-21 Thread Ohad Ben-Cohen
On Fri, May 21, 2010 at 9:14 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Fri, May 21, 2010 at 12:22 AM, Ohad Ben-Cohen o...@wizery.com wrote: On Wed, May 19, 2010 at 7:50 PM, Felipe Contreras felipe.contre...@gmail.com wrote: I don't know what VM_IO means, but essentially we

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-21 Thread Felipe Contreras
On Fri, May 21, 2010 at 11:22 AM, Ohad Ben-Cohen o...@wizery.com wrote: On Fri, May 21, 2010 at 9:14 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Fri, May 21, 2010 at 12:22 AM, Ohad Ben-Cohen o...@wizery.com wrote: On Wed, May 19, 2010 at 7:50 PM, Felipe Contreras

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-20 Thread Ohad Ben-Cohen
Hi Felipe, On Fri, May 14, 2010 at 10:27 PM, Felipe Contreras felipe.contre...@gmail.com wrote: Also, I noticed an important problem. Your code assumes that we would always have a bunch of scattered pages, Just a small note: the pages can be contiguous even in normal memory allocation (not

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-19 Thread Felipe Contreras
On Tue, May 18, 2010 at 3:53 PM, Ohad Ben-Cohen o...@wizery.com wrote: On Tue, May 18, 2010 at 3:24 PM, Felipe Contreras felipe.contre...@gmail.com wrote: Cool. I actually tried your patches to render to the framebuffer, and everything seemed to work fine. I didn't check for error codes or

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-18 Thread Ohad Ben-Cohen
Hi Felipe, On Mon, May 17, 2010 at 3:05 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Mon, May 17, 2010 at 2:25 AM, Ohad Ben-Cohen o...@wizery.com wrote: Out of curiosity, what board/environment do you use to play with the code ? I'd like to run the same use cases you do, so I can

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-18 Thread Ohad Ben-Cohen
On Mon, May 17, 2010 at 2:51 AM, Felipe Contreras felipe.contre...@gmail.com wrote: So currently (v2.6.33), before sending a read-olny buffer (TO_DEVICE), we do dmac_flush_range (should be clean, but whatever) and before sending a write-only (FROM_DEVICE), we do dmac_inv_range. On v2.6.33 the

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-18 Thread Felipe Contreras
On Tue, May 18, 2010 at 11:05 AM, Ohad Ben-Cohen o...@wizery.com wrote: On Mon, May 17, 2010 at 2:51 AM, Felipe Contreras felipe.contre...@gmail.com wrote: So currently (v2.6.33), before sending a read-olny buffer (TO_DEVICE), we do dmac_flush_range (should be clean, but whatever) and before

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-18 Thread Ohad Ben-Cohen
On Tue, May 18, 2010 at 2:02 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Tue, May 18, 2010 at 11:05 AM, Ohad Ben-Cohen o...@wizery.com wrote: On Mon, May 17, 2010 at 2:51 AM, Felipe Contreras felipe.contre...@gmail.com wrote: So currently (v2.6.33), before sending a read-olny

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-18 Thread Felipe Contreras
On Tue, May 18, 2010 at 2:14 PM, Ohad Ben-Cohen o...@wizery.com wrote: Unfortunately I don't have a setup right now to test this, but the code seems to be ok for our needs, don't you think ? But yeah, actually that fits our needs; calling the dma_map only, while still wrong, will give us the

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-18 Thread Ohad Ben-Cohen
On Tue, May 18, 2010 at 2:43 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Tue, May 18, 2010 at 2:14 PM, Ohad Ben-Cohen o...@wizery.com wrote: Unfortunately I don't have a setup right now to test this, but the code seems to be ok for our needs, don't you think ? But yeah, actually

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-18 Thread Felipe Contreras
On Tue, May 18, 2010 at 2:57 PM, Ohad Ben-Cohen o...@wizery.com wrote: On Tue, May 18, 2010 at 2:43 PM, Felipe Contreras felipe.contre...@gmail.com wrote: I'll just add support for the VM_IO path you mentioned. Cool. I actually tried your patches to render to the framebuffer, and everything

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-18 Thread Ohad Ben-Cohen
On Tue, May 18, 2010 at 3:24 PM, Felipe Contreras felipe.contre...@gmail.com wrote: Cool. I actually tried your patches to render to the framebuffer, and everything seemed to work fine. I didn't check for error codes or anything, so I'm not sure what's going on. How is the framebuffer mmap'ed

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-16 Thread Felipe Contreras
On Sat, May 15, 2010 at 12:08 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sat, May 15, 2010 at 11:26 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Fri, May 14, 2010 at 10:49 PM, Omar Ramirez Luna omar.rami...@ti.com wrote: On 5/14/2010 2:27 PM, Felipe Contreras

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-16 Thread Felipe Contreras
On Fri, May 14, 2010 at 10:27 PM, Felipe Contreras felipe.contre...@gmail.com wrote: I spent some time looking deeper into this patch series, and I have some doubts. On Sun, May 2, 2010 at 8:47 PM, Ohad Ben-Cohen o...@wizery.com wrote: Basically you're right, but the patches currently

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-16 Thread Ohad Ben-Cohen
Hi Felipe, On Fri, May 14, 2010 at 10:27 PM, Felipe Contreras felipe.contre...@gmail.com wrote: Hi, I spent some time looking deeper into this patch series, and I have some doubts. On Sun, May 2, 2010 at 8:47 PM, Ohad Ben-Cohen o...@wizery.com wrote: On Sun, May 2, 2010 at 4:17 PM, Felipe

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-16 Thread Ohad Ben-Cohen
Hi Felipe, On Sun, May 16, 2010 at 8:35 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Fri, May 14, 2010 at 10:27 PM, Felipe Contreras felipe.contre...@gmail.com wrote: I spent some time looking deeper into this patch series, and I have some doubts. On Sun, May 2, 2010 at 8:47

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-16 Thread Felipe Contreras
Hi Ohad, On Mon, May 17, 2010 at 1:35 AM, Ohad Ben-Cohen o...@wizery.com wrote: On Fri, May 14, 2010 at 10:27 PM, Felipe Contreras felipe.contre...@gmail.com wrote: I looked into the dma code (I guess it's in arch/arm/mm/dma-mapping.c) and I don't understand what dma_unmap_sg is supposed to

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-16 Thread Ohad Ben-Cohen
On Mon, May 17, 2010 at 2:15 AM, Felipe Contreras felipe.contre...@gmail.com wrote: Hi Ohad, On Mon, May 17, 2010 at 1:35 AM, Ohad Ben-Cohen o...@wizery.com wrote: On Fri, May 14, 2010 at 10:27 PM, Felipe Contreras felipe.contre...@gmail.com wrote: I looked into the dma code (I guess it's in

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-16 Thread Ohad Ben-Cohen
On Mon, May 17, 2010 at 2:15 AM, Felipe Contreras felipe.contre...@gmail.com wrote: Hi Ohad, On Mon, May 17, 2010 at 1:35 AM, Ohad Ben-Cohen o...@wizery.com wrote: On Fri, May 14, 2010 at 10:27 PM, Felipe Contreras felipe.contre...@gmail.com wrote: I looked into the dma code (I guess it's in

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-16 Thread Felipe Contreras
Hello, On Mon, May 17, 2010 at 1:57 AM, Ohad Ben-Cohen o...@wizery.com wrote: On Sun, May 16, 2010 at 8:35 PM, Felipe Contreras felipe.contre...@gmail.com wrote: Now I understand better; arch/arm/mm/dma-mapping.c will not be used unless CONFIG_DMABOUNCE=y, which is not the case for OMAP3.

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-16 Thread Felipe Contreras
On Mon, May 17, 2010 at 2:25 AM, Ohad Ben-Cohen o...@wizery.com wrote: Out of curiosity, what board/environment do you use to play with the code ? I'd like to run the same use cases you do, so I can reproduce any issue you may bump into. I use a beagleboard, use the DSP firmware in

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-15 Thread Felipe Contreras
On Fri, May 14, 2010 at 10:49 PM, Omar Ramirez Luna omar.rami...@ti.com wrote: On 5/14/2010 2:27 PM, Felipe Contreras wrote: [...] So, I tried your patches, and a simple test app worked fine without modification, but a real video decoding hanged the device completely... some spinlock was

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-15 Thread Felipe Contreras
On Sat, May 15, 2010 at 11:26 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Fri, May 14, 2010 at 10:49 PM, Omar Ramirez Luna omar.rami...@ti.com wrote: On 5/14/2010 2:27 PM, Felipe Contreras wrote: [...] So, I tried your patches, and a simple test app worked fine without

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-14 Thread Felipe Contreras
Hi, I spent some time looking deeper into this patch series, and I have some doubts. On Sun, May 2, 2010 at 8:47 PM, Ohad Ben-Cohen o...@wizery.com wrote: On Sun, May 2, 2010 at 4:17 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sat, May 1, 2010 at 11:44 PM, Ohad Ben-Cohen

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-02 Thread Felipe Contreras
On Sat, May 1, 2010 at 11:44 PM, Ohad Ben-Cohen o...@wizery.com wrote: This patchset introduces an approach to eliminate the direct calls to follow_page and to the low level cache APIs. The patchset works by caching the page information while memory is mapped, and then using that information

Re: [RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-02 Thread Ohad Ben-Cohen
On Sun, May 2, 2010 at 4:17 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sat, May 1, 2010 at 11:44 PM, Ohad Ben-Cohen o...@wizery.com wrote: This patchset introduces an approach to eliminate the direct calls to follow_page and to the low level cache APIs. The patchset works by

[RFC/PATCH 0/6] DSPBRIDGE: fix mem+cache API issues

2010-05-01 Thread Ohad Ben-Cohen
This patchset introduces an approach to eliminate the direct calls to follow_page and to the low level cache APIs. The patchset works by caching the page information while memory is mapped, and then using that information later when needed instead of calling follow_page. The low level cache API