This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cache coherence problem

hi

I am using DM648 Kit and Psp_driver_example which is sd_compositor.

I have problem with cache cocherence on below code. it does not show any display.

I spent too much time with this. but i still cant solve.

please help me, how to fix cache coherence problem. 

 

 

               /* Invalidate the buffer before giving to capture driver */
             

                 BCACHE_inv((Uint8 *)capChInfo[count].frame->frame.frameBufferPtr, (CAP_FRAME_SIZE),TRUE);

                /* Capture buffer will return the latest captured buffer */
                status |= FVID_exchange(capChInfo[count].chanHandle, &(capChInfo[count].frame));

     
      
            ///////////// image processing here /////////////
     
               framepointer = (capChInfo[count].frame->frame.frameBufferPtr);

               for(i = 0; i < 704; i++)
               {
                 for(j = 0; j < 480; j++)
                  {
                      *(framepointer + j * (i + 1) ) = 0x38383838;   // 0x38383838 is example
                 }
               }

          video_compositor(&disChInfo, &capChInfo[0], numCompositorChannel,  DIS_NUMPIXELS,  DIS_NUMLINES,  capNumPixels,  CAP_NUMLINES);             /* inNumLines */

       

            /* Flush and invalidate the processed buffer so that the EDMA reads
               the processed data */
            

            BCACHE_wbInv((Uint8 *)disChInfo.frame->frame.frameBufferPtr,   DIS_FRAME_SIZE,TRUE);

            status |= FVID_exchange(disChInfo.chanHandle, &(disChInfo.frame));

  • I saw you posted a few entries in my profile; unfortunately, DM648 is not one of the products I support so I am not up to speed on this platform.  Sorry, hopefully someone else more knowledgable in this space can step in and help.

  • hi Juan

    Thank you anyway for reply  :)

     

     

  • I think DM648 platform is not important in this problem.

    Assuming it is DM6447 or the others, How can i use cache coherence in this code?

    please, help me

  • Why do you believe you have cache coherency problems?

    Do you compile with all warnings enabled? If so, does your code generate any warnings? [The Uint8 type-casting looks suspect, to me.]

    What happens if you do not do any _inv or _wbinv?

    What happens if you do not do the compositing but just copy input to output?

    Have you used CCS to look at the memory contents before and after the _wbinv call to see if the cache status has changed?

    Do the memory buffers appear to have the right data before and after the _wbinv call?

  • Hi, RandyP

    When I  removed _inv , wbinv, It didnt work. just display black screen on my Tv monitor.

    I have not used CCS memory contents.

    However, I think i found reason. I used cache coherence API properly.

    I just forgot this is NTSC system. it means 720 * 240 * 2 resolution. It was overflow i think.

    thank you RandyP :)