mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
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:
committed by
Enrico Weigelt
parent
609ea42a62
commit
5ade87efc7
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user