From: Jenkins, C. <Cli...@xe...> - 2006-08-17 12:05:39
|
> Since the lcd device is not attached to=20 > the external bus interface (Address, Data and control IO) of > my microcontroller, it's why I wonder if we can mmap() it. > Almost of graphic cards can mapped physically the memory > because the video memory is already allocated. My case is > different because the LCD is connected to GPIO. =20 On method is to allocate the frame buffer and a shadow buffer out of system RAM. Applications write to the frame buffer in the normal way (probably using mmapp(/dev/fb0)), and your driver periodically compares the FB with its shadow, and when it finds any difference, updates the shadow and writes the changes to the LCD module's internal memory using the GPIO interface. I haven't looked, but you might find examples of this in the Denx kernel tree http://www.denx.de/cgi-bin/gitweb.cgi?p=3Dlinux-2.6-denx.git;a=3Dtree;h=3D= 8b92 67e5cf02e32ca70ede9b64c3a2b95e9d2453;hb=3Dc3cad3140519bd060fbf9f4d0789f38= 1 0d5c1d42;f=3Ddrivers/video Clive |