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

Summary: [PATCH] Uninitialized KMSDRM fixes
Product: SDL Reporter: Sergey Zhuravlevich <zhurxx>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus
Version: 2.0.9   
Hardware: ARM   
OS: Linux   
Attachments: [PATCH] Uninitialized KMSDRM fixes

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.