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