modesetting: Use don't skip planes that are not on the current crtc

This breaks on some nvidia cards.

Fixes: ed49ae8fe7

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
stefan11111
2025-11-29 16:10:54 +02:00
committed by Enrico Weigelt
parent 609ea42a62
commit 5ade87efc7

View File

@@ -2692,9 +2692,21 @@ drmmode_crtc_create_planes(xf86CrtcPtr crtc, int num)
}
case DRMMODE_PLANE_TYPE_PRIMARY:
{
/* If this plane is not on this crtc, skip it */
/* Prefer planes that are on this CRTC already */
if (plane_crtc != drmmode_crtc->mode_crtc->crtc_id) {
drmModeFreePlane(kplane);
/* If this is the only plane we have, it's the best we have */
if (!best_plane) {
best_plane = plane_id;
best_kplane = kplane;
blob_id = drmmode_prop_get_value(&tmp_props[DRMMODE_PLANE_IN_FORMATS],
props, 0);
async_blob_id = drmmode_prop_get_value(&tmp_props[DRMMODE_PLANE_IN_FORMATS_ASYNC],
props, 0);
drmmode_prop_info_copy(drmmode_crtc->props_plane, tmp_props,
DRMMODE_PLANE__COUNT, 1);
} else {
drmModeFreePlane(kplane);
}
drmModeFreeObjectProperties(props);
continue;
}