These changes were picked from !15507 (merged). On their own, they do not constitute a UAPI change.
The new interface replaces the structs of individual registers with pairs of "streams". Each pair consists of one main stream (containing mandatory or feature-dependant registers) and one extension stream (containing registers required for quirks or enhancements). The order of registers in each stream is pre-determined but the primary definition of this order is currently the code writing to the streams. Extension streams contain a header to indicate which quirk/enhancement-related registers are present.
The implementation included in this MR comes in two parts:
- Code above the winsys layer is modified to write to stream buffers instead of the previous structs, and
- The winsys layer for the downstream driver (
pvrsrvkm) is modified to perform the reverse operation, unpacking the stream data into structures defined in the firmware interface headers.
The ultimate plan for this part of the winsys interface is that the new (upstream) KM driver can accept these streams directly without any additional processing. The code to do this can still be found in !15507 (merged). Since the new KM driver is not upstreamed yet, the UAPI is still subject to change. This code will be reworked if necessary to accommodate any changes so the "without any additional processing" part remains true. Additionally, there will also be a formal documentation of the stream contents so the specification is not just in code.
So why pull this change out into its own MR, instead of leaving it in !15507 (merged)? This change has been responsible for a lot of... uncomfortable... rebases, so it should make other changes easier to merge going forward.
Signed-off-by: Matt Coster <email@example.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <firstname.lastname@example.org>