vesa driver already for amd64!

Kernel development, writing drivers, coding, and questions regarding FreeBSD internals.

vesa driver already for amd64!

Postby paradox » 14 Aug 2009, 14:45

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: Select all
tar xjvf vesa.tar.bz2
cd vesa
make
make load


use
Code: Select all
vidcontrol -i mode

to show graphics modes

on my NVIDIA card iam use a MODE_277
800x600x32

to use it
Code: Select all
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
paradox
Junior Member
 
Posts: 97
Joined: 16 Nov 2008, 18:52

Postby aragon » 14 Aug 2009, 21:28

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

Will try it out soon.
aragon
Giant Locked
 
Posts: 2031
Joined: 16 Nov 2008, 17:04
Location: Cape Town, South Africa

Postby paradox » 14 Aug 2009, 21:48

no its little work within one day
x86emu taked from openbsd

I think this driver will work under the i386 arch too
paradox
Junior Member
 
Posts: 97
Joined: 16 Nov 2008, 18:52

Postby zeiz » 16 Aug 2009, 01:25

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?
User avatar
zeiz
Member
 
Posts: 691
Joined: 19 Nov 2008, 18:36
Location: Canada

Postby john_doe » 16 Aug 2009, 02:57

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 [port]sysutils/jfbterm[/port] you can get not limited to 256 chars unicode support
  • [port]www/w3m[/port] 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
john_doe
Junior Member
 
Posts: 78
Joined: 12 Aug 2009, 18:15

Postby zeiz » 16 Aug 2009, 05:28

WOW! Thanks a lot!

...but where the tarball is?
Tried http://paradox.lissyara.su, http://www.paradox.lissyara.su, ftp://ftp.paradox.lissyara.su...where it is?
User avatar
zeiz
Member
 
Posts: 691
Joined: 19 Nov 2008, 18:36
Location: Canada

Postby paradox » 16 Aug 2009, 07:20

paradox
Junior Member
 
Posts: 97
Joined: 16 Nov 2008, 18:52

Postby zeiz » 16 Aug 2009, 08:21

Got it. Thanks!
User avatar
zeiz
Member
 
Posts: 691
Joined: 19 Nov 2008, 18:36
Location: Canada

Postby paradox » 17 Aug 2009, 19:19

continued

http://paradox.lissyara.su/8bit.patch
Code: Select all
cp 8bit.patch /usr/src
patch -p1 < 8bit.patch

and rebuild yr kernel

this patch allow the console to switch in the 8bit modes
from a list
Code: Select all
vidcontrol -i mode
paradox
Junior Member
 
Posts: 97
Joined: 16 Nov 2008, 18:52

Postby paradox » 17 Aug 2009, 23:33

continued

http://paradox.lissyara.su/syscons.c.diff for freebsd 8 stable
Code: Select all
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
Junior Member
 
Posts: 97
Joined: 16 Nov 2008, 18:52

Postby gnemmi » 21 Aug 2009, 19:23

will this make it into BETA3?
User avatar
gnemmi
Member
 
Posts: 219
Joined: 20 Nov 2008, 21:29
Location: Cap. Fed., Buenos Aires, Argentina

Postby paradox » 21 Aug 2009, 19:53

yes
paradox
Junior Member
 
Posts: 97
Joined: 16 Nov 2008, 18:52

Postby gnemmi » 22 Aug 2009, 02:24

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
User avatar
gnemmi
Member
 
Posts: 219
Joined: 20 Nov 2008, 21:29
Location: Cap. Fed., Buenos Aires, Argentina

Postby paradox » 22 Aug 2009, 07:32

the value 0x0115 and 0x115 the same
suspend not tested yet
paradox
Junior Member
 
Posts: 97
Joined: 16 Nov 2008, 18:52

Postby paradox » 22 Aug 2009, 08:07

will this make it into BETA3?

what you mean?

will be included in beta3 this patch?
or
Is it possible to apply this patch to beta3?
paradox
Junior Member
 
Posts: 97
Joined: 16 Nov 2008, 18:52

Postby mdma » 22 Aug 2009, 14:15

S-w-e-e-e-e-e-t
mdma
Junior Member
 
Posts: 59
Joined: 16 Nov 2008, 20:59
Location: malta

Postby gnemmi » 22 Aug 2009, 18:37

I meant if this patch was going to be included into BETA3 :)
User avatar
gnemmi
Member
 
Posts: 219
Joined: 20 Nov 2008, 21:29
Location: Cap. Fed., Buenos Aires, Argentina

Postby paradox » 22 Aug 2009, 18:58

i don't know :(
paradox
Junior Member
 
Posts: 97
Joined: 16 Nov 2008, 18:52

Postby aragon » 22 Aug 2009, 20:04

I highly doubt it. Maybe 8.1.
aragon
Giant Locked
 
Posts: 2031
Joined: 16 Nov 2008, 17:04
Location: Cape Town, South Africa

Postby joel@ » 23 Aug 2009, 10:24

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.
User avatar
joel@
Member
 
Posts: 245
Joined: 27 Sep 2007, 06:42
Location: Arentorp, Sweden

Postby nickolas » 24 Aug 2009, 10:04

john_doe wrote: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
[cmd=$]cd /usr/ports[/cmd]
[cmd=$]patch -sp0 -i /path/to/vesa-kmod.diff[/cmd]
[cmd=$]cd misc/vesa-kmod; make install clean[/cmd]


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


Code: Select all
# 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: Select all
vesa_load="YES"
hint.sc.0.flags="0x01150180"


I got a blank screen.
nickolas
Junior Member
 
Posts: 26
Joined: 18 Nov 2008, 12:49

Postby paradox » 24 Aug 2009, 10:29

add to kernel conf "options SC_PIXEL_MODE"
and rebuild kernel
paradox
Junior Member
 
Posts: 97
Joined: 16 Nov 2008, 18:52

Postby nickolas » 24 Aug 2009, 16:57

paradox wrote:add to kernel conf "options SC_PIXEL_MODE"
and rebuild kernel


No change.
I've use john_doe's port.
Meybe it's better use your kernel patch?
nickolas
Junior Member
 
Posts: 26
Joined: 18 Nov 2008, 12:49

Postby paradox » 24 Aug 2009, 17:26

show me your
Code: Select all
vidcontrol -i mode

after load vesa.ko
paradox
Junior Member
 
Posts: 97
Joined: 16 Nov 2008, 18:52

Postby paradox » 24 Aug 2009, 17:34

hint.sc.0.flags="0x01150180"

this flag allowed only on freebsd 8/9
not for freebsd 7

you can use only the
Code: Select all
allscreens_flags="MODE_277"

in rc.conf
as example
to switch the graphic console after boot
paradox
Junior Member
 
Posts: 97
Joined: 16 Nov 2008, 18:52

Next

Return to FreeBSD Development

Who is online

Users browsing this forum: No registered users and 0 guests