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 5364

Summary: Raspberry pi 4 won't recognize the second display (kmsdrm video driver)
Product: SDL Reporter: svenvd.github
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: WAITING --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: danintheshed
Version: 2.0.12   
Hardware: ARM   
OS: Linux   

Description svenvd.github 2020-11-24 13:13:44 UTC
Hi,

SDL (SDL_GetNumVideoDisplays) does not recognize the second display on a raspberry pi 4 when running with no X11(kmsdrm video driver). Higher level libraries,like pygame thus can not assign a display for particular output.

More information can be found here.

https://github.com/pygame/pygame/issues/2356

Thanks
Comment 1 Dan Lawrence 2020-11-24 13:31:49 UTC
You can see that the kmsdrm driver is just assuming a single display here, in multiple lines like this one:

    dispdata = (SDL_DisplayData *)SDL_GetDisplayDriverData(0); //viddata->devindex);

meanwhile other video drivers that do have multi_display support do things like:

    SDL_DisplayData *pData =(SDL_DisplayData*)SDL_GetDisplayDriverData(displayIndex);


Looking back on this thread when the driver was first created:

https://discourse.libsdl.org/t/kms-drm-context-for-the-gl-gles-renderer/21813/11

it seems it was discussed and multiple displays being 'out of scope' was mentioned.
Comment 2 Sam Lantinga 2020-11-24 15:37:16 UTC
Multiple displays are no longer out of scope. I don't have a test setup for this, does anyone have a patch they'd like considered for inclusion that supports this?