cancel
Showing results for 
Search instead for 
Did you mean: 

Direct use of SDL with kms / drm

Adrian1
Associate III

Hello,

I use SDL with X11 for now but I want to use it directly with kms/drm kernel driver. I run basic_splash_drm and it works.

I don't know how to configure sdl to work together with kms/drm, somebody use it in this way ?

Regards,

Adrian

2 REPLIES 2
AntonioST
ST Employee

You need to configure libsdl2 with option

--enable-video-kmsdrm

because kmsdrm is not enabled by default. Then you also need to disable the unsupported OpenGL, otherwise libsdl2 fails to detect OpenGLES and OpenGLES2

--disable-video-opengl

With the two flags above, drmkms is already working, but libsdl2 detects the GPU of STM32MP1xx as Vivante, and try to use an internal driver that does not work with STM32MP1xx. To skip this auto-detection, you can either specify the preferred video driver in the libsdl2 specific global variable, before running your application:

export SDL_VIDEODRIVER=kmsdrm

or disable the Vivante driver at libsdl2 configuration time, adding:

--disable-video-vivante

Hi AntonioST

 

i have also facing same problem. i have compile binary with STM32CUBE IDE and run on STM32mp2_EVK board. 
work fine with WAYLAND as configuration 1. but

with Configuration 2 (SDL2 and KMSDRM) not work, nothing display. 
i try with export SDL_VIDEODRIVER=kmsdrm bot not work.
try to getCurrentVideoDriver = offscreen. 

maybe kmsdrm is not enabled. 

i follow this (STM32MP LVGL ) tutorial and want to drive Configuration 2 setup. 

what i have already achived:

configuration 1: success no issue 

configuration 2 : nothing display ( i preferred this)

configuration 3: work but touch not work correclty.

can you please help me to resolve the problem.

Thanks.