From: Masahiro A. <m-...@aa...> - 2001-07-04 13:10:32
|
Hello all, Today I would like to get comments/suggestions on my problem, if you have. I'll really appreciate any info you would provide. I'm running custom SH4 machine with LCD controller (Epson s1d13706) with monochrome LCD, using it as framebuffer device. It can be accessed as /dev/fb0 now. When I access mmap'd framebuffer memory area from user program (by memcpy, for example), sometimes it takes very long time to complete. Writing (unsigned char)0x00 to the area sometimes took more than 700 microseconds. Usually it takes just about 10 microseconds. This long period gives bad effect to RTLinux task. RTTask wake-up jitter takes about the same time. Has anybody experienced this kind of behavior, when using framebuffer device, or using mmap call in user program? I would appreciate your any input. Here I summarize what I've found out so far. - Hardware access to the SRAM inside LCD controller completes within a few seconds range. I've confirmed it using oscilloscope. - Writing to the framebuffer memory directly within kernel space won't take such a long time. - redirecting file to /dev/fb0 won't cause this problem - redirecting text to /dev/tty0 (associated with LCD) won't cause this problem - This happens 2 to 3 times per 10000 write. Not often. - Interrupts are not disabled, but RTTask wake-up is delayed. So, I suspect that there might be some exception happening. Unfortunately I have very little knowledge about memory management of linux kernel. So, I can't find out what happens when accessing mmap'd memory area from user space, and what kind of exception can occur. I'm using Epson's driver, downloaded from their site, and modified for 2.4 kernel and monochrome LCD. If something has come to your thoughts, please let me know. I'm scratching my head now;-) Thank you for reading this. +-------------------------------------+ | Masahiro Abe, Software Engineer | | A&D Co., Ltd. of Tokyo, Japan | | mailto:m-...@aa... | +-------------------------------------+ |This is my opinion, not my employer's| +-------------------------------------+ |