Advertisement
Guest User

Untitled

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