At the moment we are developing an SDL2 app on an embeddedboard (i.MX 6) with DirectFB. Our LinuxOS is generated via YOCTO. The application itself works fine, bit on SDL_RenderPresent( renderer_ )
there seems only software blitting is working, which takes the CPU upto the limit.
- Window ( 256 x 128 px ): 60 FPS - ~20% at one core
- Window ( 1280 x 1024 px ): 45 FPS - 100% at one core
Adding no-software
to the DFBARGS takes the CPU usage down to ~6% (which is acceptable), but after that nothing is visible at the screen anymore. This is because I think SDL2/DirectFB is using only software blitting in this case. Did i forgot a flag in initializing?
Running a qt5-Application at 1280x1024 with 60FPS takes ~3-6% CPU usage of one core.
Creation of objects
window_ = SDL_CreateWindow( "", 0, 0, 256, 128, 0 );
renderer_ = SDL_CreateRenderer( window_, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC );
Some outputs from DirectFB
fbset:
mode "1280x1024-0"
# D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
geometry 1280 1024 1280 1024 32
timings 0 0 0 0 0 0 0
accel true
rgba 8/16,8/8,8/0,0/0
endmode
dfbdump:
(*) Direct/Thread: Started 'SigHandler' (411) [CRITICAL - OTHER/0] <8388608>...
~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.7.7 |~~~~~~~~~~~~~~~~~~~~~~~~~~
(c) 2012-2015 DirectFB integrated media GmbH
(c) 2001-2015 The world wide DirectFB Open Source Community
(c) 2000-2004 Convergence (integrated media) GmbH
----------------------------------------------------------------
(*) DirectFB/Core: Single Application Core. (2020-04-01 09:36)
(*) Direct/Memcpy: Using libc memcpy()
(*) Direct/Thread: Started 'Fusion Dispatch' (412) [MESSAGING - OTHER/0] <8388608>...
(*) Direct/Thread: Started 'VT Switcher' (415) [CRITICAL - OTHER/0] <8388608>...
(*) Direct/Thread: Started 'VT Flusher' (416) [DEFAULT - OTHER/0] <8388608>...
(*) DRMKMS/Init: using device /dev/dri/card0 (default)
(*) Direct/Thread: Started 'DRMKMS/Buffer' (417) [CRITICAL - OTHER/0] <8388608>...
(*) DirectFB/Graphics: nsc NSC GX1/GX2 driver version 1.1 (NSC)
(*) DirectFB/DRMKMS: Got 1 connectors, 1 encoders
(*) DirectFB/DRMKMS: found connected connector id 38.
(*) DirectFB/DRMKMS: connector 38 is already bound to encoder 37.
(*) DirectFB/DRMKMS: encoder 37 is already bound to ctrc 28.
(*) DirectFB/DRMKMS: Default mode is 1280x1024, we have 16 modes in total
(*) DirectFB/DRMKMS: supported properties for layer id 29
(*) DirectFB/DRMKMS: supported properties for layer id 34
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(*) Direct/Thread: Started 'Genefx' (418) [DEFAULT - OTHER/0] <8388608>...
Dependent NSC Kernel FrameBuffer driver version is 2.7.7 or later
DirectFB uptime: 01:02:30
-----------------------------[ Surfaces ]--------------------------------------------
Reference FID . Refs Width Height Format ID Video System Capabilities
-------------------------------------------------------------------------------------
N/A : 3 1280 x 1024 ARGB 1 10240k 0k video only double
------ ------
10240k 0k -> 10240k total
----------------------------------[ Contexts of Layer 0 ]----------------------------------------
Reference FID . Refs Width Height Format Location on screen Regions Active Info Level
-------------------------------------------------------------------------------------------------
N/A : 2 1280 x 1024 ARGB 0.0, 0.0 -> 1.0, 1.0 1 (*) SHARED N/A
(!!!) *** UNIMPLEMENTED [fusion_dispatch] *** [../../../DirectFB-1.7.7/lib/fusion/fusion.c:3947]
dfbinfo:
(*) Direct/Thread: Started 'SigHandler' (427) [CRITICAL - OTHER/0] <8388608>...
~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.7.7 |~~~~~~~~~~~~~~~~~~~~~~~~~~
(c) 2012-2015 DirectFB integrated media GmbH
(c) 2001-2015 The world wide DirectFB Open Source Community
(c) 2000-2004 Convergence (integrated media) GmbH
----------------------------------------------------------------
(*) DirectFB/Core: Single Application Core. (2020-04-01 09:36)
(*) Direct/Memcpy: Using libc memcpy()
(*) Direct/Thread: Started 'Fusion Dispatch' (428) [MESSAGING - OTHER/0] <8388608>...
(*) Direct/Thread: Started 'VT Switcher' (431) [CRITICAL - OTHER/0] <8388608>...
(*) Direct/Thread: Started 'VT Flusher' (432) [DEFAULT - OTHER/0] <8388608>...
(*) DRMKMS/Init: using device /dev/dri/card0 (default)
(*) Direct/Thread: Started 'DRMKMS/Buffer' (433) [CRITICAL - OTHER/0] <8388608>...
Dependent NSC Kernel FrameBuffer driver version is 2.7.7 or later
(*) DirectFB/Graphics: nsc NSC GX1/GX2 driver version 1.1 (NSC)
(*) DirectFB/DRMKMS: Got 1 connectors, 1 encoders
(*) DirectFB/DRMKMS: found connected connector id 38.
(*) DirectFB/DRMKMS: connector 38 is already bound to encoder 37.
(*) DirectFB/DRMKMS: encoder 37 is already bound to ctrc 28.
(*) DirectFB/DRMKMS: Default mode is 1280x1024, we have 16 modes in total
(*) DirectFB/DRMKMS: supported properties for layer id 29
(*) DirectFB/DRMKMS: supported properties for layer id 34
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(*) Direct/Thread: Started 'Genefx' (434) [DEFAULT - OTHER/0] <8388608>...
Screen (00) DRMKMS Screen (primary screen)
Caps: MIXERS ENCODERS OUTPUTS
Mixer (0) DRMKMS Mixer
Caps: FULL SUB_LAYERS
Layers (full mode): (00) (01) (02)
Layers (sub mode): 0 of (00) (01) (02)
Encoder (0) DRMKMS Encoder
Type: DIGITAL
Caps: FREQUENCY RESOLUTION
Output Resolutions: 640_480 800_600 1024_768 1152_864 1280_1024
Output (0) DRMKMS Output
Caps: RESOLUTION
Resolutions: 640_480 800_600 1024_768 1152_864 1280_1024
Signals: HDMI
Layer (00) DRMKMS Layer (primary layer)
Type: GRAPHICS
Caps: SURFACE
Layer (01) DRMKMS Plane Layer 0
Type: GRAPHICS
Caps: SURFACE ALPHACHANNEL SCREEN_POSITION
Layer (02) DRMKMS Plane Layer 1
Type: GRAPHICS
Caps: SURFACE ALPHACHANNEL SCREEN_POSITION
(!!!) *** UNIMPLEMENTED [fusion_dispatch] *** [../../../DirectFB-1.7.7/lib/fusion/fusion.c:3947]