Hi, Indeed your patch solved the problem of decode using cmemk. But unfortunatly it didn't help to encode application which Still Fails in get_phys() most of the time. (It worked for virtp = 0x415c0000).
-------- CMEMK dmesg during encode execution --------------- ... CMEMK Debug: GETPHYS ioctl received. CMEMK Debug: get_phys(): pgd = 0xc6069050 virtp = 0x415c0000 CMEMK Debug: get_phys(): pmd = 0xc6069050 CMEMK Debug: get_phys(): pmd_none = 0x0 pmd_bad = 0x0 CMEMK Debug: get_phys(): pte = 0xc61c9f00 pte_present = 0x1 CMEMK Debug: get_phys(): pte_page = 0xc03fa000 page_address = 0xc7d00000 virtp & ~PAGE_MASK = 0x0 CMEMK Debug: GETPHYS: returning 0x87d00000 CMEMK Debug: GETPHYS ioctl received. CMEMK Debug: get_phys(): pgd = 0xc6069048 virtp = 0x412c7000 CMEMK Debug: get_phys(): pmd = 0xc6069048 CMEMK Debug: get_phys(): pmd_none = 0x0 pmd_bad = 0x0 CMEMK Debug: get_phys(): pte = 0xc6289b1c pte_present = 0x0 CMEMK Error: GETPHYS: Failed to convert virtual 0x412c7000 to physical. CMEMK Debug: GETPHYS ioctl received. CMEMK Debug: get_phys(): pgd = 0xc6069048 virtp = 0x4136fbff CMEMK Debug: get_phys(): pmd = 0xc6069048 CMEMK Debug: get_phys(): pmd_none = 0x0 pmd_bad = 0x0 CMEMK Debug: get_phys(): pte = 0xc6289dbc pte_present = 0x0 CMEMK Error: GETPHYS: Failed to convert virtual 0x4136fbff to physical. CMEMK Debug: close: called.<7>CMEMK Debug: Forcing free on pool 0 CMEMK Debug: Warning: Putting 'busy' buffer from pool 0 at 0x87d00000 on freelist ... ----------------------- Any ideas? Regards, Alex > -----Original Message----- > From: Peter Wippich [mailto:[EMAIL PROTECTED] > Sent: Sunday, January 14, 2007 15:22 > To: Alex Rier > Cc: davinci-linux-open-source@linux.davincidsp.com > Subject: Re: CMEMK get_phys() fails with 2.6.19-rc3-omap1 > > > > Hi Alex, > > I've posetd a small back patch for the kernel to solve this > here. Look > about 6 weeks ago. > > Ciao, > > Peter > > On Sun, 14 Jan 2007, Alex Rier wrote: > > > Hi, > > > > I'm porting DaVinci Video Capture driver davinci_vpfe, ccdc, > > CMEMK and DSPLINKK to 2.6.19-rc3-omap1. > > > > All the drivers and there dependencies compile, link and load. > > But when I try to run "decode", CMEMK fails in get_phys(). > > (I've put some extra prints into get_phys). > > See below... > > > > > > //--------- cmemk.c ------------------------------------------- > > unsigned long get_phys(unsigned long virtp) > > { > > pgd_t *pgd; > > pmd_t *pmd; > > pte_t *pte; > > struct mm_struct *mm = current->mm; > > > > pgd = pgd_offset(mm, virtp); > > __D("get_phys(): pgd = 0x%X virtp = 0x%X \n", > > (unsigned)pgd_val(pgd), (unsigned)virtp); // TBD: A.R. Debug > > if (!(pgd_none(*pgd) || pgd_bad(*pgd))) { > > pmd = pmd_offset(pgd, virtp); > > __D("get_phys(): pmd = 0x%X \n", (unsigned)pmd_val(pmd)); // > > TBD: A.R. Debug > > __D("get_phys(): pmd_none = 0x%X pmd_bad = 0x%X \n", > > (unsigned)pmd_none(*pmd), (unsigned)pmd_bad(*pmd)); // > TBD: A.R. Debug > > > > if (!(pmd_none(*pmd) || pmd_bad(*pmd))) { > > pte = pte_offset_kernel(pmd, virtp); > > __D("get_phys(): pte = 0x%X pte_present = %d \n", > > (unsigned)pte_val(pte), (unsigned)pte_present(*pte)); > > // TBD: A.R. Debug > > > > if (pte_present(*pte)) { > > __D("get_phys(): pte_page = 0x%X page_address = 0x%X > > virtp & ~PAGE_MASK = 0x%X \n", > > (unsigned)pte_page(*pte), > > (unsigned)page_address(pte_page(*pte)), > > (unsigned)(virtp & ~PAGE_MASK)); // TBD: A.R. > > Debug > > return __pa(page_address(pte_page(*pte)) + > > (virtp & ~PAGE_MASK)); > > } > > } > > } > > > > return 0; > > } > > //------------------------------------------------------------ > > > > ==== 2.6.19-rc3-omap1 DMESG ==== > > MEMK Debug: ** CMEM kernel module built: Jan 10 2007 14:44:55 > > CMEMK Debug: Allocated major number: 254 > > CMEMK Debug: Allocating 1 buffers of size 3145728 > (requested 3145728) > > CMEMK Debug: alloc_pool_buffer: Called for size 3145728 > > CMEMK Debug: alloc_pool_buffer: Fits req 3145728 < avail: 8388608 > > CMEMK Debug: alloc_pool_buffer: new available block size is 5242880 > > CMEMK Debug: alloc_pool_buffer: returning allocated buffer > at 0xc9500000 > > CMEMK Debug: get_phys(): pgd = 0xC6713250 virtp = 0xC9500000 > > CMEMK Debug: get_phys(): pmd = 0xC6713250 > > CMEMK Debug: get_phys(): pmd_none = 0x0 pmd_bad = 0x2 > > CMEMK Debug: Allocated buffer 0, virtual 0xc9500000 and > physical 0x0 and > > size 3145728 > > CMEMK Debug: Busylist for pool 0: > > CMEMK Debug: Freelist for pool 0: > > CMEMK Debug: Free: Buffer with id 0 and physical address 0x0 > > CMEMK Debug: Allocating 1 buffers of size 204800 (requested 202752) > > CMEMK Debug: alloc_pool_buffer: Called for size 204800 > > CMEMK Debug: alloc_pool_buffer: Fits req 204800 < avail: 5242880 > > CMEMK Debug: alloc_pool_buffer: new available block size is 5038080 > > CMEMK Debug: alloc_pool_buffer: returning allocated buffer > at 0xc94ce000 > > CMEMK Debug: get_phys(): pgd = 0xC6713250 virtp = 0xC94CE000 > > CMEMK Debug: get_phys(): pmd = 0xC6713250 > > CMEMK Debug: get_phys(): pmd_none = 0x0 pmd_bad = 0x2 > > CMEMK Debug: Allocated buffer 0, virtual 0xc94ce000 and > physical 0x0 and > > size 204800 > > ...... > > CMEMK Debug: GETSIZE ioctl received > > CMEMK Debug: GETSIZE returning 3145728 > > CMEMK Debug: mmap: vma->vm_start = 0x41598000 > > CMEMK Debug: mmap: vma->vm_pgoff = 0x0 > > CMEMK Debug: mmap: vma->vm_end = 0x41898000 > > CMEMK Debug: mmap: size = 0x300000 > > CMEMK Debug: GETPHYS ioctl received. > > CMEMK Debug: get_phys(): pgd = 0xC6665050 virtp = 0x41598000 > > CMEMK Debug: get_phys(): pmd = 0xC6665050 > > CMEMK Debug: get_phys(): pmd_none = 0x0 pmd_bad = 0x0 > > CMEMK Debug: get_phys(): pte = 0xC6105E60 pte_present = 1 > > CMEMK Debug: get_phys(): pte_page = 0xBF303000 page_address > = 0x40000000 > > virtp & ~PAGE_MASK = 0x0 > > CMEMK Error: GETPHYS: Failed to convert virtual 0x41598000 > to physical. > > ........ > > ================ > > > > > > Do you have an idea why does it work with 2.6.10-mvl401 and > fails with > > 2.6.19-rc3-omap1? > > > > Thanks, > > Alex > > > > > > This mail passed through VIGILANT TECHNOLOGY Mail-SeCure. > > > > > ************************************************************** > ********************** > > This footnote confirms that this email message has been scanned by > > PineApp Mail-SeCure for the presence of malicious code, > vandals & computer viruses. > > > ************************************************************** > ********************** > > _______________________________________________ > > Davinci-linux-open-source mailing list > > Davinci-linux-open-source@linux.davincidsp.com > > > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source > > > > > | Peter Wippich Voice: +49 30 > 46776411 | > | G&W Instruments GmbH fax: +49 30 > 46776419 | > | Gustav-Meyer-Allee 25, Geb. 12 Email: > [EMAIL PROTECTED] | > | D-13355 Berlin / Germany > | > > This mail passed through VIGILANT TECHNOLOGY Mail-SeCure. > > ************************************************************** > ********************** > This footnote confirms that this email message has been scanned by > PineApp Mail-SeCure for the presence of malicious code, > vandals & computer viruses. > ************************************************************** > ********************** > This mail passed through VIGILANT TECHNOLOGY Mail-SeCure. ************************************************************************************ This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses. ************************************************************************************ _______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source