Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 656000 - media-libs/libsdl2: kms and videocore support
Summary: media-libs/libsdl2: kms and videocore support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-18 07:53 UTC by barbudreadmon
Modified: 2018-05-26 21:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description barbudreadmon 2018-05-18 07:53:30 UTC
Upstream has added support for kms and proper videocore configure options in libSDL2.
This ebuild is a good example of how to implement it (i got libsdl2 working properly with kms on my raspberry thanks to it) : https://github.com/barbudreadmon/abendbrot/blob/master/media-libs/libsdl2/libsdl2-2.0.8-r1.ebuild

Reproducible: Always
Comment 1 James Le Cuirot gentoo-dev 2018-05-21 12:05:09 UTC
Cool, I've been looking forward to KMS support so I'll give it a try.
Comment 2 James Le Cuirot gentoo-dev 2018-05-22 23:04:21 UTC
I'll change the videocore flag to video_cards_vc4 as users will already have this set where necessary.

I've given this a try but with little success so far. I tried Neverball but it dies with "Could not create EGL window surface". Not sure why as I've done GL under KMS on my other (ARM) system before. It also totally locks out my VT to the extent that I have to SSH from my phone to call chvt! I am then unable to reuse that VT and have to use a different one the next time.
Comment 3 James Le Cuirot gentoo-dev 2018-05-26 20:11:23 UTC
Digging a little deeper, I found that eglCreateWindowSurface fails with EGL_BAD_MATCH. I thought it might be because of the following change in Mesa but I had a naive stab at fixing SDL accordingly and it didn't work. I'm out of my depth here.

https://lists.freedesktop.org/archives/mesa-dev/2018-February/184807.html
Comment 4 Larry the Git Cow gentoo-dev 2018-05-26 21:38:04 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4ac42c0809428ada79ce54d2dae32860d73af50

commit d4ac42c0809428ada79ce54d2dae32860d73af50
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2018-05-26 21:36:28 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2018-05-26 21:37:55 +0000

    media-libs/libsdl2: Add kms and video_cards_vc4 USE flags
    
    I haven't managed to get this to work but this is probably an upstream
    issue so I'm adding the flag anyway. It may even work on slightly
    older Mesa verions. See our bug report for details. No revbump as few
    people will want this.
    
    Closes: https://bugs.gentoo.org/656000
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 media-libs/libsdl2/libsdl2-2.0.8-r2.ebuild | 12 ++++++++++--
 media-libs/libsdl2/metadata.xml            |  1 +
 2 files changed, 11 insertions(+), 2 deletions(-)