Multiple issues here:
1) Don't print excessive card dumps on each resync. Disable it and make
developers add it themselves.
2) Ignore EINVAL on page-flips. Some cards don't support page-flips, so
we'd print it on each frame. Maybe, at some point, the kernel will add
support to retrieve capabilities for that. Until then, simply ignore
it.
3) Replace the now dropped card-dump with a short message about resyncing
the card.
r = ioctl(card->fd, DRM_IOCTL_MODE_PAGE_FLIP, &page_flip);
if (r < 0) {
r = -errno;
r = ioctl(card->fd, DRM_IOCTL_MODE_PAGE_FLIP, &page_flip);
if (r < 0) {
r = -errno;
- log_debug("grdrm: %s: cannot schedule page-flip on crtc %" PRIu32 ": %m",
- card->base.name, crtc->object.id);
+ /* Avoid excessive logging on EINVAL; it is currently not
+ * possible to see whether cards support page-flipping, so
+ * avoid logging on each frame. */
+ if (r != -EINVAL)
+ log_debug("grdrm: %s: cannot schedule page-flip on crtc %" PRIu32 ": %m",
+ card->base.name, crtc->object.id);
if (grdrm_card_async(card, r))
return r;
if (grdrm_card_async(card, r))
return r;
if (!card->running)
return;
if (!card->running)
return;
+ log_debug("grdrm: %s/%s: reconfigure card", card->base.session->name, card->base.name);
+
card->ready = false;
r = grdrm_card_resync(card);
if (r < 0) {
card->ready = false;
r = grdrm_card_resync(card);
if (r < 0) {
grdev_session_pin(card->base.session);
grdev_session_pin(card->base.session);
- grdrm_card_print(card);
+ /* debug statement to print card information */
+ if (0)
+ grdrm_card_print(card);
+
grdrm_card_configure(card);
card->ready = true;
grdrm_card_configure(card);
card->ready = true;