Framebuffer memory, video memory and so on...

This forum is used for all questions regarding the use of Matrox graphics hardware with framebuffer drivers

Framebuffer memory, video memory and so on...

Postby topolinik » Sun Jun 21, 2009 5:54 pm

In my ubuntu 8.04.2 I load matrox framebuffer at startup to enable tv output (dvdmax feature).
The module is setup for use as much memory as it finds and it uses the whole 32 MB of ram in my G550. I see this with
Code: Select all
dmesg |grep matroxfb
[    0.000000] Kernel command line: root=UUID=a7d9cee3-6792-4f7b-8a5a-add40668c432 ro quiet splash video=matroxfb:vesa:0x115 locale=it_IT
[   19.917894] matroxfb: Matrox G550 detected
[   19.920617] matroxfb: MTRR's turned on
[   19.920636] matroxfb: 800x600x32bpp (virtual: 800x5242)
[   19.920639] matroxfb: framebuffer at 0xD8000000, mapped to 0xe0880000, size 33554432
[   24.262150] matroxfb_crtc2: secondary head of fb0 was registered as fb1

After that, in xorg.conf I use the option:
Code: Select all
     "UseFBDev" "Enable"

to ensure xorg can use some frame buffer feature (the tv output, i guess). This is what I know from my readings about mga-xorg driver (by the way, i'm using your mga driver 4.4.4 x86).
Now, when i look into Xorg.0.log i see xorg is using only 16 MB of my videoram.
Code: Select all
cat /var/log/Xorg.0.log |grep VideoRAM
(--) MGA(0): VideoRAM: 16384 kByte

Why? My G550 mounts 32 MB of video memory!
While xorg is using half the memory, some game doesn't even start anymore!

I don't understand why this happens and I did another test, setting matrox framebuffer for using just 4 MB.
(Since I need text consoles at 800x600 with 32bpp, this means about 2MB, and I assume tv output needs almost the same).
Well, the result is xorg uses just those 4 MB and doesn't see the remaining memory. Of course, my desktop is just ugly this way (1280x800 and VERY poor 3D features) and i went back to giving framebuffer the whole 32 MB.
But, again, xorg sees only 16 MB of ram.
I thought the video card memory was shared between the framebuffer and the video "areas", so
(framebuffer memory) + (video memory) = 32 MB
but, I see, my assumptions are wrong.
Can you help me having 32 MB for xorg again?

The setup line for matrox framebuffer is
Code: Select all
video=matroxfb:vesa:0x115

and I attach my xorg.conf.
Attachments
xorg.conf
(2.67 KiB) Downloaded 1116 times
User avatar
topolinik
Major
Major
 
Posts: 24
Joined: Mon Feb 25, 2008 1:00 pm

Re: Framebuffer memory, video memory and so on...

Postby topolinik » Tue Jul 14, 2009 8:07 pm

Perhaps is this ooold topic related to my report?
User avatar
topolinik
Major
Major
 
Posts: 24
Joined: Mon Feb 25, 2008 1:00 pm

Re: Framebuffer memory, video memory and so on...

Postby topolinik » Tue Jul 14, 2009 11:16 pm

Well, i'm going to understand more about framebuffers...
It seems that matroxfb sets the whole video memory as two 16 MB banks, the first is the one used by xorg since it's the only one with hardware acceleration. The second frame buffer device (/dev/fb1) is used for tv output, but it's not used at its whole capacity!
My problem is this memory setting.
Here you can see actual memory allocation done by matroxfb:
Code: Select all
$ fbset -fb /dev/fb0 -i

mode "1280x1024-75"
    # D: 135.007 MHz, H: 79.981 kHz, V: 75.029 Hz
    geometry 1280 1024 1280 1024 32
    timings 7407 248 16 38 1 144 3
    hsync high
    vsync high
    rgba 8/16,8/8,8/0,8/24
endmode

Frame buffer device information:
    Name        : MATROX
    Address     : 0xd8000000
    Size        : 16777216
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 8
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 5120
    MMIO Address: 0xdc000000
    MMIO Size   : 16384
    Accelerator : Matrox G400

and
Code: Select all
$ fbset -fb /dev/fb1 -i
mode "640x480-60"
    # D: 25.176 MHz, H: 31.469 kHz, V: 59.942 Hz
    geometry 640 480 640 480 32
    timings 39721 48 16 33 10 96 2
    rgba 8/16,8/8,8/0,8/24
endmode

Frame buffer device information:
    Name        : MATROX DH
    Address     : 0xd9800000
    Size        : 8388608
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 8
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 2560
    MMIO Address: 0xdc000000
    MMIO Size   : 16384
    Accelerator : No

Look at the size: 16 MB for the first head and 8 MB for the second head!!! 16+8=24 so i've got 8 MB in unused memory!

Is it possible to set just few MB for the second head and the remaining memory (ALL the remaining memory) for the first head so to have 28+4 or 30+2 ?
User avatar
topolinik
Major
Major
 
Posts: 24
Joined: Mon Feb 25, 2008 1:00 pm


Return to Framebuffer Configurations

Who is online

Users browsing this forum: No registered users and 2 guests

cron