libliftoff icon indicating copy to clipboard operation
libliftoff copied to clipboard

Better support for KMS enums and bitfields

Open emersion opened this issue 5 years ago • 2 comments

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.

emersion avatar Jan 13 '20 09:01 emersion

https://lists.freedesktop.org/archives/dri-devel/2020-April/261055.html

emersion avatar Apr 03 '20 10:04 emersion

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.

emersion avatar May 22 '20 10:05 emersion