mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2024-12-25 21:59:11 +01:00
Remove primary plane special case
This doesn't work on i915. 8a971695bd
("test: introduce
liftoff_mock_require_primary_plane") makes sure we catch this in
the tests.
This commit is contained in:
parent
bc0d0617ac
commit
73f4867ba1
3 changed files with 16 additions and 29 deletions
10
alloc.c
10
alloc.c
|
@ -127,7 +127,7 @@ plane_step_init_next(struct alloc_step *step, struct alloc_step *prev,
|
|||
if (layer != NULL) {
|
||||
zpos_prop = layer_get_property(layer, "zpos");
|
||||
}
|
||||
if (zpos_prop != NULL && plane->type != DRM_PLANE_TYPE_PRIMARY) {
|
||||
if (zpos_prop != NULL) {
|
||||
step->last_layer_zpos = zpos_prop->value;
|
||||
} else {
|
||||
step->last_layer_zpos = prev->last_layer_zpos;
|
||||
|
@ -212,9 +212,6 @@ has_allocated_layer_over(struct liftoff_output *output, struct alloc_step *step,
|
|||
if (i >= (ssize_t)step->plane_idx) {
|
||||
break;
|
||||
}
|
||||
if (other_plane->type == DRM_PLANE_TYPE_PRIMARY) {
|
||||
continue;
|
||||
}
|
||||
|
||||
other_layer = step->alloc[i];
|
||||
if (other_layer == NULL) {
|
||||
|
@ -253,9 +250,6 @@ has_allocated_plane_under(struct liftoff_output *output,
|
|||
if (i >= (ssize_t)step->plane_idx) {
|
||||
break;
|
||||
}
|
||||
if (other_plane->type == DRM_PLANE_TYPE_PRIMARY) {
|
||||
continue;
|
||||
}
|
||||
if (step->alloc[i] == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
@ -311,7 +305,7 @@ check_layer_plane_compatible(struct alloc_step *step,
|
|||
}
|
||||
}
|
||||
|
||||
if (plane->type != DRM_PLANE_TYPE_PRIMARY &&
|
||||
if (layer != layer->output->composition_layer &&
|
||||
has_composited_layer_over(output, step, layer)) {
|
||||
liftoff_log(LIFTOFF_DEBUG,
|
||||
"%s Layer %p -> plane %"PRIu32": "
|
||||
|
|
11
plane.c
11
plane.c
|
@ -119,15 +119,9 @@ liftoff_plane_create(struct liftoff_device *device, uint32_t id)
|
|||
}
|
||||
|
||||
/* During plane allocation, we will use the plane list order to fill
|
||||
* planes with FBs. Primary planes need to be filled first, then planes
|
||||
* far from the primary planes, then planes closer and closer to the
|
||||
* primary plane. */
|
||||
if (plane->type == DRM_PLANE_TYPE_PRIMARY) {
|
||||
liftoff_list_insert(&device->planes, &plane->link);
|
||||
} else {
|
||||
* planes with FBs. */
|
||||
liftoff_list_for_each(cur, &device->planes, link) {
|
||||
if (cur->type != DRM_PLANE_TYPE_PRIMARY &&
|
||||
plane->zpos >= cur->zpos) {
|
||||
if (plane->zpos >= cur->zpos) {
|
||||
liftoff_list_insert(cur->link.prev, &plane->link);
|
||||
break;
|
||||
}
|
||||
|
@ -136,7 +130,6 @@ liftoff_plane_create(struct liftoff_device *device, uint32_t id)
|
|||
if (plane->link.next == NULL) { /* not inserted */
|
||||
liftoff_list_insert(device->planes.prev, &plane->link);
|
||||
}
|
||||
}
|
||||
|
||||
return plane;
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ static struct test_case tests[] = {
|
|||
.height = 1080,
|
||||
.zpos = 1,
|
||||
.compat = { PRIMARY_PLANE },
|
||||
.result = PRIMARY_PLANE,
|
||||
.result = NULL,
|
||||
},
|
||||
{
|
||||
.width = 100,
|
||||
|
@ -190,7 +190,7 @@ static struct test_case tests[] = {
|
|||
.height = 1080,
|
||||
.zpos = 1,
|
||||
.compat = { PRIMARY_PLANE },
|
||||
.result = PRIMARY_PLANE,
|
||||
.result = NULL,
|
||||
},
|
||||
{
|
||||
.width = 100,
|
||||
|
@ -218,7 +218,7 @@ static struct test_case tests[] = {
|
|||
.height = 1080,
|
||||
.zpos = 1,
|
||||
.compat = { PRIMARY_PLANE },
|
||||
.result = PRIMARY_PLANE,
|
||||
.result = NULL,
|
||||
},
|
||||
{
|
||||
.width = 100,
|
||||
|
@ -282,7 +282,7 @@ static struct test_case tests[] = {
|
|||
.height = 1080,
|
||||
.zpos = 1,
|
||||
.compat = { PRIMARY_PLANE },
|
||||
.result = PRIMARY_PLANE,
|
||||
.result = NULL,
|
||||
},
|
||||
{
|
||||
.width = 100,
|
||||
|
@ -394,7 +394,7 @@ static struct test_case tests[] = {
|
|||
.height = 1080,
|
||||
.zpos = 1,
|
||||
.compat = { PRIMARY_PLANE },
|
||||
.result = PRIMARY_PLANE,
|
||||
.result = NULL,
|
||||
},
|
||||
{
|
||||
.width = 100,
|
||||
|
@ -435,7 +435,7 @@ static struct test_case tests[] = {
|
|||
.height = 1080,
|
||||
.zpos = 1,
|
||||
.compat = { PRIMARY_PLANE },
|
||||
.result = PRIMARY_PLANE,
|
||||
.result = NULL,
|
||||
},
|
||||
{
|
||||
.width = 100,
|
||||
|
|
Loading…
Reference in a new issue