UDM-video.txt 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. The U-Boot Driver Model Project
  2. ===============================
  3. Video output analysis
  4. =====================
  5. Marek Vasut <marek.vasut@gmail.com>
  6. 2012-02-20
  7. I) Overview
  8. -----------
  9. The video drivers are most often registered with video subsystem. This subsystem
  10. often expects to be allowed access to framebuffer of certain parameters. This
  11. subsystem also provides calls for STDIO subsystem to allow it to output
  12. characters on the screen. For this part, see [ UDM-stdio.txt ].
  13. Therefore the API has two parts, the video driver part and the part where the
  14. video driver core registers with STDIO API.
  15. The video driver part will follow the current cfb_console approach, though
  16. allowing it to be more dynamic.
  17. II) Approach
  18. ------------
  19. Registering the video driver into the video driver core is done by calling the
  20. following function from the driver probe() function:
  21. video_device_register(struct instance *i, GraphicDevice *gd);
  22. Because the video driver core is in charge or rendering characters as well as
  23. bitmaps on the screen, it will in turn call stdio_device_register(i, so), where
  24. "i" is the same instance as the video driver's one. But "so" will be special
  25. static struct stdio_device_ops handling the character output.
  26. III) Analysis of in-tree drivers
  27. --------------------------------
  28. 1) arch/powerpc/cpu/mpc8xx/video.c
  29. ----------------------------------
  30. This driver copies the cfb_console [ see drivers/video/cfb_console.c ]
  31. approach and acts only as a STDIO device. Therefore there are currently two
  32. possible approaches, first being the conversion of this driver to usual STDIO
  33. device and second, long-term one, being conversion of this driver to video
  34. driver that provides console.
  35. 2) arch/x86/lib/video.c
  36. -----------------------
  37. This driver registers two separate STDIO devices and should be therefore
  38. converted as such.
  39. 3) board/bf527-ezkit/video.c
  40. ----------------------------
  41. This driver seems bogus as it behaves as STDIO device, but provides no input
  42. or output capabilities. It relies on DEV_EXT_VIDEO, which is no longer in use
  43. or present otherwise than as a dead code/define.
  44. 4) board/bf533-stamp/video.c
  45. ----------------------------
  46. This driver seems bogus as it behaves as STDIO device, but provides no input
  47. or output capabilities. It relies on DEV_EXT_VIDEO, which is no longer in use
  48. or present otherwise than as a dead code/define.
  49. 5) board/bf548-ezkit/video.c
  50. ----------------------------
  51. This driver seems bogus as it behaves as STDIO device, but provides no input
  52. or output capabilities. It relies on DEV_EXT_VIDEO, which is no longer in use
  53. or present otherwise than as a dead code/define.
  54. 6) board/cm-bf548/video.c
  55. ----------------------------
  56. This driver seems bogus as it behaves as STDIO device, but provides no input
  57. or output capabilities. It relies on DEV_EXT_VIDEO, which is no longer in use
  58. or present otherwise than as a dead code/define.