1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

vesa driver already for amd64!

Discussion in 'FreeBSD Development' started by paradox, Aug 14, 2009.

  1. paradox

    paradox New Member

    Messages:
    97
    Likes Received:
    0
    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
     
  2. aragon

    aragon New Member

    Messages:
    2,031
    Likes Received:
    0
    Wow, have you PR'd this yet? This looks like a huge chunk of work (particularly the x86 emulation).

    Will try it out soon.
     
  3. paradox

    paradox New Member

    Messages:
    97
    Likes Received:
    0
    no its little work within one day
    x86emu taked from openbsd

    I think this driver will work under the i386 arch too
     
  4. zeiz

    zeiz New Member

    Messages:
    691
    Likes Received:
    0
    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?
     
  5. john_doe

    john_doe Guest

    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
     
  6. zeiz

    zeiz New Member

    Messages:
    691
    Likes Received:
    0
  7. paradox

    paradox New Member

    Messages:
    97
    Likes Received:
    0
  8. zeiz

    zeiz New Member

    Messages:
    691
    Likes Received:
    0
    Got it. Thanks!
     
  9. paradox

    paradox New Member

    Messages:
    97
    Likes Received:
    0
    continued

    http://paradox.lissyara.su/8bit.patch
    Code:
    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:
    vidcontrol -i mode
     
  10. paradox

    paradox New Member

    Messages:
    97
    Likes Received:
    0
    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
     
  11. gnemmi

    gnemmi New Member

    Messages:
    219
    Likes Received:
    0
    will this make it into BETA3?
     
  12. paradox

    paradox New Member

    Messages:
    97
    Likes Received:
    0
  13. gnemmi

    gnemmi New Member

    Messages:
    219
    Likes Received:
    0
    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
     
  14. paradox

    paradox New Member

    Messages:
    97
    Likes Received:
    0
    the value 0x0115 and 0x115 the same
    suspend not tested yet
     
  15. paradox

    paradox New Member

    Messages:
    97
    Likes Received:
    0
    what you mean?

    will be included in beta3 this patch?
    or
    Is it possible to apply this patch to beta3?
     
  16. mdma

    mdma New Member

    Messages:
    59
    Likes Received:
    0
    S-w-e-e-e-e-e-t
     
  17. gnemmi

    gnemmi New Member

    Messages:
    219
    Likes Received:
    0
    I meant if this patch was going to be included into BETA3 :)
     
  18. paradox

    paradox New Member

    Messages:
    97
    Likes Received:
    0
    i don't know :(
     
  19. aragon

    aragon New Member

    Messages:
    2,031
    Likes Received:
    0
    I highly doubt it. Maybe 8.1.
     
  20. joel@

    joel@ New Member Developer

    Messages:
    245
    Likes Received:
    0
    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.
     
  21. nickolas

    nickolas New Member

    Messages:
    26
    Likes Received:
    0
    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.
     
  22. paradox

    paradox New Member

    Messages:
    97
    Likes Received:
    0
    add to kernel conf "options SC_PIXEL_MODE"
    and rebuild kernel
     
  23. nickolas

    nickolas New Member

    Messages:
    26
    Likes Received:
    0
    No change.
    I've use john_doe's port.
    Meybe it's better use your kernel patch?
     
  24. paradox

    paradox New Member

    Messages:
    97
    Likes Received:
    0
    show me your
    Code:
    vidcontrol -i mode
    after load vesa.ko
     
  25. paradox

    paradox New Member

    Messages:
    97
    Likes Received:
    0
    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