libliftoff
libliftoff copied to clipboard
Better support for KMS enums and bitfields
Enum and bitfield properties may have different definitions across planes. This would be silly and annoying, but could happen. For instance, plane 1 may have "rotation": bitmask {"rotate-90" = 0x1, "rotate-180" = 0x2} and plane 2 may have "rotation": bitmask {"rotate-180" = 0x1}.
In this case, library users don't know which value needs to be set without knowing the plane that will be used. In the rotation example, rotate-180 has value 0x1 or 0x2 depending on the plane used.
I'm not aware of any property that behaves like this.
https://lists.freedesktop.org/archives/dri-devel/2020-April/261055.html
The result of the discussion is that libliftoff needs to handle this. Something among these lines was suggested:
void liftoff_layer_set_enum(struct liftoff_layer *layer, const char *name, const char *value);
But it would also need to handle bitfields with zero or multiple values.