[Qt-embedded-interest] FW: Double Buffer Graphics Driver

Tom Cooksey thomas.cooksey at nokia.com
Thu Jul 2 08:37:51 CEST 2009


>> >      I am at a point where I am trying to get the Double Buffer
>> > Graphics Driver working.  I have been able to implement the
>> > driver and get it to at least be recognized by the program
>> > trying to be run.  However there is no display on the LCD from
>> > the program.  I know the programs run when I use the VNC
>> > display. Here is what I did: Built the plug-in (all four files
>> > located either at QTDIR/examples/qws/dbscreen or on the link
>> > above) by invoking qmake without the -project option since there
>> > is already a .pro file, I then simply ran make resulting in the
>> > output file which was named "libdbscreen.so".  One way to use
>> > the plug-in was to create a directory in the application
>> > directory, so in my case I created analogclock/gfxdrivers and
>> > placed libdbscreen.so into it (make sure permissions are set). 
>> > At this point I could simply run the command in the application
>> > root directory:
>> >
>> > ./analogclock -qws -display dbscreen
>> >
>> > The resulting output was "blit_16(): Image format 0 not
>> > supported!" continuously being printed on the command line (once
>> > per second... maybe from the clock actually trying to update the
>> > area that changed?).  There were no LCD changes but at least the
>> > driver was recognized and could be run.
>> >
>> > I would like to figure this out and think that the blit could be
>> > manually set?  I simply need to copy over the buffer in memory
>> > to the /dev/fbo which I have accessed before in C.  There is no
>> > mmap support on my board (ARM) so the frame buffer test doesn't
>> > work... I was hoping that this would be a way to work around
>> > mmap problem.
>>
>> The dbscreen driver still uses the regular LinuxFBScreen, which
>> itself uses mmap. I think you need to take a look at the
>> LinuxFBScreen class, in particular initDevice & connect and write
>> your own screen driver which inherits QLinuxFBScreen and which
>> re-implements initDevice, connect & blit.
>>
>      Thank you for the reply and I was hoping that wouldn't be the
> case. Well, in this case it does look like I will have to write the
> driver as you suggested which makes sense.  However, on the Qt
> documentation for the accelerated graphics driver the example uses
> SVGAlibs which I do not think applies to my board.  Is there
> another example of one that does not use SVGAlibs that would be
> good to at least see another implementation of the custom driver. 
> Maybe there are some other ideas you may have or at least
> directions to point me in?  Thank you for your time.

I don't know to any simple examples you could use. I think actually 
you just need to create a new driver which inherits QScreen. As you 
can't get a pointer to your graphics memory, the driver will need a 
"shadow" buffer instead (So it can read data for blend operations). 
You can create a QImage for that in initDevice, and set the screen's 
addr pointer to the image's bits(). Then you just need to re-implement 
blit() to copy the blended data to your real framebuffer using an 
ioctl or whatever.

Hope that helps? 


Cheers,

Tom







More information about the Qt-embedded-interest mailing list