Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 01-05-09, 01:16 PM   #1
jusst
Registered User
 
Join Date: Mar 2006
Posts: 99
Default VDPAU + xrandr refresh rate change

I see VDPAU reporting fatal errors if the monitor refresh range is changed with xrandr while VDPAU is initialized (not necessarily decoding right now, but initialised).
Is this issue known? - For dynamic rate switching to adapt to NTSC/PAL content automatically it would be important that this works while VDPAU is running.
jusst is offline   Reply With Quote
Old 01-05-09, 02:10 PM   #2
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: VDPAU + xrandr refresh rate change

Yes, that behaviour is currently by design.
Stephen Warren is offline   Reply With Quote
Old 01-05-09, 02:26 PM   #3
jusst
Registered User
 
Join Date: Mar 2006
Posts: 99
Default Re: VDPAU + xrandr refresh rate change

Hmm, so no way to fix this soon?
Or would it at least be possible to create a more meaningfull error message, which would allow us to reinitialise the decoder automatically?
jusst is offline   Reply With Quote
Old 01-05-09, 03:13 PM   #4
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: VDPAU + xrandr refresh rate change

If you register the fatal error callback, it should get called in this scenario.
Stephen Warren is offline   Reply With Quote
Old 01-06-09, 01:29 AM   #5
jusst
Registered User
 
Join Date: Mar 2006
Posts: 99
Default Re: VDPAU + xrandr refresh rate change

The only callback I can see is VdpPreemptionCallback do you mean that one?
jusst is offline   Reply With Quote
Old 01-06-09, 11:41 AM   #6
jusst
Registered User
 
Join Date: Mar 2006
Posts: 99
Default Re: VDPAU + xrandr refresh rate change

would we actually have to refetch the proc_addresses after a preemption or can we safely continue with the current ones, just recreating all objects?
seeing that vdp_device would be recreated I assume we have to refetch. what would happen when an older pointer is called after we fetched a new one? - will this one still resolve into vdpau and produce an error or will we segfaults then?
that would make it quite complex to deal with this in a multithreaded app/lib like xine...
jusst is offline   Reply With Quote
Old 01-06-09, 12:10 PM   #7
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: VDPAU + xrandr refresh rate change

Yes, the preemption callback.

Technically, one should refetch all pointers, since they are relative to the device object given the way the API works. However, in practice, at least in NVIDIA's current implementation of VDPAU, you'll always get the same pointer back for each function, so they'll continue to be valid until the application exits.
Stephen Warren is offline   Reply With Quote
Old 01-06-09, 12:45 PM   #8
jusst
Registered User
 
Join Date: Mar 2006
Posts: 99
Default Re: VDPAU + xrandr refresh rate change

one question on this: do we neccesarily run into the preemption when refresh rate changes or might we prevent this from happening by reinitialising parts of vdpau (like the presentation queue) in the relevant moment?
jusst is offline   Reply With Quote

Old 01-06-09, 01:13 PM   #9
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: VDPAU + xrandr refresh rate change

Anything that changes the video output mode, or a VT switch, will require all VDPAU objects to be recreated.
Stephen Warren is offline   Reply With Quote
Old 01-07-09, 08:36 AM   #10
jusst
Registered User
 
Join Date: Mar 2006
Posts: 99
Default Re: VDPAU + xrandr refresh rate change

we set up a reinit method now, which is called from the preemption callback.
that one starts of with a new vdp_device_create_x11(), but this one will just freeze. any ideas on this?
jusst is offline   Reply With Quote
Old 01-07-09, 10:25 AM   #11
Stephen Warren
Moderator
 
Stephen Warren's Avatar
 
Join Date: Aug 2005
Posts: 1,327
Default Re: VDPAU + xrandr refresh rate change

You aren't allowed to call any VDPAU APIs from within the callback itself.
Stephen Warren is offline   Reply With Quote
Old 01-07-09, 11:11 AM   #12
jusst
Registered User
 
Join Date: Mar 2006
Posts: 99
Default Re: VDPAU + xrandr refresh rate change

this also happens when we just set a mark that reinit is needed and we do the reinit right before the next vdp_decoder_render call...
still freezes at vdp_device_create_x11
jusst is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refresh rate fix for all Detonator drivers AshG NVIDIA Windows Graphics Drivers 45 04-27-03 04:55 PM
New 40.41 refresh rate fix ???? Smokey NVIDIA Windows Graphics Drivers 8 08-30-02 01:32 PM
Refresh rate fix for opengl? Zarich NVIDIA Windows Graphics Drivers 1 08-29-02 02:47 PM
Refresh rate not fixed in SP3 Creole Microsoft Windows XP And Vista 2 08-03-02 11:32 AM
Multi monitor refresh rate problem ascully General Hardware 6 07-31-02 02:56 PM

All times are GMT -5. The time now is 11:02 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.