Jon Pomrenke | 11 Feb 23:31 2013

DLBM_BACKVIDEO, FBIOPAN_DISPLAY, and LCD Refreshes (Oh my!)

I am trying to implement a double-buffering capable framebuffer using DirectFB 1.4-13. I'm doing something very similar to this example: http://tech.groups.yahoo.com/group/lpc3000/message/647 . In short, the framebuffer allocates twice the memory of the display resolution, reports twice the resolution as the virtual resolution, and switches the active buffers through ioctl(/dev/fb0, FBIOPAN_DISPLAY).

My display layer is configured to use the extra framebuffer memory:
  DBCK(dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN ));
  DBCK( layer->SetCooperativeLevel( layer, DLSCL_EXCLUSIVE ));
  config.flags = DLCONF_BUFFERMODE;
  config.buffermode = DLBM_BACKVIDEO;
  DFBCK(layer->SetConfiguration(layer, &config));

My framebuffer reports properly as a double-buffered display:
  (*) FBDev/Mode: Switched to 240x320 (virtual 240x640)

Now here comes the complicated part. Because fbdev.c uses mmap to handle data transfer to the framebuffer, I have no events to trigger data transfer to the LCD within my framebuffer driver. The LCD was previously looping continuously on a FRAME_DONE IRQ so I'm trying to find a way to throttle the refresh.

If I work with a full screen window, FBIOPAN_DISPLAY is called and I can trigger the LCD refresh that way. If the window is not full screen, the double buffer is updated properly, but I don't get FBIOPAN_DISPLAY and, therefore, no LCD refresh.

