2008-04-01 10:39:51     Sdram Caching Problem

Document created by Aaronwu Employee on Aug 6, 2013
Version 1Show Document
  • View in full screen mode

2008-04-01 10:39:51     Sdram Caching Problem

Appalayagari Sreedhar (INDIA)

Message: 53460    Hi,

 

I am working with PPI driver for LCD display.

 

int Framebufer[ 720*480 ];

 

main()

 

{

 

}

I am declaring the Framebuffer globally. Sometimes it is allocated in the sdram which is a cached region and sometimes in non cached region, If the framebuffer is allocated in the sdram cached region I am able to call the write driver api succesfully and display the data. if the allocated frame buffer is not in the sdram which is not cached the driver api write is returning me the error 0xFFFFFFFF Can someone help me in solving the above issue. Does user have any control over allocating the buffers in the required sdram region. Thankyou, Sreedhar

QuoteReplyEditDelete

 

 

2008-04-01 11:01:08     Re: Sdram Caching Problem

Mike Frysinger (UNITED STATES)

Message: 53462    please read the existing framebuffer drivers to see how to do this properly.  you have to allocate the buffer from the uncached dma region rather than normal sdram.

QuoteReplyEditDelete

 

 

2008-04-02 06:10:02     Re: Sdram Caching Problem

Appalayagari Sreedhar (INDIA)

Message: 53532   

 

Hi,

 

I have 3 questions.

 

Question 1:

 

I am facing the problem in user side, i am allocating the framebuffer in the user application and calling the write api.

 

The return value always -1. Buffer address is in non cached region of sdram.

 

is it possible for me to allocate the Framebuffer in the required region. any sample code for allocating the framebuffer in the user application in cached region of sdram,  any documentation link on this will help me.

 

Question 2:

 

Even if the Framebuffer is allocated in the dma region, we can see the distorted display on the LCD screen in VDSP.

 

will it be the same way in uclinux also.

 

Question 3:

 

Buffer cached in L1 only should be passed to the kernel driver api "read" and "write" will work?

 

I could see that the api call write is not even entering the write function definition in kernel. is it possible to  trace the sequence of write api.

 

Sorry for 3 questions.

 

Thankyou, Sreedhar.

QuoteReplyEditDelete

 

 

2008-04-02 11:00:37     Re: Sdram Caching Problem

Mike Frysinger (UNITED STATES)

Message: 53548    dont allocate the framebuffer in the user application.  there are plenty of Blackfin framebuffer drivers for you to look at.

 

we really cant guess at problems you're having in VDSP and how it translates to Linux.  you could have hardware problems, you could be programming things incorrectly, not using double buffering, whatever.  some issues will be unrelated to the software environment, while others may be.

 

i dont know what you're talking with "buffer cached in L1".  if you want to trace the kernel from userspace->system call->vfs->etc..., better for you to buy a book on the topic to assist.

QuoteReplyEditDelete

 

 

2008-04-05 09:12:01     Re: Sdram Caching Problem

Appalayagari Sreedhar (INDIA)

Message: 53683   

 

Hi Mike,

 

Thankyou, I was wrongly using the device driver api.

 

I am passing the structure pointer which contains some parameters which i am using for write purpose.

 

I did this using the Ioctl, the problem solved. Not the buffer defined in sdram uncached region.

 

once gain thanks.

 

-Sreedhar

Attachments

    Outcomes