The subsystem driver itself is not an active driver and relies on application software to make use of the provided APIs to configure it. Application software is responsible to monitor the system for external inputs and communicate changes to input/output stream properties to the subsystem through provided APIs, and trigger the subsystem auto reconfiguration process.
To integrate and use the Video Processing Subsystem driver in a user application, the following steps must be followed:
1. Include the subsystem header file xvprocss.h that defines the subsystem object.
2. Declare an instance of the subsystem object in the application code:
3. Initialize system peripherals (timer, interrupt controller, UART, etc.) in the application.
4. If delay routine is defined at application level using a timer, this must be registered with the subsystem:
void XVprocSs_SetUserTimerHandler(XVprocSs *InstancePtr,
If the application is not using the timing peripheral to implement the timeouts, skip this step. The Subsystem driver internally uses the platform-specific delay handler.
5. Initialize Video Processing Subsystem at Power-On.
int XVprocSs_CfgInitialize(XVprocSs *InstancePtr,
Accesses the HW configuration determines the included subcores and initializes them to the power on default. The input and output stream resolution is set to 1080p at 60 Hz, RGB, and color depth is 10-bit. Finally all the cores are reset and the subsystem Ready flag is set.
6. Configure subsystem:
int XVprocSs_SetSubsystemConfig(XVprocss *InstancePtr);
This API is the entry point and trigger mechanism for the subsystem processing control flow. It examines the input and output stream properties and validates them against the supported feature set. If the use case is supported, the driver determines the subcores required to implement the use case, builds a data flow network, configures cores in the network, and starts the video pipe.
Now, the subsystem is ready for use and the application software monitors changes in the system input or output and communicates those changes to the video subsystem.