Hi Ville,
Thanks for your comments!
> The kernel isn't allowed to magically change the value of
> properties set by userspace, apart from a few special cases.
>
> No idea what you're actually trying to fix here, but sounds
> like your userspace might be broken and needs to be fixed.
I agree that userspace should reset unused plane properties.
Otherwise, the drm_plane_state UAPI "sticky" values may not
match what is actually programmed to hardware, which can be
confusing.
For example, i915_display_info debugfs shows:
[PLANE:123:plane 4A]: type=OVL
uapi: [FB:0] n/a,0x0,0x0,, visible=Y plane,
src=125.000000x48.000000+0.000000+0.000000,
dst=125x48+897+0, rotation=0 (0x00000001)
planar: Linked to [PLANE:33:plane 1A] as a Y plane
hw: [FB:567] NV12 little-endian (0x3231564e),
0x100000000000010,2048x1088, visible=no,
src=1920.000000x1080.000000+0.000000+0.000000,
dst=1920x1080+0+0, rotation=0 (0x00000001)
That said, I was wondering if DRM could also reset unused
plane state defensively, in case userspace does not do so.
For example:
https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/blob/main/drm/DrmPlane.cpp#L464
Maybe this is not the right way, but my intention was to avoid
such mismatches.
Thanks,
Austin