summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 24e94f5)
raw | patch | inline | side by side (parent: 24e94f5)
author | Subhajit Paul <subhajit_paul@ti.com> | |
Tue, 17 Oct 2017 12:08:34 +0000 (12:08 +0000) | ||
committer | Karthik Ramanan <a0393906@ti.com> | |
Mon, 30 Oct 2017 06:13:42 +0000 (11:43 +0530) |
When kmscube is launched on all displays using kmscube -a,
drmModeSetCrtc is called on all CRTCs. It is required to
call drmModePageFlip for all the CRTCs as well.
Signed-off-by: Subhajit Paul <subhajit_paul@ti.com>
drmModeSetCrtc is called on all CRTCs. It is required to
call drmModePageFlip for all the CRTCs as well.
Signed-off-by: Subhajit Paul <subhajit_paul@ti.com>
kmscube.c | patch | blob | history |
diff --git a/kmscube.c b/kmscube.c
index e8c90d4b1f0969c6686fa2312fb7e58e9de50805..f0b1d6e4a3b9e17585c2fa571e85a3f0838dcf75 100644 (file)
--- a/kmscube.c
+++ b/kmscube.c
unsigned int sec, unsigned int usec, void *data)
{
int *waiting_for_flip = data;
- *waiting_for_flip = 0;
+ *waiting_for_flip = *waiting_for_flip - 1;
}
void print_usage()
while (frame_count != 0) {
struct gbm_bo *next_bo;
- int waiting_for_flip = 1;
+ int waiting_for_flip;
+ int cc;
draw(i++);
* hw composition
*/
- ret = drmModePageFlip(drm.fd, drm.crtc_id[DISP_ID], fb->fb_id,
- DRM_MODE_PAGE_FLIP_EVENT, &waiting_for_flip);
- if (ret) {
- printf("failed to queue page flip: %s\n", strerror(errno));
- return -1;
+ if (all_display) {
+ for (cc=0;cc<drm.ndisp; cc++) {
+ ret = drmModePageFlip(drm.fd, drm.crtc_id[cc], fb->fb_id,
+ DRM_MODE_PAGE_FLIP_EVENT, &waiting_for_flip);
+ if (ret) {
+ printf("failed to queue page flip: %s\n", strerror(errno));
+ return -1;
+ }
+ }
+ waiting_for_flip = drm.ndisp;
+ } else {
+ ret = drmModePageFlip(drm.fd, drm.crtc_id[DISP_ID], fb->fb_id,
+ DRM_MODE_PAGE_FLIP_EVENT, &waiting_for_flip);
+ if (ret) {
+ printf("failed to queue page flip: %s\n", strerror(errno));
+ return -1;
+ }
+ waiting_for_flip = 1;
}
while (waiting_for_flip) {