Skip to content

drm_hwcomposer: Report virtual display count based on available CRTCs

The current implementation of "getMaxVirtualDisplayCount" function relies on the number of writeback connectors, but doesn't consider the availability of CRTCs. Since CRTCs can only be bound to a single pipeline, even though there are available writeback connectors, we might fail to create a virtual pipeline if they are being used.

This leads to failures in the "CreateVirtualDisplay" and "SetOutputBuffer" VTS tests because the tests expect the creation of a virtual pipeline to work based on the positive value returned by "getMaxVirtualDisplayCount".

Fix that by introducing a new method, "GetAvailableCrtcsCount", that accurately counts the number of unbound CRTCs across all DRM devices. Then, update "GetWritebackConnectorsCount" function to use this count, ensuring that the reported virtual display count reflects the actual available resources.

Edited by Paz Zcharya

Merge request reports

Loading