We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4404 - [PATCH] Uninitialized KMSDRM fixes
Summary: [PATCH] Uninitialized KMSDRM fixes
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.9
Hardware: ARM Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-30 12:11 UTC by Sergey Zhuravlevich
Modified: 2018-12-01 18:09 UTC (History)
1 user (show)

See Also:


Attachments
[PATCH] Uninitialized KMSDRM fixes (3.26 KB, patch)
2018-11-30 12:11 UTC, Sergey Zhuravlevich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Zhuravlevich 2018-11-30 12:11:41 UTC
Created attachment 3516 [details]
[PATCH] Uninitialized KMSDRM fixes

On our imx6 based etnaviv platform when CONFIG_DRM_FBDEV_EMULATION is disabled KMSDRM is not initialized by default, thus SDL2 can't use it. The attached patch fixes few things:

    * Search for valid encoder in connector when it doesn't have an
      encoder ID set.

    * Search for valid CRTC in resources and encoder's possible CRTCs
      when encoder doesn't have one set.

    * Select default mode if CRTC doesn't have a valid one.

    * Pick current_mode's W/H/Refresh Rate basing on current and
      valid CRTC mode, not the saved one.
Comment 1 Ryan C. Gordon 2018-12-01 18:09:38 UTC
This patch is now https://hg.libsdl.org/SDL/rev/2b450a35f471, thanks!

--ryan.