Showing changes from revision #4 to #5:
Added | Removed | Changed
Entry | |
---|---|
R0 | Pointer to VIDC List Type 3 |
R1 | Flags (reserved; specify 0) |
R4 | Bits 0-15: 19 (reason code) |
Bits 16-23: Head number | |
Bits 24-31: Driver number |
Exit | |
---|---|
R0 | Result flags: |
Bits 0-1: | |
0 → Provided mode is unsupported | |
1 → Mode is supported, and will use the system framestore (i.e. kernel-managed DA 2) | |
2 → Mode is supported, and will use the external framestore (as defined by R3 & R5) | |
3 → Mode is supported, but driver doesn’t know where the framestore will be (e.g. framestore is managed by another component, like the GPU firmware in the Raspberry Pi) | |
Bit 2: The input value of the ExtraBytes control list item was invalid, driver has suggested a new value in R2 | |
Bits 3+: Reserved | |
R1 | Required alignment of start of framebuffer |
R2 | Required/suggested ExtraBytes value |
R3 | External framebuffer base (iff bits 0-1 of R0 are 2) |
R4 | 0 |
R5 | External framebuffer size (iff bits 0-1 of R0 are 2) |
- | All other registers preserved |
This is an enhanced version of the GraphicsV 7 call, designed to allow the driver to provide additional feedback to the OS, mainly focusing on describing the framebuffer memory requirements for the mode.
New drivers are expected to support both GraphicsV 19 and the older GraphicsV 7 call, and any mode that passes GraphicsV 19 vetting must also pass GraphicsV 7 vetting. Since GraphicsV 19 provides a superset of the functionality of GraphicsV 7, the recommended procedure for vetting a mode is that code should call GraphicsV 19 first, and only fall back to GraphicsV 7 if the call wasn’t recognised by the driver (R4 nonzero) or if an unhandled result is returned (e.g. R0 has unrecognised flag bits set).
Drivers should handle this call as follows:
Of course, if a caller does not care about the new functionality introduced by GraphicsV 19, and cannot support modifications to the ExtraBytes item, there is no harm in only using GraphicsV 7.
Typically Typically, the ExtraBytes value returned in R2 will just be the same value that was provided in the inputVIDC list (or the default of 0 if the item was absent). However, if using the input ExtraBytes value would mean that the mode can’t be supported, the driver can return a different ExtraBytes value in R2 and set bit 2 of R0 to indicate this condition.
Note that the returned ExtraBytes value must be greater than the input value; if a smaller value is required required, then the driver must fail the entire vet call by setting bits 0-1 of R0 to zero.
There’s also a third option available: The driver can return a new ExtraBytes value in R2, but leave bit 2 of R0 clear. This allows the driver to hint that a different ExtraBytes value to what was provided in the input may provide better performance. In this case case, it’s valid for the driver to return an ExtraBytes value that was smaller than the input value.
If the ExtraBytes value can affect the choice of framestore location, then the driver should return its result as follows:
Drivers that support GraphicsV 19 must support vetting of the ExtraBytes control list item (so it must be in the list of supported items returned by GraphicsV 18).
For future-proofing, the driver must ensure it checks that the provided VIDC list is a type 3 list.
The input flags that are provided in R1 are reserved for future expansion. They are intended to be used to signal that the caller supports extended return results from the driver (e.g. to signal that additional registers may be used to return results). Therefore Therefore, drivers should simply ignore any flag bits in R1 which they don’t recognise.
Instead of calling GraphicsV directly, user software should use OS_CheckModeValid in order to check if a screen mode is valid.