chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-rtnl: introduce sd_rtnl_new_from_netlink
[elogind.git]
/
src
/
libsystemd-terminal
/
grdev.c
diff --git
a/src/libsystemd-terminal/grdev.c
b/src/libsystemd-terminal/grdev.c
index a700a7316bb2e3351839909e418d8b4248d512ac..3b3cf2737bbf59a6538c218cd2627722912037be 100644
(file)
--- a/
src/libsystemd-terminal/grdev.c
+++ b/
src/libsystemd-terminal/grdev.c
@@
-393,28
+393,19
@@
const grdev_display_target *grdev_display_next_target(grdev_display *display, co
return NULL;
}
return NULL;
}
-void grdev_display_flip_target(grdev_display *display, const grdev_display_target *target
, uint64_t age
) {
+void grdev_display_flip_target(grdev_display *display, const grdev_display_target *target) {
grdev_display_cache *cache;
grdev_display_cache *cache;
- size_t i;
assert(display);
assert(!display->modified);
assert(display->enabled);
assert(target);
assert(display);
assert(!display->modified);
assert(display->enabled);
assert(target);
- assert(target->back);
cache = container_of(target, grdev_display_cache, target);
assert(cache->pipe);
assert(cache->pipe->tile->display == display);
cache = container_of(target, grdev_display_cache, target);
assert(cache->pipe);
assert(cache->pipe->tile->display == display);
- /* reset age of all FB on overflow */
- if (age < target->back->age)
- for (i = 0; i < cache->pipe->max_fbs; ++i)
- if (cache->pipe->fbs[i])
- cache->pipe->fbs[i]->age = 0;
-
- ((grdev_fb*)target->back)->age = age;
cache->pipe->flip = true;
}
cache->pipe->flip = true;
}
@@
-586,8
+577,8
@@
static bool display_cache(grdev_display *display) {
out:
if (r < 0)
out:
if (r < 0)
- log_debug
("grdev: %s/%s: cannot cache pipes: %s
",
-
display->session->name, display->name, strerror(-r)
);
+ log_debug
_errno(r, "grdev: %s/%s: cannot cache pipes: %m
",
+
display->session->name, display->name
);
return true;
}
return true;
}
@@
-717,7
+708,7
@@
void grdev_pipe_ready(grdev_pipe *pipe, bool running) {
/* grdev_pipe_ready() is used by backends to notify about pipe state
* changed. If a pipe is ready, it can be fully used by us (available,
/* grdev_pipe_ready() is used by backends to notify about pipe state
* changed. If a pipe is ready, it can be fully used by us (available,
- * enabled and access
a
ble). Backends can disable pipes at any time
+ * enabled and access
i
ble). Backends can disable pipes at any time
* (like for async revocation), but can only enable them from parent
* context. Otherwise, we might call user-callbacks recursively. */
* (like for async revocation), but can only enable them from parent
* context. Otherwise, we might call user-callbacks recursively. */
@@
-781,8
+772,8
@@
void grdev_pipe_schedule(grdev_pipe *pipe, uint64_t frames) {
return;
error:
return;
error:
- log_debug
("grdev: %s/%s/%s: cannot schedule vsync timer: %s
",
-
pipe->card->session->name, pipe->card->name, pipe->name, strerror(-r)
);
+ log_debug
_errno(r, "grdev: %s/%s/%s: cannot schedule vsync timer: %m
",
+
pipe->card->session->name, pipe->card->name, pipe->name
);
}
/*
}
/*
@@
-1185,8
+1176,8
@@
void grdev_session_add_drm(grdev_session *session, struct udev_device *ud) {
r = grdev_drm_card_new(&card, session, ud);
if (r < 0) {
r = grdev_drm_card_new(&card, session, ud);
if (r < 0) {
- log_debug
("grdev: %s: cannot add DRM device for %s: %s
",
-
session->name, udev_device_get_syspath(ud), strerror(-r
));
+ log_debug
_errno(r, "grdev: %s: cannot add DRM device for %s: %m
",
+
session->name, udev_device_get_syspath(ud
));
return;
}
return;
}
@@
-1278,8
+1269,8
@@
static void session_configure(grdev_session *session) {
} else if (!display) {
r = grdev_display_new(&display, session, pipe->name);
if (r < 0) {
} else if (!display) {
r = grdev_display_new(&display, session, pipe->name);
if (r < 0) {
- log_debug
("grdev: %s/%s: cannot create display for pipe %s: %s
",
-
session->name, card->name, pipe->name, strerror(-r)
);
+ log_debug
_errno(r, "grdev: %s/%s: cannot create display for pipe %s: %m
",
+
session->name, card->name, pipe->name
);
continue;
}
}
continue;
}
}