Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Device creation:
- Any relevant sync bo's should be accessible by all affected devices:
- Each device should create it's own sync bo on device creation,
- or after a buffer is first exported before returning it.
- If no sync bo exists no syncing will be done.
- If a device imports another device's bo, they will also need to import
- that sync bo and map it (to device or cpu). This can be an existing bo,
- for example nouveau has their own fencing bo which can be re-used.
- Command buffer submission:
- - Validate locally, notice prime buffer is detected, unlock everything,
- acquire drm_prime_mutex, start over. If no prime buffer the rest doesn't
- apply and normal command handling is done.
- - Acquire local locking for current device
- - Validate all buffers including prime buffers
- as if they were local
- - On all other devices, perform same validation,
- this might take additional locks as well
- - For all prime bo's, for the original device the bo came
- from call a function to obtain offset into the sync bo and
- expected value before starting handling the submitted commands
- This can be written into the command stream. This might return
- a value indicating that no syncing needs to be done.
- At previous points we could error out and undo damage, there's no going back
- after verifying there's enough space, so commit changes:
- - for each prime bo, for the original device the bo came from call a function
- to obtain offset into the sync bo and desired value to indicate processing is done
- (XXX: Reduce to one call per device maybe?)
- - Notify all devices to drop locks
- - Drop own locking and drm_prime_mutex, return to userspace
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement