Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: DRM/KMS support  (Read 1224 times)

0 Members and 1 Guest are viewing this topic.

oomek

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
    • Email
DRM/KMS support
« on: April 10, 2020, 02:55:35 am »
I'm curious what is your stance on adding an implementation of DRM/KMS subsystem on Linux.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32451
    • View Profile
    • SFML's website
    • Email
Re: DRM/KMS support
« Reply #1 on: April 10, 2020, 10:23:56 am »
When you ask for a feature, please at least explain what it is, and how it would benefit to SFML. I have no idea about what DRM/KMS is, and even after a quick search, I have no idea why we would support it in SFML.
Laurent Gomila - SFML developer

oomek

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
    • Email
Re: DRM/KMS support
« Reply #2 on: April 10, 2020, 08:43:45 pm »
DRM serves the same function a X11 to open a window and reserve a surface, but with better latency and performance as it's closer to the metal.

oomek

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
    • Email
Re: DRM/KMS support
« Reply #3 on: June 01, 2020, 09:06:41 pm »
Mickelson added DRM/KMS support for Linux and Raspbian(RPI4) to his fork sfml-pi yesterday. Would you be interested merging it now with the master? sfml-pi is still 2.4.2

https://github.com/mickelson/sfml-pi/commit/4b7d415e1464fa98689130b4f7531d9b986c1430
« Last Edit: June 01, 2020, 09:16:12 pm by oomek »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 9592
    • View Profile
    • development blog
    • Email
Re: DRM/KMS support
« Reply #4 on: June 02, 2020, 10:46:29 am »
Nice! I think if you or Mickelson want to rebase/cherry-pick the change onto SFML master, this would certainly be considered. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

oomek

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
    • Email
Re: DRM/KMS support
« Reply #5 on: June 05, 2020, 04:19:23 pm »
A little heads up.

The DRM backend is almost finished. But we stumbled across an issue that we can't find an elegant way aroud. There was a problem with rendering locking up after pressing the Enter key. We discovered that it was due to the keyboard input being passed to the terminal underneath. We solved that by grabbing an exclusive rights to all keyboard events in /dev/input by calling `ioctl(*itr, EVIOCGRAB, 1);` unfortunately this left us unavle to generate a TextEvent. Can you think of any way of converting a keycode to utf32 without relying on tables for each codepage like in SDL?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 9592
    • View Profile
    • development blog
    • Email
Re: DRM/KMS support
« Reply #6 on: September 11, 2020, 11:51:38 pm »
Did you manage to make further progress on this or are you still stuck on the same issue?
If so, maybe I could try and summon binary1248 :D
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

oomek

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
    • Email
Re: DRM/KMS support
« Reply #7 on: September 12, 2020, 12:03:19 am »
Sorry, I forgot to follow up on this topic. The SFML-PI is working ok now, all issues have been squashed. I've updated it with baseline commits up to 2.5.1, but It would be really nice to be able to merge it with the baseline. I'm just wondering if all things we've added conform with your structure.

EDIT: My 2.5.1 PR for SFML-PI is still waiting to be merged. Mickelson has sometimes long gaps in activity. I think it's what is happening now. Another reason to go SFML baseline.
« Last Edit: September 14, 2020, 03:00:13 pm by oomek »