Log layer configuration before alloc

This commit is contained in:
Simon Ser 2019-12-12 23:40:01 +01:00
parent dcca965fc1
commit c9cdf8ec50
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
3 changed files with 20 additions and 0 deletions

View file

@ -591,6 +591,8 @@ bool liftoff_output_apply(struct liftoff_output *output, drmModeAtomicReq *req)
return true; return true;
} }
output_log_layers(output);
/* Unset all existing plane and layer mappings. */ /* Unset all existing plane and layer mappings. */
liftoff_list_for_each(plane, &device->planes, link) { liftoff_list_for_each(plane, &device->planes, link) {
if (plane->layer != NULL && plane->layer->output == output) { if (plane->layer != NULL && plane->layer->output == output) {

View file

@ -90,4 +90,6 @@ struct liftoff_plane_property *plane_get_property(struct liftoff_plane *plane,
bool plane_apply(struct liftoff_plane *plane, struct liftoff_layer *layer, bool plane_apply(struct liftoff_plane *plane, struct liftoff_layer *layer,
drmModeAtomicReq *req, bool *compatible); drmModeAtomicReq *req, bool *compatible);
void output_log_layers(struct liftoff_output *output);
#endif #endif

View file

@ -1,4 +1,5 @@
#include <assert.h> #include <assert.h>
#include <inttypes.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <sys/types.h> #include <sys/types.h>
@ -49,3 +50,18 @@ void liftoff_output_set_composition_layer(struct liftoff_output *output,
} }
output->composition_layer = layer; output->composition_layer = layer;
} }
void output_log_layers(struct liftoff_output *output) {
struct liftoff_layer *layer;
size_t i;
liftoff_log(LIFTOFF_DEBUG, "Layers on CRTC %"PRIu32":", output->crtc_id);
liftoff_list_for_each(layer, &output->layers, link) {
liftoff_log(LIFTOFF_DEBUG, " Layer %p:", (void *)layer);
for (i = 0; i < layer->props_len; i++) {
liftoff_log(LIFTOFF_DEBUG, " %s = %"PRIu64,
layer->props[i].name,
layer->props[i].value);
}
}
}