mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2025-01-20 10:26:58 +01:00
test/libdrm_mock: add prefix to logs
Allows to easily tell where they're coming from.
This commit is contained in:
parent
6d4e22a5f8
commit
46095c6428
1 changed files with 14 additions and 13 deletions
|
@ -263,8 +263,9 @@ static void apply_atomic_req(drmModeAtomicReq *req)
|
||||||
plane = liftoff_mock_drm_get_plane(prop->obj_id);
|
plane = liftoff_mock_drm_get_plane(prop->obj_id);
|
||||||
prop_index = get_prop_index(prop->prop_id);
|
prop_index = get_prop_index(prop->prop_id);
|
||||||
plane->prop_values[prop_index] = prop->value;
|
plane->prop_values[prop_index] = prop->value;
|
||||||
fprintf(stderr, "plane %"PRIu32": setting %s = %"PRIu64"\n",
|
fprintf(stderr, "libdrm_mock: plane %"PRIu32": "
|
||||||
plane->id, plane_props[prop_index].name, prop->value);
|
"setting %s = %"PRIu64"\n", plane->id,
|
||||||
|
plane_props[prop_index].name, prop->value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,23 +300,23 @@ int drmModeAtomicCommit(int fd, drmModeAtomicReq *req, uint32_t flags,
|
||||||
has_crtc = crtc_id != 0;
|
has_crtc = crtc_id != 0;
|
||||||
|
|
||||||
if (has_fb != has_crtc) {
|
if (has_fb != has_crtc) {
|
||||||
fprintf(stderr, "plane %u: both FB_ID and CRTC_ID must "
|
fprintf(stderr, "libdrm_mock: plane %u: both FB_ID and "
|
||||||
"be set or unset together (FB_ID = %"PRIu64", "
|
"CRTC_ID must be set or unset together "
|
||||||
"CRTC_ID = %"PRIu64")\n", plane->id, fb_id,
|
"(FB_ID = %"PRIu64", CRTC_ID = %"PRIu64")\n",
|
||||||
crtc_id);
|
plane->id, fb_id, crtc_id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (has_fb) {
|
if (has_fb) {
|
||||||
if (crtc_id != liftoff_mock_drm_crtc_id) {
|
if (crtc_id != liftoff_mock_drm_crtc_id) {
|
||||||
fprintf(stderr, "plane %u: invalid CRTC_ID\n",
|
fprintf(stderr, "libdrm_mock: plane %u: "
|
||||||
plane->id);
|
"invalid CRTC_ID\n", plane->id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
layer = mock_fb_get_layer(fb_id);
|
layer = mock_fb_get_layer(fb_id);
|
||||||
if (layer == NULL) {
|
if (layer == NULL) {
|
||||||
fprintf(stderr, "plane %u: invalid FB_ID\n",
|
fprintf(stderr, "libdrm_mock: plane %u: "
|
||||||
plane->id);
|
"invalid FB_ID\n", plane->id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
found = false;
|
found = false;
|
||||||
|
@ -326,9 +327,9 @@ int drmModeAtomicCommit(int fd, drmModeAtomicReq *req, uint32_t flags,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
fprintf(stderr, "plane %u: layer %p is not "
|
fprintf(stderr, "libdrm_mock: plane %u: "
|
||||||
"compatible\n", plane->id,
|
"layer %p is not compatible\n",
|
||||||
(void *)layer);
|
plane->id, (void *)layer);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue