forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Better way to disable rendering.

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS3 Linux Development
View previous topic :: View next topic  
Author Message
IronPeter



Joined: 06 Aug 2007
Posts: 207

PostPosted: Sun Nov 11, 2007 11:16 pm    Post subject: Better way to disable rendering. Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Mon Nov 12, 2007 5:56 am    Post subject: Reply with quote

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
View user's profile Send private message
IronPeter



Joined: 06 Aug 2007
Posts: 207

PostPosted: Mon Nov 12, 2007 6:32 am    Post subject: Reply with quote

>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
View user's profile Send private message Send e-mail Visit poster's website
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Mon Nov 12, 2007 8:17 am    Post subject: Reply with quote

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
View user's profile Send private message
unsolo



Joined: 16 Apr 2007
Posts: 155
Location: OSLO Norway

PostPosted: Mon Nov 12, 2007 8:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
mc



Joined: 12 Jan 2005
Posts: 212
Location: Linköping

PostPosted: Mon Nov 19, 2007 8:42 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS3 Linux Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group