vesa driver already for amd64!

tested on amd64 freebsd 8 current/stable

http://paradox.lissyara.su/vesa.tar.bz2

add to kernel conf "options SC_PIXEL_MODE"
and rebuild kernel

after reboot
Code:
tar xjvf vesa.tar.bz2
cd vesa
make
make load

use
Code:
vidcontrol -i mode
to show graphics modes

on my NVIDIA card iam use a MODE_277
800x600x32

to use it
Code:
vidcontrol MODE_277

ps:
any 32bit/16bit modes will be work
8bit not tested yet

to support 8bit depth
need my old patch for scvgarndr.c
http://www.freebsd.org/cgi/query-pr.cgi?pr=124902

to be continue
 
Wow, have you PR'd this yet? This looks like a huge chunk of work (particularly the x86 emulation).

Will try it out soon.
 
no its little work within one day
x86emu taked from openbsd

I think this driver will work under the i386 arch too
 
I am using vesa on 8.0 from ports. It's not nvidia but works pretty fine if no effects enabled.
Please explain how this driver differ from the one in ports?
 
Unlike X11 driver, vesa(4) allows you to set graphic modes for console so you can view images or play video without leaving it.

Ex.:
  • with sysutils/jfbterm you can get not limited to 256 chars unicode support
  • www/w3m allows you to browse www sites with images on jfbterm
  • using libSDL + libvgl you can play some videos or graphical games
all the while Xserver is not running
 
continued

http://paradox.lissyara.su/syscons.c.diff for freebsd 8 stable
Code:
cp syscons.c.diff /usr/src
patch -p1 < syscons.c.diff
and rebuild yr kernel

this is patch to allow switch the console to graphic mode early at boot time
the new flags is hint.sc.0.flags=0x01150180
where
0x100 - the flag for keyboard (used by default in freebsd)
0x80 - flag to switch the graphic console at boot(new flag)
0x0115 - the graphic mode that can be see from vidcontrol -i mode(new flag)
add this flag 0xXXX mode after testing with vidcontorl MODE_****
as example MODE_277 is 0x0115

all virtual console will be to switched to new graphic mode

don't forget the install vesa driver and add to loader.conf vesa_load="YES" options

dont use any more allscreens_flags= in rc.conf
becouse its clear boot log in console
 
paradox, thanks for your work man !

I just gave it a go on my BETA2 install (Dell 1318 notebook, i386, Celeron(R) CPU 560 @ 2.13GHz) and it works OK.

I used the same hint (hint.sc.0.flags=0x01150180) you used because any resolution above 800x600 is way too high (1280x800, native resolution, would be unusable ... yet still it's not even available anyways). I couldn't figure out why "0x0115" if vidcontrol -i mode reports "0x115"?

So far the catch seems to be that the resolution goes up as soon as sc0 gets loaded (wich happens to be halfway through the boot process ... so the first half of the boot process looks big and the second half looks as expected at 800x600x32).

The only problem I found is that if I use "vesa" instead of "i915" I don't get the screen back when I resume from supend (acpiconf -s 3)

Really nice job .. will be looking forward to try your next patches ;)

Best Regards
Gonzalo
 
If you want something committed to the FreeBSD svn repository, find someone who can review and commit it for you, or send a PR with the patch.
 
john_doe said:
I've made a port (vesa-kmod.diff) based on paradox's work. It should work on 7.x as well. Anyone wants to test/comment?

To apply use
$ cd /usr/ports
$ patch -sp0 -i /path/to/vesa-kmod.diff
$ cd misc/vesa-kmod; make install clean

It doesn't works:
Code:
vidcontrol: obtaining new video mode parameters: Operation not supported by device

Code:
# uname -a
FreeBSD cloud.zone 7.2-STABLE FreeBSD 7.2-STABLE #38: Sun Aug  2 16:40:23 EEST 2009     root@cloud.zone:/usr/obj/usr/src/sys/CLOUD  amd64

If I write in loader.conf:
Code:
vesa_load="YES"
hint.sc.0.flags="0x01150180"

I got a blank screen.
 
hint.sc.0.flags="0x01150180"
this flag allowed only on freebsd 8/9
not for freebsd 7

you can use only the
Code:
allscreens_flags="MODE_277"
in rc.conf
as example
to switch the graphic console after boot
 
Back
Top