vkms.rst 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. .. _vkms:
  2. ==========================================
  3. drm/vkms Virtual Kernel Modesetting
  4. ==========================================
  5. .. kernel-doc:: drivers/gpu/drm/vkms/vkms_drv.c
  6. :doc: vkms (Virtual Kernel Modesetting)
  7. TODO
  8. ====
  9. CRC API Improvements
  10. --------------------
  11. - Optimize CRC computation ``compute_crc()`` and plane blending ``blend()``
  12. - Use the alpha value to blend vaddr_src with vaddr_dst instead of
  13. overwriting it in ``blend()``.
  14. - Add igt test to check cleared alpha value for XRGB plane format.
  15. - Add igt test to check extreme alpha values i.e. fully opaque and fully
  16. transparent (intermediate values are affected by hw-specific rounding modes).
  17. Runtime Configuration
  18. ---------------------
  19. We want to be able to reconfigure vkms instance without having to reload the
  20. module. Use/Test-cases:
  21. - Hotplug/hotremove connectors on the fly (to be able to test DP MST handling of
  22. compositors).
  23. - Configure planes/crtcs/connectors (we'd need some code to have more than 1 of
  24. them first).
  25. - Change output configuration: Plug/unplug screens, change EDID, allow changing
  26. the refresh rate.
  27. The currently proposed solution is to expose vkms configuration through
  28. configfs. All existing module options should be supported through configfs too.
  29. Add Plane Features
  30. ------------------
  31. There's lots of plane features we could add support for:
  32. - Real overlay planes, not just cursor.
  33. - Full alpha blending on all planes.
  34. - Rotation, scaling.
  35. - Additional buffer formats, especially YUV formats for video like NV12.
  36. Low/high bpp RGB formats would also be interesting.
  37. - Async updates (currently only possible on cursor plane using the legacy cursor
  38. api).
  39. For all of these, we also want to review the igt test coverage and make sure all
  40. relevant igt testcases work on vkms.
  41. Writeback support
  42. -----------------
  43. Currently vkms only computes a CRC for each frame. Once we have additional plane
  44. features, we could write back the entire composited frame, and expose it as:
  45. - Writeback connector. This is useful for testing compositors if you don't have
  46. hardware with writeback support.
  47. - As a v4l device. This is useful for debugging compositors on special vkms
  48. configurations, so that developers see what's really going on.
  49. Prime Buffer Sharing
  50. --------------------
  51. We already have vgem, which is a gem driver for testing rendering, similar to
  52. how vkms is for testing the modeset side. Adding buffer sharing support to vkms
  53. allows us to test them together, to test synchronization and lots of other
  54. features. Also, this allows compositors to test whether they work correctly on
  55. SoC chips, where the display and rendering is very often split between 2
  56. drivers.
  57. Output Features
  58. ---------------
  59. - Variable refresh rate/freesync support. This probably needs prime buffer
  60. sharing support, so that we can use vgem fences to simulate rendering in
  61. testing. Also needs support to specify the EDID.
  62. - Add support for link status, so that compositors can validate their runtime
  63. fallbacks when e.g. a Display Port link goes bad.
  64. - All the hotplug handling describe under "Runtime Configuration".
  65. Atomic Check using eBPF
  66. -----------------------
  67. Atomic drivers have lots of restrictions which are not exposed to userspace in
  68. any explicit form through e.g. possible property values. Userspace can only
  69. inquiry about these limits through the atomic IOCTL, possibly using the
  70. TEST_ONLY flag. Trying to add configurable code for all these limits, to allow
  71. compositors to be tested against them, would be rather futile exercise. Instead
  72. we could add support for eBPF to validate any kind of atomic state, and
  73. implement a library of different restrictions.
  74. This needs a bunch of features (plane compositing, multiple outputs, ...)
  75. enabled already to make sense.