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