The code in DirectFB-1.4.13/systems/fbdev/fbdev.c handling FBIOPAN_DISPLAY is here:
     switch (region->config.buffermode) {
          case DLBM_TRIPLE:
          case DLBM_BACKVIDEO:
               /* Check if simply swapping the buffers is possible... */
               if (!(flags & DSFLIP_BLIT) && !surface->rotation &&
                   (!update || (update->x1 == 0 &&
                                update->y1 == 0 &&
                                update->x2 == surface->config.size.w - 1 &&
                                update->y2 == surface->config.size.h - 1)))
               {
                    D_INFO("%s()  -> Going to swap buffers...\n",__FUNCTION__ );
                         if (funcs->FlipRegion)
                              ret = funcs->FlipRegion( layer,


This leads me to believe that the only way to induce FBIOPAN_DISPLAY is to create all windows at the full screen resolution or explicitly call IDirectFBDisplayLayer::Flip(). Obviously creating full screen windows consumes unnecessary resources. Calling Flip explicitly, and when not actually necessary, causes the double-buffering system to go out of sync and display the inactive buffer. Am I missing something?

I'd like to configure DirectFB to pass some sort of external refresh event to the framebuffer system, such as a frame done, or pan display. It is looking more like the correct way is to implement the clock-based IRQ refresh and utilize double-buffering to prevent flicker...

Thanks for the help,
Jon Pomrenke
_______________________________________________
directfb-users mailing list
directfb-users@...
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
Lance Spaulding | 7 Feb 04:45 2013
Picon

Current version of WebKitDFB

I'm trying to use the latest versions of DirectFB, LiTE, and WebKitDFB
(webkitdfb-r124228 branch) from git but am unable to get input devices
to work in web pages.  With the current version, neither my touchscreen
nor a keyboard work in web pages (but both work using df_input). The
touchscreen was working correctly last time I updated (~4 months ago).

Here's the webkit configuration I'm using:

WebKit was configured with the following options:

Build configuration:
Enable debugging (slow)                                  : no
Compile with debug symbols (slow)                        : no
Enable debug features (slow)                             : no
Enable GCC build optimization                            : yes
Code coverage support                                    : no
Unicode backend                                          : icu
Font backend                                             : freetype
Networking backend                                       : curl
Optimized memory allocator                               : yes
JavaScript Engine                                        : jsc
Accelerated rendering backend                            : directfb

Features:
=======
WebGL                                                    : no
Accelerated Compositing                                  : yes
Animation API                                            : no
Blob support                                             : yes
Color input support                                      : no
CSS3 Flexbox support                                     : no
CSS box-decoration-break support                         : yes
CSS Exclusions support                                   : yes
CSS Regions support                                      : yes
CSS Filters support                                      : no
CSS Compositing support                                  : yes
DeviceOrientation support                                : no
Directory upload                                         : no
DOM mutation observer support                            : no
Fast Mobile Scrolling                                    : no
Filters support                                          : yes
Fullscreen API support                                   : yes
Gamepad support                                          : no
Geolocation support                                      : no
HTML5 channel messaging support                          : no
HTML5 data transfer items support                        : no
HTML5 FileSystem API support                             : no
HTML5 iframe seamless attribute support                  : yes
HTML5 meter element support                              : yes
HTML5 microdata support                                  : no
HTML5 progress element support                           : yes
HTML5 track element support                              : no
HTML5 video element support                              : no
Icon database support                                    : no
JavaScript debugger/profiler support                     : yes
JIT compilation                                          : yes
Legacy WebKitBlobBuilder support                         : yes
Link prefetch support                                    : no
MathML support                                           : yes
Media source                                             : no
Media statistics                                         : no
Media stream support                                     : no
MHTML support                                            : yes
Opcode stats                                             : no
Page Visibility API support                              : no
Quota API support                                        : no
Register Protocol Handler support                        : no
RequestAnimationFrame support                            : yes
Scripted speech support                                  : no
Shadow DOM support                                       : yes
SharedWorkers support                                    : yes
Speech input support                                     : no
Spellcheck support                                       : yes
SQL client-side database storage support                 : yes
SVG fonts support                                        : yes
SVG support                                              : yes
Text Autosizing support                                  : no
Touch Icon Loading support                               : no
Web Audio support                                        : no
WebGL                                                    : no
Web Sockets support                                      : yes
Web Timing support                                       : no
Web Workers support                                      : yes
XSLT support                                             : yes

WebKit2 support:
WebKit2 support                                          : no
WebKit2 plugin process                                   : no

DirectFB configuration:
Use Cairo-DirectFB                                       : yes
FusionDale support                                       : no
FusionSound support                                      : no
Toolkit                                                  : lite

Any idea why this isn't working?

Also, on a separate topic, is there a way to enable a proxy server
in WebKitDFB?  I tried setting the shell variable http_proxy but
that didn't seem to work.

Thanks in advance,
Lance
Picon
Picon

What's wrong with this DirectFB Blit example?

Hi!


I got the directfb image example, and I'm trying to blit an image, as stated here. So, this is my code:

#include <stdio.h> #include <unistd.h> #include <directfb.h> static IDirectFB *dfb = NULL; static IDirectFBSurface *primary = NULL; static int screen_width = 0; static int screen_height = 0; #define DFBCHECK(x...) \ { \ DFBResult err = x; \ \ if (err != DFB_OK) \ { \ fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \ DirectFBErrorFatal( #x, err ); \ } \ } /* reflection against y */ static int DFB_FIXED_POINT_ONE = 1; static const s32 mat_y[9] = { -DFB_FIXED_POINT_ONE, 0, 0, 0, DFB_FIXED_POINT_ONE, 0, 0, 0, DFB_FIXED_POINT_ONE }; static IDirectFBSurface *logo = NULL; int main(int argc, char **argv) { int i; DFBSurfaceDescription dsc; IDirectFBImageProvider *provider; DFBCHECK(DirectFBInit (&argc, &argv)); DFBCHECK(DirectFBCreate (&dfb)); DFBCHECK(dfb->SetCooperativeLevel (dfb, DFSCL_FULLSCREEN)); dsc.flags = DSDESC_CAPS; dsc.caps = DFBSurfaceCapabilities(DSCAPS_PRIMARY | DSCAPS_FLIPPING); DFBCHECK(dfb->CreateSurface( dfb, &dsc, &primary )); DFBCHECK(primary->GetSize (primary, &screen_width, &screen_height)); DFBCHECK(dfb->CreateImageProvider (dfb, "iconC.png", &provider)); DFBCHECK(provider->GetSurfaceDescription (provider, &dsc)); DFBCHECK(dfb->CreateSurface( dfb, &dsc, &logo )); DFBCHECK(provider->RenderTo (provider, logo, NULL)); provider->Release(provider); for (i = -dsc.width; i < screen_width; i++) { DFBCHECK(primary->SetRenderOptions(primary, DSRO_MATRIX)); DFBCHECK(primary->SetMatrix(primary, mat_y)); DFBCHECK(primary->FillRectangle (primary, 0, 0, screen_width, screen_height)); DFBCHECK(primary->Blit (primary, logo, NULL, i, (screen_height - dsc.height) / 2)); DFBCHECK(primary->Flip (primary, NULL, DSFLIP_WAITFORSYNC)); usleep(1000*10); // 10 microseconds } logo->Release(logo); primary->Release(primary); dfb->Release(dfb); return 23; }

I'm using DirectFB 1.4.11. The output of this program is a lot of:

`(!!!) *** WARNING [rotation not yet implemented] *** [gfxcard.c:2075 in dfb_gfxcard_blit()]` `(!!!) *** WARNING [rotation not yet implemented] *** [gfxcard.c:2075 in dfb_gfxcard_blit()]` `(!!!) *** WARNING [rotation not yet implemented] *** [gfxcard.c:2075 in dfb_gfxcard_blit()]`

Is this a problem of my DFB version? Is there a way to make this example run and blit the image?

(by the way, I didn't understand the DFB_FIXED_POINT_ONE variable, so I give any value to it to try)




Wellington B. de Carvalho


_______________________________________________
directfb-users mailing list
directfb-users@...
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
Anouar Abdelbari | 5 Feb 11:42 2013
Picon

Compiling XDirectFB


Hi,
 I'm trying to compile XDirectFB for tests. After patching xorg-server i had
a problem when running automake --add-missing. I got the following message : 
"automake: cannot open < manpages.am: No such file or directory"
I can't understand what is happening and how can I solve that.

--

-- 
View this message in context: http://old.nabble.com/Compiling-XDirectFB-tp34984379p34984379.html
Sent from the DirectFB Users mailing list archive at Nabble.com.
Dennis Senftleben | 25 Jan 10:24 2013
Picon

Code example for using layers?

Hi,
I am looking for simple code example that displays a background image 
and a transparent layer with text.
This PDF explains the behavior of layers 
http://directfb.org/docs/ELC2008/elc2008_directfb_gfx.pdf , but there is 
no example code.

I tried this piece code, but no success:

-----------------------------------
  DirectFB/Genefx: Could not lock source!
     --> Object is suspended!
/home/testcase/svn/ProjectX/control/src/BootScreen.cpp <190> err 6:
         (#) DirectFBError [primary_layer->CreateWindow (primary_layer, 
&win_desc, &primary_window)]: Not implemented!
----------------------------------

DFBCHECK(DirectFBInit(0, NULL));
DFBCHECK(DirectFBCreate(&d->dfb));
DFBCHECK (d->dfb->SetCooperativeLevel (d->dfb, DFSCL_FULLSCREEN));
d->dsc.flags = DSDESC_CAPS;
d->dsc.caps  = static_cast<DFBSurfaceCapabilities>(DSCAPS_PRIMARY | 
DSCAPS_DOUBLE);

DFBCHECK (d->dfb->CreateSurface( d->dfb, &d->dsc, &d->primary ));
DFBCHECK (d->primary->GetSize (d->primary, &d->screen_width, 
&d->screen_height));

IDirectFBDisplayLayer *primary_layer;
IDirectFBWindow *primary_window;
IDFBWindowDescription win_desc;

      DFBCHECK(d->dfb->GetDisplayLayer (d->dfb, DLID_PRIMARY, 
&primary_layer));
      DFBCHECK( primary_layer->CreateWindow (primary_layer, &win_desc,  
&primary_window));
      DFBCHECK(primary_window->SetOpacity(primary_window,128));

  DFBCHECK(primary_window->GetSurface(primary_window,&d->primary2 ));
      DFBCHECK (d->primary->GetSize (d->primary2, &d->screen_width, 
&d->screen_height));
      initFont(d->fontSize, 128, 128 ,128);

greets
Dennis
Leny L | 19 Jan 13:09 2013
Picon

DSBLIT_ROTATE & StretchBlit ?

Hi,

I am desperately trying to get DSBLIT_ROTATE to work with StretchBlit
without success on DirectFB 1.4.17, no error, it's blitted and
stretched but not rotated.
I get DSBLIT_ROTATE with Blit and DSBLIT_FLIP with StretchBlit though.
Is there anything I am missing, DSBLIT_ROTATE is supposed to work with
StretchBlit right, anyone using it ?

Thanks.
Shally Verma | 18 Jan 10:35 2013

Blit with Vega colorise

Hi

Can anyone please tell me if there is any VEGA standard which Direct FB exercise while it performs Blitting or FillRect with Opacity like Operations? If yes, where can I find its details that what it is and how it impacts DFB performance?

Any earliest reply would immensenly help.

Regards

Shally


This e-mail and documents attached to this e-mail contain proprietary and/or confidential information of Entropic Communications. Such information is subject to copyright belonging to Entropic Communications. This e-mail is intended solely for the use of the individuals or entities to which it is addressed. If you are not the intended recipient of this e-mail, any distribution, copying or use of the contents of this e-mail and attachments is strictly prohibited and may be unlawful.
_______________________________________________
directfb-users mailing list
directfb-users@...
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
Pasha | 8 Jan 08:02 2013

Losing Grafix while starting DirectFB Application


Hi,

Please suggest me i am running with below problem.

I have two applications one is directfb main applications and another one is frame buffer application. The frame buffer application is used to draw image on frame buffer. when i run the directfb main application after frame buffer application the grafix drawn by frame buffer application is disappears while directfb main application boots. but i want the grafix should not disappear while boot the directfb app.

Please suggest me if any way to do this.


--
Pasha


Catch India as it happens with the Rediff News App. To download it for FREE, click here
_______________________________________________
directfb-users mailing list
directfb-users@...
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
Pasha | 7 Jan 14:25 2013

Grafix are losing

Hi,

Please suggest me i am running with below problem.

I have two applications one is directfb main applications and another one is frame buffer application. The frame buffer application is used to draw image on frame buffer. when i run the directfb main application after frame buffer application the grafix drawn by frame buffer application is disappears while directfb main application boots. but i want the grafix should not disappear while boot the directfb app.

Please suggest me if any way to do this.


--
Pasha


Catch India as it happens with the Rediff News App. To download it for FREE, click here
_______________________________________________
directfb-users mailing list
directfb-users@...
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
Leny L | 2 Jan 15:30 2013
Picon

KeyRelease events

Hi,

I am facing issues with the keyrelease events, I don't get any of
them, is there any limitation, possible reasons why keyrelease event
could not be fired ?
I have no issue getting the keypress events though.

I am under Linux, my keyboard code is pretty basic and similar to this:

void manage_keyboard_event(DFBInputEvent *evt);
//...//
DFBCHECK(dfb->GetInputDevice (dfb, DIDID_KEYBOARD, &dfb_keyboard));
DFBCHECK(dfb_keyboard->CreateEventBuffer (dfb_keyboard, &keyboard_events));
//...//
DFBInputEvent evt;
while (keyboard_events->GetEvent(keyboard_events, DFB_EVENT(&evt)) == DFB_OK)
{
          manage_keyboard_event(&evt);
}

Thanks in advance.
Patrick McMunn | 31 Dec 08:00 2012
Picon

DirectFB-1.6.2 build fails with "multiple definition" errors

I'm getting this error when compiling (I used -j1 and V=1 for verbose
output to help troubleshoot).

libtool: link: x86_64-pc-linux-gnu-g++  -fPIC -DPIC -shared -nostdlib
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/crti.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/crtbeginS.o  .libs/idirectfb.o
.libs/directfb.o .libs/directfb_result.o .libs/dummy.o .libs/init.o
-Wl,--whole-archive core/.libs/libdirectfb_core.a
display/.libs/libdirectfb_display.a
windows/.libs/libdirectfb_windows.a media/.libs/libdirectfb_media.a
input/.libs/libdirectfb_input.a misc/.libs/libdirectfb_misc.a
gfx/.libs/libdirectfb_gfx.a -Wl,--no-whole-archive  -Wl,-rpath
-Wl,/var/tmp/portage/dev-libs/DirectFB-1.6.2/work/DirectFB-1.6.2/lib/direct/.libs
-Wl,-rpath -Wl,/var/tmp/portage/dev-libs/DirectFB-1.6.2/work/DirectFB-1.6.2/lib/fusion/.libs
-lz ../lib/direct/.libs/libdirect.so ../lib/fusion/.libs/libfusion.so
-ldl -lrt -lpthread -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2
-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/lib
-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../.. -lstdc++ -lm -lc
-lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/crtendS.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/crtn.o  -O2
-march=core2 -O2 -O2 -march=core2 -Wl,-O1 -Wl,--sort-common
-Wl,--as-needed -Wl,-O1 -Wl,--sort-common -Wl,--as-needed
-Wl,-soname -Wl,libdirectfb-1.6.so.0 -o .libs/libdirectfb-1.6.so.0.2.0
gfx/.libs/libdirectfb_gfx.a(generic_dummy.o): In function `gDrawLine':
generic_dummy.c:(.text+0xf0): multiple definition of `gDrawLine'
gfx/.libs/libdirectfb_gfx.a(generic_draw_line.o):generic_draw_line.c:(.text+0x0):
first defined here
gfx/.libs/libdirectfb_gfx.a(generic_dummy.o): In function `gBlit':
generic_dummy.c:(.text+0x100): multiple definition of `gBlit'
gfx/.libs/libdirectfb_gfx.a(generic_blit.o):generic_blit.c:(.text+0x0):
first defined here
gfx/.libs/libdirectfb_gfx.a(generic_fill_rectangle.o): In function
`gFillRectangle':
generic_fill_rectangle.c:(.text+0x0): multiple definition of `gFillRectangle'
gfx/.libs/libdirectfb_gfx.a(generic_dummy.o):generic_dummy.c:(.text+0xe0):
first defined here
gfx/.libs/libdirectfb_gfx.a(generic_stretch_blit.o): In function `gStretchBlit':
generic_stretch_blit.c:(.text+0x0): multiple definition of `gStretchBlit'
gfx/.libs/libdirectfb_gfx.a(generic_dummy.o):generic_dummy.c:(.text+0x110):
first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [libdirectfb.la] Error 1
make[3]: Leaving directory
`/var/tmp/portage/dev-libs/DirectFB-1.6.2/work/DirectFB-1.6.2/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/var/tmp/portage/dev-libs/DirectFB-1.6.2/work/DirectFB-1.6.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/dev-libs/DirectFB-1.6.2/work/DirectFB-1.6.2'
make: *** [all] Error 2

Does anyone have any ideas what could be causing it and how to fix it?

--

-- 
Patrick McMunn

- Learn more about the Catholic Faith: http://www.catholic.com/
- Pray with the Church: http://www.universalis.com/

Gmane