In GBM images we can find the plane details, e.g. this is from an Amlogic S905 board:
2025-01-20 19:16:58.075 T:734 info <general>: CDRMUtils::FindConnector - using connector: HDMI-A-1
2025-01-20 19:16:58.075 T:734 info <general>: CDRMUtils::FindEncoder - using encoder: 34
2025-01-20 19:16:58.075 T:734 debug <general>: CDRMUtils::FindCrtc - original crtc mode: 3840x2160 @ 60 Hz
2025-01-20 19:16:58.075 T:734 info <general>: CDRMUtils::FindPlanes - using crtc: 43
2025-01-20 19:16:58.075 T:734 debug <general>: CDRMUtils::FindPlanes - using video plane 40
2025-01-20 19:16:58.075 T:734 debug <general>: CDRMUtils::FindPlanes - using gui plane 37
2025-01-20 19:16:58.076 T:734 debug <general>: CDRMAtomic::InitDrm - initialized atomic DRM
The GUI is using plane 37 so we can check the plane capabilities using modetest output:
Planes:
id crtc fb CRTC x,y x,y gamma size possible crtcs
37 43 49 0,0 0,0 0 0x000000ff
formats: AR24 AB24 XR24 XB24 RG24 RG16
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 1
30 IN_FORMATS:
flags: immutable blob
blobs:
value:
01000000000000000600000018000000
01000000300000004152323441423234
58523234584232345247323452473136
3f000000000000000000000000000000
0000000000000000
in_formats blob decoded:
AR24: LINEAR(0x0)
AB24: LINEAR(0x0)
XR24: LINEAR(0x0)
XB24: LINEAR(0x0)
RG24: LINEAR(0x0)
RG16: LINEAR(0x0)
39 zpos:
flags: immutable range
values: 1 1
value: 1
Display More
Here you can see that the plane supports LINEAR formats.
From the 'Nouveau' GBM kodi.log:
2025-01-23 16:04:45.957 T:917 info <general>: CDRMUtils::FindConnector - using connector: DVI-D-1
2025-01-23 16:04:45.957 T:917 info <general>: CDRMUtils::FindEncoder - using encoder: 45
2025-01-23 16:04:45.957 T:917 debug <general>: CDRMUtils::FindCrtc - original crtc mode: 1920x1080 @ 60 Hz
2025-01-23 16:04:45.957 T:917 info <general>: CDRMUtils::FindPlanes - using crtc: 39
2025-01-23 16:04:45.957 T:917 debug <general>: CDRMUtils::FindPlanes - using gui plane 38
2025-01-23 16:04:45.957 T:917 debug <general>: CDRMLegacy::InitDrm - initialized legacy DRM
Plane 38 has the following capabilities:
Planes:
id crtc fb CRTC x,y x,y gamma size possible crtcs
38 39 61 0,0 0,0 0 0x00000001
formats: XR24 RG16 XR15
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 1
Folks on IRC said "Seems like the GPU doesn't like the pushbuf due to an invalid render target format. I would guess the framebuffer isn't properly set at the time of the flush and the userspace driver just flushes the current (invalid) state, which has the GPU grumpy." and also "you can't use a linear frontbuffer with depth" .. not clear to me if that refers to zpos or alpha-channel.
I've opened https://github.com/xbmc/xbmc/issues/26345 to discuss with Kodi devs.
In the background I also created this:
--- a/xbmc/windowing/gbm/drm/DRMUtils.cpp
+++ b/xbmc/windowing/gbm/drm/DRMUtils.cpp
@@ -191,7 +191,7 @@ bool CDRMUtils::FindPlanes()
auto videoPlane = std::find_if(m_planes.begin(), m_planes.end(), [&i](auto& plane) {
if (plane->GetPossibleCrtcs() & (1 << i))
{
- return plane->SupportsFormat(DRM_FORMAT_NV12);
+ return (plane->SupportsFormat(DRM_FORMAT_NV12) || plane->SupportsFormat(DRM_FORMAT_XRGB8888));
}
return false;
});
@@ -206,7 +206,8 @@ bool CDRMUtils::FindPlanes()
if (plane->GetPossibleCrtcs() & (1 << i))
{
return (plane->GetPlaneId() != videoPlaneId &&
- (videoPlaneId == 0 || plane->SupportsFormat(DRM_FORMAT_ARGB8888)) &&
+ (videoPlaneId == 0 || plane->SupportsFormat(DRM_FORMAT_ARGB8888) ||
+ plane->SupportsFormat(DRM_FORMAT_XRGB8888)) &&
(plane->SupportsFormat(DRM_FORMAT_XRGB2101010) ||
plane->SupportsFormat(DRM_FORMAT_XRGB8888)));
}
Display More
This is partly inspired by a patch previously used with Odroid XU4 boards that don't support YUV formats and needed some extra help to use XRGB8888 output, but I'm honestly guessing in the wind. I'm not sure there's a real issue with selecting planes (as we select a plane) but I'm interested to see if anything changes - so please update to the latest images pushed to my test share and do the usual log sharing again.