Skip to content

Commit 74ed0d9

Browse files
committed
specify CRTC_ID property
1 parent b4bc1d6 commit 74ed0d9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/modesetting.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,6 +1906,7 @@ struct kms_req_builder *drmdev_create_request_builder(struct drmdev *drmdev, uin
19061906
// right now they're the same, but they might not be in the future.
19071907
builder->use_legacy = !supports_atomic_modesetting;
19081908
builder->supports_atomic = supports_atomic_modesetting;
1909+
builder->connector = NULL;
19091910
builder->crtc = crtc;
19101911
builder->req = req;
19111912
builder->next_zpos = min_zpos;
@@ -2341,6 +2342,11 @@ static int kms_req_commit_common(
23412342
/// TODO: Can we set OUT_FENCE_PTR even though we didn't set any IN_FENCE_FDs?
23422343
flags = DRM_MODE_PAGE_FLIP_EVENT | (blocking ? 0 : DRM_MODE_ATOMIC_NONBLOCK) | (update_mode ? DRM_MODE_ATOMIC_ALLOW_MODESET : 0);
23432344

2345+
if (builder->connector != NULL) {
2346+
// add the CRTC_ID property if that was explicitly set
2347+
drmModeAtomicAddProperty(builder->req, builder->connector->id, builder->connector->ids.crtc_id, builder->crtc->id);
2348+
}
2349+
23442350
/// TODO: If we're on raspberry pi and only have one layer, we can do an async pageflip
23452351
/// on the primary plane to replace the next queued frame. (To do _real_ triple buffering
23462352
/// with fully decoupled framerate, potentially)

0 commit comments

Comments
 (0)