Open dhanyweb opened 1 year ago
Displaying is done only on the first connector found by default, so you probably get df_andi displaying on your composite video connector.
With multiple connectors, setting connected-outputs=multihead in /etc/directfbrc allows to select which connector to use: in this case it is necessary to use dfbinfo from DirectFB-tools to list the primary layer ids. Then add in /etc/directfbrc: primary-layer="id of the primary layer corresponding to the HDMI connector in your case"
This is the principle, but a few months have passed since the last time I tested this kind of configuration.
Thank you but its not working.
root@DeviceLink:~# df_andi
(c) 2017-2023 DirectFB2 Open Source Project (fork of DirectFB)
(c) 2012-2016 DirectFB integrated media GmbH
(c) 2001-2016 The world wide DirectFB Open Source Community
(c) 2000-2004 Convergence (integrated media) GmbH
----------------------------------------------------------------
(*) DirectFB/Core: Single Application Core. (2023-07-29 15:41)
(*) DRMKMS/System: Using device /dev/dri/card0 as specified in DirectFB configuration
(*) DRMKMS/System: Multi-head display
(*) DRMKMS/System: Found 2 connectors, 2 encoders, 2 planes
(*) DirectFB/Input: meson_ao_cec 0.1 (DirectFB)
(*) DirectFB/Input: Hot-plug detection enabled with Linux Input
(*) DirectFB/Graphics: Genefx Software Rasterizer 0.7 (DirectFB)
(*) DRMKMS/Screen: Default mode is 720x576 (2 modes in total)
(!) *** ONCE [no mode found for 720x576 at 50 Hz
] *** [../systems/drmkms/drmkms_mode.c:87 in drmkms_find_mode()]
(*) DRMKMS/Layer: Supported properties for layer id 36
(*) zpos
(*) DirectFB/Core/WM: Default 0.3 (DirectFB)
(!) DRMKMS/Layer: drmModeSetCrtc( crtc_id 42, fb_id 46, xy 0,0, connector_id 34, mode 720x576@50Hz ) failed at index 1!
--> Invalid argument
(!) Core/LayerRegion: Could not set region!
--> An invalid argument has been specified
(!) Core/LayerRegion: dfb_layer_region_realize() in dfb_layer_region_flip_update() failed!
--> An invalid argument has been specified
(!) DRMKMS/Layer: drmModeSetCrtc( crtc_id 42, fb_id 46, xy 0,0, connector_id 34, mode 720x576@50Hz ) failed at index 1!
--> Invalid argument
(!) Core/LayerRegion: Could not set region!
--> An invalid argument has been specified
(!) Core/LayerRegion: dfb_layer_region_realize() in dfb_layer_region_flip_update() failed!
--> An invalid argument has been specified
(*) Direct/Interface: Loaded 'DGIFF' implementation of 'IDirectFBFont'
(*) Direct/Interface: Loaded 'DFIFF' implementation of 'IDirectFBImageProvider'
(!) DRMKMS/Layer: drmModeSetCrtc( crtc_id 42, fb_id 46, xy 0,0, connector_id 34, mode 720x576@50Hz ) failed at index 1!
--> Invalid argument
(!) Core/LayerRegion: Could not set region!
--> An invalid argument has been specified
(!) Core/LayerRegion: dfb_layer_region_realize() in dfb_layer_region_flip_update() failed!
--> An invalid argument has been specified
(!) DRMKMS/Layer: drmModeSetCrtc( crtc_id 42, fb_id 46, xy 0,0, connector_id 34, mode 720x576@50Hz ) failed at index 1!
--> Invalid argument
(!) Core/LayerRegion: Could not set region!
--> An invalid argument has been specified
(!) Core/LayerRegion: dfb_layer_region_realize() in dfb_layer_region_flip_update() failed!
--> An invalid argument has been specified
dfbinfo output :
root@DeviceLink:~# ./dfbinfo
~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 2.0.0 |~~~~~~~~~~~~~~~~~~~~~~~~~~
(c) 2017-2023 DirectFB2 Open Source Project (fork of DirectFB)
(c) 2012-2016 DirectFB integrated media GmbH
(c) 2001-2016 The world wide DirectFB Open Source Community
(c) 2000-2004 Convergence (integrated media) GmbH
----------------------------------------------------------------
(*) DirectFB/Core: Single Application Core. (2023-07-29 15:41)
(*) DRMKMS/System: Using device /dev/dri/card0 as specified in DirectFB configuration
(*) DRMKMS/System: Multi-head display
(*) DRMKMS/System: Found 2 connectors, 2 encoders, 2 planes
(*) DirectFB/Input: meson_ao_cec 0.1 (DirectFB)
(*) DirectFB/Input: Hot-plug detection enabled with Linux Input
(*) DirectFB/Graphics: Genefx Software Rasterizer 0.7 (DirectFB)
(*) DRMKMS/Screen: Default mode is 720x576 (2 modes in total)
(!) *** ONCE [no mode found for 720x576 at 50 Hz
] *** [../systems/drmkms/drmkms_mode.c:87 in drmkms_find_mode()]
(*) DRMKMS/Layer: Supported properties for layer id 36
(*) zpos
(*) DirectFB/Core/WM: Default 0.3 (DirectFB)
(!) DRMKMS/Layer: drmModeSetCrtc( crtc_id 42, fb_id 46, xy 0,0, connector_id 34, mode 720x576@50Hz ) failed at index 1!
--> Invalid argument
(!) Core/LayerRegion: Could not set region!
--> An invalid argument has been specified
(!) Core/LayerRegion: dfb_layer_region_realize() in dfb_layer_region_flip_update() failed!
--> An invalid argument has been specified
Video Modes
720x576-32
Screen (00) DRMKMS Screen (primary screen)
Caps: MIXERS ENCODERS OUTPUTS
Mixer (0) DRMKMS Mixer
Caps: FULL
Layers (full mode): (00) (02)
Mixer (1) DRMKMS Mixer
Caps: FULL
Layers (full mode): (01)
Encoder (0) DRMKMS Encoder
Type: TV
Caps: FREQUENCY RESOLUTION
Output Resolutions: 720_480 720_576
Mixer: 0
Encoder (1) DRMKMS Encoder
Type: DIGITAL
Caps: FREQUENCY RESOLUTION
Output Resolutions: 720_480 800_600 1024_768 1280_720 1920_1080 1366_768
Mixer: 1
Output (0) DRMKMS Output
Caps: RESOLUTION
Resolutions: 720_480 720_576
Signals: CVBS
Encoder: 0
Output (1) DRMKMS Output
Caps: RESOLUTION
Resolutions: 720_480 800_600 1024_768 1280_720 1920_1080 1366_768
Signals: HDMI
Encoder: 1
Layer (01) DRMKMS Primary Layer
Type: GRAPHICS
Caps: SURFACE
Layer (00) DRMKMS Primary Layer (primary layer)
Type: GRAPHICS
Caps: SURFACE
Layer (02) DRMKMS Plane Layer 1
Type: GRAPHICS
Caps: SURFACE ALPHACHANNEL LEVELS SCREEN_POSITION
Input Device (03) meson_ao_cec (primary remote control)
Vendor ID: 0x0000
Product ID: 0x0000
Type: REMOTE
Caps: KEYS AXES
How to manually set resolution?
Yes, it is necessary to also set a resolution supported by the connector when connected-outputs=multihead is set (if the default resolution with the first connector is not supported by the other connectors). This should be improved as a correct mode could be determined automatically.
To select the HDMI connector here, I would say that /etc/directfbrc contains for example:
connected-outputs=multihead
primary-layer=1
mode=1280x720
Do you have df_andi displayed on your composite video connector with the default configuration?
i cant test composite display i dont have the cable,but the hdmi work for sure with splash-drm, i dont think its hardware problem.
i concern with "(!) *** ONCE [no mode found for 1280x720 at 0 Hz", and "!) DRMKMS/Layer: drmModeSetCrtc( crtc_id 42, fb_id 46, xy 0,0, connector_id 34, mode 720x576@50Hz ) failed at index 1!" which is connector id 34, crtc id 42 are belong to hdmi.
here are the output :
root@DeviceLink:~# df_andi
(c) 2017-2023 DirectFB2 Open Source Project (fork of DirectFB)
(c) 2012-2016 DirectFB integrated media GmbH
(c) 2001-2016 The world wide DirectFB Open Source Community
(c) 2000-2004 Convergence (integrated media) GmbH
----------------------------------------------------------------
(*) DirectFB/Core: Single Application Core. (2023-07-29 15:41)
(*) DRMKMS/System: Using device /dev/dri/card0 as specified in DirectFB configuration
(*) DRMKMS/System: Multi-head display
(*) DRMKMS/System: Found 2 connectors, 2 encoders, 2 planes
(*) DirectFB/Input: meson_ao_cec 0.1 (DirectFB)
(*) DirectFB/Input: Hot-plug detection enabled with Linux Input
(*) DirectFB/Graphics: Genefx Software Rasterizer 0.7 (DirectFB)
(!) *** ONCE [no mode found for 1280x720 at 0 Hz
] *** [../systems/drmkms/drmkms_mode.c:87 in drmkms_find_mode()]
(*) DRMKMS/Screen: Default mode is 720x576 (2 modes in total)
(*) DRMKMS/Layer: Supported properties for layer id 36
(*) zpos
(*) DirectFB/Core/WM: Default 0.3 (DirectFB)
(!) DRMKMS/Layer: drmModeSetCrtc( crtc_id 42, fb_id 46, xy 0,0, connector_id 34, mode 720x576@50Hz ) failed at index 1!
--> Invalid argument
(!) Core/LayerRegion: Could not set region!
--> An invalid argument has been specified
(!) Core/LayerRegion: dfb_layer_region_realize() in dfb_layer_region_flip_update() failed!
--> An invalid argument has been specified
(!) DRMKMS/Layer: drmModeSetCrtc( crtc_id 42, fb_id 46, xy 0,0, connector_id 34, mode 720x576@50Hz ) failed at index 1!
--> Invalid argument
(!) Core/LayerRegion: Could not set region!
--> An invalid argument has been specified
(!) Core/LayerRegion: dfb_layer_region_realize() in dfb_layer_region_flip_update() failed!
--> An invalid argument has been specified
(*) Direct/Interface: Loaded 'DGIFF' implementation of 'IDirectFBFont'
(*) Direct/Interface: Loaded 'DFIFF' implementation of 'IDirectFBImageProvider'
(!) DRMKMS/Layer: drmModeSetCrtc( crtc_id 42, fb_id 46, xy 0,0, connector_id 34, mode 720x576@50Hz ) failed at index 1!
--> Invalid argument
(!) Core/LayerRegion: Could not set region!
--> An invalid argument has been specified
(!) Core/LayerRegion: dfb_layer_region_realize() in dfb_layer_region_flip_update() failed!
--> An invalid argument has been specified
(!) DRMKMS/Layer: drmModeSetCrtc( crtc_id 42, fb_id 46, xy 0,0, connector_id 34, mode 720x576@50Hz ) failed at index 1!
--> Invalid argument
(!) Core/LayerRegion: Could not set region!
--> An invalid argument has been specified
(!) Core/LayerRegion: dfb_layer_region_realize() in dfb_layer_region_flip_update() failed!
--> An invalid argument has been specified
its work properly with this configuration
system=drmkms drmkms=/dev/dri/card0 module-dir=/lib/directfb-2.0-0 connected-outputs=multihead primary-layer=1 mode=720x480
not working with 1366x768 nor 1920x1080
im create quick patch at here,the code not clean but its work just like i want, with this patch just need to set primary-layer to corresponding connector and set mode with widthxheight@vrefresh, in this case :
primary-layer=1 mode=1366x768@60Hz
It's great that you can run DirectFB2 on your platform! I agree that the support for multiple connectors with the different possible modes needs to be improved in the drmkms system module.
Arch:ARM64 OS:Openwrt
im trying to get working on HDMI screen, i get blank screen,even set the mode manual via /etc/directfbrc not working.the SOC board have 2 connectors,composite video & HDMI. another test using psplash ported to DRM psplash-drm working succesfully. here are directFB-examples output :
root@DeviceLink:~# df_andi