Content protection fixes and new CP-level
This series fixes a few issues with the CP (both server and client example) and adds a new invented CP-level to the protocol, as to provide systems which do not have a remote sink with HDCP capabilities but still adhere to some 'trusted' chain path in which the output is deemed as a trusted endpoint (for instance for set-up boxes and the like, where eDP panels do not have any kind HDCP present). This should display correctly but install some kind of censorship graphics whenever there's an attempt to record the surface contents.
Still, there are some things here to iron out:
-
properly redraw/damage the surface contents/output to avoid artefacts when the censors graphic has finished. As it turns out whenever this happens we still keeping the placeholder graphics in place so we are not properly updating it
-
setting different connector types to this new level can only be done in
drm_output_assign_state()
as we always reset there the state if output state is set as disable (which is always in this case). For now, I've used theconnector_internal
flag to set the head to the new CP-level (which should include e-DP) -
there are no changes in the heads/output CP level verification (
weston_output_compute_protection()
). Maybe the first item is a consequence of this one, but I'm not 100% at this point. The only changes are those in the plane assignment and the censor/renderer part.
Updates to this series based on the things still left out:
-
the redraw bit has been addressed using an idle task which performs a redraw of the entire output with
weston_output_damage()
(suggested by Pekka). -
the types of connectors that qualify to being set
DC_ONLY
has been "abstracted" in a function; should be easier to modify in case, besides internal connectors, others do seem alright to be added. -
haven't seen any reason to update
weston_output_compute_protection
;DC_ONLY
is now afterDISABLE
level and we have a 1-to-1 translation of protocol enums to libweston enums, and vice-versa libweston enum to protocol.