xref: /OK3568_Linux_fs/kernel/Documentation/fb/uvesafb.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun==========================================================
2*4882a593Smuzhiyunuvesafb - A Generic Driver for VBE2+ compliant video cards
3*4882a593Smuzhiyun==========================================================
4*4882a593Smuzhiyun
5*4882a593Smuzhiyun1. Requirements
6*4882a593Smuzhiyun---------------
7*4882a593Smuzhiyun
8*4882a593Smuzhiyunuvesafb should work with any video card that has a Video BIOS compliant
9*4882a593Smuzhiyunwith the VBE 2.0 standard.
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunUnlike other drivers, uvesafb makes use of a userspace helper called
12*4882a593Smuzhiyunv86d.  v86d is used to run the x86 Video BIOS code in a simulated and
13*4882a593Smuzhiyuncontrolled environment.  This allows uvesafb to function on arches other
14*4882a593Smuzhiyunthan x86.  Check the v86d documentation for a list of currently supported
15*4882a593Smuzhiyunarches.
16*4882a593Smuzhiyun
17*4882a593Smuzhiyunv86d source code can be downloaded from the following website:
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun  https://github.com/mjanusz/v86d
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunPlease refer to the v86d documentation for detailed configuration and
22*4882a593Smuzhiyuninstallation instructions.
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunNote that the v86d userspace helper has to be available at all times in
25*4882a593Smuzhiyunorder for uvesafb to work properly.  If you want to use uvesafb during
26*4882a593Smuzhiyunearly boot, you will have to include v86d into an initramfs image, and
27*4882a593Smuzhiyuneither compile it into the kernel or use it as an initrd.
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun2. Caveats and limitations
30*4882a593Smuzhiyun--------------------------
31*4882a593Smuzhiyun
32*4882a593Smuzhiyunuvesafb is a _generic_ driver which supports a wide variety of video
33*4882a593Smuzhiyuncards, but which is ultimately limited by the Video BIOS interface.
34*4882a593SmuzhiyunThe most important limitations are:
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun- Lack of any type of acceleration.
37*4882a593Smuzhiyun- A strict and limited set of supported video modes.  Often the native
38*4882a593Smuzhiyun  or most optimal resolution/refresh rate for your setup will not work
39*4882a593Smuzhiyun  with uvesafb, simply because the Video BIOS doesn't support the
40*4882a593Smuzhiyun  video mode you want to use.  This can be especially painful with
41*4882a593Smuzhiyun  widescreen panels, where native video modes don't have the 4:3 aspect
42*4882a593Smuzhiyun  ratio, which is what most BIOS-es are limited to.
43*4882a593Smuzhiyun- Adjusting the refresh rate is only possible with a VBE 3.0 compliant
44*4882a593Smuzhiyun  Video BIOS.  Note that many nVidia Video BIOS-es claim to be VBE 3.0
45*4882a593Smuzhiyun  compliant, while they simply ignore any refresh rate settings.
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun3. Configuration
48*4882a593Smuzhiyun----------------
49*4882a593Smuzhiyun
50*4882a593Smuzhiyunuvesafb can be compiled either as a module, or directly into the kernel.
51*4882a593SmuzhiyunIn both cases it supports the same set of configuration options, which
52*4882a593Smuzhiyunare either given on the kernel command line or as module parameters, e.g.::
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun video=uvesafb:1024x768-32,mtrr:3,ywrap (compiled into the kernel)
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun # modprobe uvesafb mode_option=1024x768-32 mtrr=3 scroll=ywrap  (module)
57*4882a593Smuzhiyun
58*4882a593SmuzhiyunAccepted options:
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun======= =========================================================
61*4882a593Smuzhiyunypan    Enable display panning using the VESA protected mode
62*4882a593Smuzhiyun	interface.  The visible screen is just a window of the
63*4882a593Smuzhiyun	video memory, console scrolling is done by changing the
64*4882a593Smuzhiyun	start of the window.  This option is available on x86
65*4882a593Smuzhiyun	only and is the default option on that architecture.
66*4882a593Smuzhiyun
67*4882a593Smuzhiyunywrap   Same as ypan, but assumes your gfx board can wrap-around
68*4882a593Smuzhiyun	the video memory (i.e. starts reading from top if it
69*4882a593Smuzhiyun	reaches the end of video memory).  Faster than ypan.
70*4882a593Smuzhiyun	Available on x86 only.
71*4882a593Smuzhiyun
72*4882a593Smuzhiyunredraw  Scroll by redrawing the affected part of the screen, this
73*4882a593Smuzhiyun	is the default on non-x86.
74*4882a593Smuzhiyun======= =========================================================
75*4882a593Smuzhiyun
76*4882a593Smuzhiyun(If you're using uvesafb as a module, the above three options are
77*4882a593Smuzhiyunused a parameter of the scroll option, e.g. scroll=ypan.)
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun=========== ====================================================================
80*4882a593Smuzhiyunvgapal      Use the standard VGA registers for palette changes.
81*4882a593Smuzhiyun
82*4882a593Smuzhiyunpmipal      Use the protected mode interface for palette changes.
83*4882a593Smuzhiyun            This is the default if the protected mode interface is
84*4882a593Smuzhiyun            available.  Available on x86 only.
85*4882a593Smuzhiyun
86*4882a593Smuzhiyunmtrr:n      Setup memory type range registers for the framebuffer
87*4882a593Smuzhiyun            where n:
88*4882a593Smuzhiyun
89*4882a593Smuzhiyun                - 0 - disabled (equivalent to nomtrr)
90*4882a593Smuzhiyun                - 3 - write-combining (default)
91*4882a593Smuzhiyun
92*4882a593Smuzhiyun            Values other than 0 and 3 will result in a warning and will be
93*4882a593Smuzhiyun            treated just like 3.
94*4882a593Smuzhiyun
95*4882a593Smuzhiyunnomtrr      Do not use memory type range registers.
96*4882a593Smuzhiyun
97*4882a593Smuzhiyunvremap:n
98*4882a593Smuzhiyun            Remap 'n' MiB of video RAM.  If 0 or not specified, remap memory
99*4882a593Smuzhiyun            according to video mode.
100*4882a593Smuzhiyun
101*4882a593Smuzhiyunvtotal:n    If the video BIOS of your card incorrectly determines the total
102*4882a593Smuzhiyun            amount of video RAM, use this option to override the BIOS (in MiB).
103*4882a593Smuzhiyun
104*4882a593Smuzhiyun<mode>      The mode you want to set, in the standard modedb format.  Refer to
105*4882a593Smuzhiyun            modedb.txt for a detailed description.  When uvesafb is compiled as
106*4882a593Smuzhiyun            a module, the mode string should be provided as a value of the
107*4882a593Smuzhiyun            'mode_option' option.
108*4882a593Smuzhiyun
109*4882a593Smuzhiyunvbemode:x   Force the use of VBE mode x.  The mode will only be set if it's
110*4882a593Smuzhiyun            found in the VBE-provided list of supported modes.
111*4882a593Smuzhiyun            NOTE: The mode number 'x' should be specified in VESA mode number
112*4882a593Smuzhiyun            notation, not the Linux kernel one (eg. 257 instead of 769).
113*4882a593Smuzhiyun            HINT: If you use this option because normal <mode> parameter does
114*4882a593Smuzhiyun            not work for you and you use a X server, you'll probably want to
115*4882a593Smuzhiyun            set the 'nocrtc' option to ensure that the video mode is properly
116*4882a593Smuzhiyun            restored after console <-> X switches.
117*4882a593Smuzhiyun
118*4882a593Smuzhiyunnocrtc      Do not use CRTC timings while setting the video mode.  This option
119*4882a593Smuzhiyun            has any effect only if the Video BIOS is VBE 3.0 compliant.  Use it
120*4882a593Smuzhiyun            if you have problems with modes set the standard way.  Note that
121*4882a593Smuzhiyun            using this option implies that any refresh rate adjustments will
122*4882a593Smuzhiyun            be ignored and the refresh rate will stay at your BIOS default
123*4882a593Smuzhiyun            (60 Hz).
124*4882a593Smuzhiyun
125*4882a593Smuzhiyunnoedid      Do not try to fetch and use EDID-provided modes.
126*4882a593Smuzhiyun
127*4882a593Smuzhiyunnoblank     Disable hardware blanking.
128*4882a593Smuzhiyun
129*4882a593Smuzhiyunv86d:path   Set path to the v86d executable. This option is only available as
130*4882a593Smuzhiyun            a module parameter, and not as a part of the video= string.  If you
131*4882a593Smuzhiyun            need to use it and have uvesafb built into the kernel, use
132*4882a593Smuzhiyun            uvesafb.v86d="path".
133*4882a593Smuzhiyun=========== ====================================================================
134*4882a593Smuzhiyun
135*4882a593SmuzhiyunAdditionally, the following parameters may be provided.  They all override the
136*4882a593SmuzhiyunEDID-provided values and BIOS defaults.  Refer to your monitor's specs to get
137*4882a593Smuzhiyunthe correct values for maxhf, maxvf and maxclk for your hardware.
138*4882a593Smuzhiyun
139*4882a593Smuzhiyun=========== ======================================
140*4882a593Smuzhiyunmaxhf:n     Maximum horizontal frequency (in kHz).
141*4882a593Smuzhiyunmaxvf:n     Maximum vertical frequency (in Hz).
142*4882a593Smuzhiyunmaxclk:n    Maximum pixel clock (in MHz).
143*4882a593Smuzhiyun=========== ======================================
144*4882a593Smuzhiyun
145*4882a593Smuzhiyun4. The sysfs interface
146*4882a593Smuzhiyun----------------------
147*4882a593Smuzhiyun
148*4882a593Smuzhiyunuvesafb provides several sysfs nodes for configurable parameters and
149*4882a593Smuzhiyunadditional information.
150*4882a593Smuzhiyun
151*4882a593SmuzhiyunDriver attributes:
152*4882a593Smuzhiyun
153*4882a593Smuzhiyun/sys/bus/platform/drivers/uvesafb
154*4882a593Smuzhiyun  v86d
155*4882a593Smuzhiyun    (default: /sbin/v86d)
156*4882a593Smuzhiyun
157*4882a593Smuzhiyun    Path to the v86d executable. v86d is started by uvesafb
158*4882a593Smuzhiyun    if an instance of the daemon isn't already running.
159*4882a593Smuzhiyun
160*4882a593SmuzhiyunDevice attributes:
161*4882a593Smuzhiyun
162*4882a593Smuzhiyun/sys/bus/platform/drivers/uvesafb/uvesafb.0
163*4882a593Smuzhiyun  nocrtc
164*4882a593Smuzhiyun    Use the default refresh rate (60 Hz) if set to 1.
165*4882a593Smuzhiyun
166*4882a593Smuzhiyun  oem_product_name, oem_product_rev, oem_string, oem_vendor
167*4882a593Smuzhiyun    Information about the card and its maker.
168*4882a593Smuzhiyun
169*4882a593Smuzhiyun  vbe_modes
170*4882a593Smuzhiyun    A list of video modes supported by the Video BIOS along with their
171*4882a593Smuzhiyun    VBE mode numbers in hex.
172*4882a593Smuzhiyun
173*4882a593Smuzhiyun  vbe_version
174*4882a593Smuzhiyun    A BCD value indicating the implemented VBE standard.
175*4882a593Smuzhiyun
176*4882a593Smuzhiyun5. Miscellaneous
177*4882a593Smuzhiyun----------------
178*4882a593Smuzhiyun
179*4882a593SmuzhiyunUvesafb will set a video mode with the default refresh rate and timings
180*4882a593Smuzhiyunfrom the Video BIOS if you set pixclock to 0 in fb_var_screeninfo.
181*4882a593Smuzhiyun
182*4882a593Smuzhiyun
183*4882a593Smuzhiyun
184*4882a593Smuzhiyun Michal Januszewski <spock@gentoo.org>
185*4882a593Smuzhiyun
186*4882a593Smuzhiyun Last updated: 2017-10-10
187*4882a593Smuzhiyun
188*4882a593Smuzhiyun Documentation of the uvesafb options is loosely based on vesafb.txt.
189