Bug 1156 - Newt EGL/GBM (KMS) driver
Summary: Newt EGL/GBM (KMS) driver
Alias: None
Product: Jogl
Classification: JogAmp
Component: embedded (show other bugs)
Version: 2
Hardware: embedded_all linux
: --- major
Assignee: Sven Gothel
Depends on:
Reported: 2015-04-24 14:11 CEST by Erik De Rijcke
Modified: 2015-05-12 22:34 CEST (History)
0 users

See Also:
SCM Refs:
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Erik De Rijcke 2015-04-24 14:11:27 CEST

I'm writing a poc NEWT driver that uses KMS. 

I managed to setup a display but somehow newt does not find a valid gl profile (it finds nothing). I have no idea why this is. This is the output that I get: http://hastebin.com/raw/tinojegadi

I base myself on this C project: https://github.com/robclark/kmscube/blob/master/kmscube.c

My code can be found here: 

and can be run with this oneliner (outside of X as it uses KMS!): 
mvn clean package assembly:assembly && java -Dnativewindow.ws.name=com.github.zubnix.kmscube.kmsdriver -Dnewt.debug=all -jar target/kmscube-jogl-1.0-SNAPSHOT-static.jar 

Does anyone have an idea what's going on? To me it looks like it tries to contact X for some bizarre reason...
Comment 1 Erik De Rijcke 2015-04-24 14:19:41 CEST
21:11 < zubzub> sgothel: I think the root cause of the bug is GLProfile's implementation when using EGL
21:12 < zubzub> it seems to revert to the default display or something
21:12 < zubzub> which causes an default egl abstract graphics device to be created
21:12 < zubzub> which causes eglGetDisplay(0) to be called
21:12 < zubzub> which is not supported under gbm/kms
21:13 < zubzub> which results in libEGL trying to connect to X
21:13 < zubzub> which obviously fails
21:13 < zubzub> it's hard to debug because I have to switch between vt's when doing a testrun :)
21:13 < zubzub> ie X can not display stuff once the kms/egl/jogl program is running]
Comment 2 Erik De Rijcke 2015-04-24 14:20:38 CEST
22:21 <+sgothel> @Zuzub: right - EGLDrawableFactory's initialization might be the issue
22:21 <+sgothel> so we have to use that EGL/platform extension if available .. w/ the 'to be probed platform values'
Comment 3 Erik De Rijcke 2015-05-12 22:34:01 CEST
I decided to write a gbm NEWT driver directly in the jogl project.

Progress here: