View previous topic :: View next topic |
Author |
Message |
IronPeter
Joined: 06 Aug 2007 Posts: 207
|
Posted: Sun Nov 11, 2007 11:16 pm Post subject: Better way to disable rendering. |
|
|
There is approx ~20 megs of xdrmemory used as virtual screen buffer.
This memory is mapped to GPU and is very useful for GPU data storing ( dynamic vertex and index buffers, dynamic textures, fifo buffer ).
I want to use this memory in the exclusive mode. The problem is ioctl for FB does not affect this memory usage by X driver. Blitting is stopped, but X rendering is still active.
I want to do simpe thing - stop X rendering, use virtual screen buffer memory for my purposes, restart X rendering.
What is the easiest way to do that? |
|
Back to top |
|
|
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Mon Nov 12, 2007 5:56 am Post subject: |
|
|
The ioctl for the FB shouldn't affect whether the FB uses the memory either, maybe you're just getting lucky and it happens to be on the back-buffer that doesn't overlap with the region you're using?
I'd imagine X is just mmaping the memory, and as far as I know you can't force munmap. Maybe you could temporarily change the mappings in the kernel so it goes to some dummy region that you don't care about? Or just stop the X process so that it's not actually writing to it. |
|
Back to top |
|
|
IronPeter
Joined: 06 Aug 2007 Posts: 207
|
Posted: Mon Nov 12, 2007 6:32 am Post subject: |
|
|
>it happens to be on the back-buffer that doesn't overlap with the region you're using?
Yes, I can use the higher region of this memory, megs 8-20. X driver uses begin of this region. I want to have the whole region in the exclusive mode.
>Or just stop the X process so that it's not actually writing to it.
Yes, I want to stop X process and restart it. But virtual frame buffer will be filled with my own data, I want X driver to redraw all windows. Remapping is not an option, the key idea is to reduce memory consumption.
How can I stop X driver and restart it? Even console rendering must be disabled... |
|
Back to top |
|
|
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Mon Nov 12, 2007 8:17 am Post subject: |
|
|
Quote: | Yes, I want to stop X process and restart it. But virtual frame buffer will be filled with my own data, I want X driver to redraw all windows. Remapping is not an option, the key idea is to reduce memory consumption.
How can I stop X driver and restart it? Even console rendering must be disabled... | You could literally stop the X process, ie. do the equivalent of sending it SIGSTOP/SIGCONT. But that won't trigger it to redraw. I guess you could do an xrefresh from userspace, but I think if you really want X to cooperate with you then you'll have to use a different video driver than fbdev. |
|
Back to top |
|
|
unsolo
Joined: 16 Apr 2007 Posts: 155 Location: OSLO Norway
|
Posted: Mon Nov 12, 2007 8:09 pm Post subject: |
|
|
I just finished my rectangle fill function for EXA backend on spu's
Going to work on rectangle copy today which is the same spu.
By simply throwing off this to write to /dev/null instead the FB could become "free"
Another point is that when running X you only need around 1900 x 1200*4 B for the framebuffer as X does not run it double buffered.
The Mplayer vo is currently set up to use the virual double buffered mode.
But how long time does a blit take ? 9.2MB/24GB is 0.4 ms so i recon this can be stripped from that as well
Isn't having one draw in gpu + one in ram double buffering enough!
This is a driver thing and can / are beeing looked at.
cheers _________________ Don't do it alone. |
|
Back to top |
|
|
mc
Joined: 12 Jan 2005 Posts: 212 Location: Linköping
|
Posted: Mon Nov 19, 2007 8:42 am Post subject: |
|
|
One thing that might be worth trying is to use the VT_ACTIVATE ioctl to switch to a different virtual console, and then set it to graphics mode with KDSETMODE to prevent the vt driver from rendering text or cursor to it. Then you ought to get exclusive access to the fb memory. X will start rendering again when you switch back to its virtual console. _________________ Flying at a high speed
Having the courage
Getting over crisis
I rescue the people |
|
Back to top |
|
|
|