[v4] Query property when checking availability of virtual displays
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 the CRTCs 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
.
The virtual display feature in drm-hwcomposer
is experimental and currently unused. To address test failures, modify the function getMaxVirtualDisplayCount
to return 0 unless the property vendor.hwc.drm.enable_virtual_display
is explicitly set to true.
More context:
- Original issue: #102 (closed)
- [v1] merge request: !275 (closed)
- Suggested changing the implementation of
getMaxVirtualDisplayCount
to report virtual display count based on available CRTCs.
- Suggested changing the implementation of
- [v2] merge request: !278 (closed)
- Suggested changing the implementation of
getMaxVirtualDisplayCount
to report virtual display count based on available pipelines.
- Suggested changing the implementation of
- [v3]: Used
debug.sf.enable_hwc_vds
, which tiesdrm-hwcomposer
tosurfaceflinger
where the two should be uncoupled. Replaced with adrm-composer
specific property,vendor.hwc.drm.enable_virtual_display
, in v4.