Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up

2010-03-02 Thread Rafał Miłecki
W dniu 1 marca 2010 17:37 użytkownik Michel Dänzer napisał: > On Sat, 2010-02-27 at 10:33 +0100, Rafał Miłecki wrote: >> W dniu 26 lutego 2010 20:01 użytkownik Ville Syrjälä >> napisał: >> > Disabling the condition check doesn't make sense. >> > >> > You could use a completion. >> > >> > init_co

Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up

2010-03-01 Thread Michel Dänzer
On Sat, 2010-02-27 at 10:33 +0100, Rafał Miłecki wrote: > W dniu 26 lutego 2010 20:01 użytkownik Ville Syrjälä napisał: > > Disabling the condition check doesn't make sense. > > > > You could use a completion. > > > > init_completion(vbl_irq); > > enable_vbl_irq(); > > wait_for_completion(vbl_irq

Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up

2010-02-27 Thread Rafał Miłecki
W dniu 26 lutego 2010 20:01 użytkownik Ville Syrjälä napisał: > Disabling the condition check doesn't make sense. > > You could use a completion. > > init_completion(vbl_irq); > enable_vbl_irq(); > wait_for_completion(vbl_irq); > disable_vbl_irq(); > and call complete(vbl_irq) in the interrupt han

Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up

2010-02-26 Thread Linus Torvalds
On Fri, 26 Feb 2010, Rafał Miłecki wrote: > > Following macro is soemthing that seems to work fine for us, but instead > introducing this to radeon KMS only, I'd like to propose adding this to whole > wait.h. Do you this it's something we should place there? Can someone take > this > patch for m

Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up

2010-02-26 Thread Ville Syrjälä
On Fri, Feb 26, 2010 at 06:33:57PM +0100, Rafał Miłecki wrote: > W dniu 26 lutego 2010 17:14 użytkownik Andrew Morton > napisał: > > On Fri, 26 Feb 2010 11:38:59 +0100 Rafa Miecki wrote: > > > >> +#define wait_interruptible_timeout(wq, timeout) > >>     \ > >> +({                                

Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up

2010-02-26 Thread Rafał Miłecki
W dniu 26 lutego 2010 17:14 użytkownik Andrew Morton napisał: > On Fri, 26 Feb 2010 11:38:59 +0100 Rafa Miecki wrote: > >> +#define wait_interruptible_timeout(wq, timeout) >>     \ >> +({                                   \ >> +    long ret = timeout;                      \ >> +                  

Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up

2010-02-26 Thread Andrew Morton
On Fri, 26 Feb 2010 11:38:59 +0100 Rafa Miecki wrote: > +#define wait_interruptible_timeout(wq, timeout) > \ > +({ \ > +long ret = timeout; \ > +\ > +DEFINE_WAIT(wait); \ >

Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up

2010-02-26 Thread Rafał Miłecki
-- Wiadomość przekazana dalej -- >> From: Rafał Miłecki >> Date: 21 lutego 2010 15:10 >> Subject: [PATCH][RFC] time: add wait_interruptible_timeout macro to >> sleep (w. timeout) until wake_up >> To: Linux Kernel Mailing List , >> dri-devel@lists.sourceforg

Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up

2010-02-26 Thread Thomas Gleixner
CH][RFC] time: add wait_interruptible_timeout macro to > sleep (w. timeout) until wake_up > To: Linux Kernel Mailing List , > dri-devel@lists.sourceforge.net > CC: Rafał Miłecki > > > Signed-off-by: Rafał Miłecki > --- > We try to implement some PM in radeon KMS and we need to sync wi

Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up

2010-02-26 Thread Rafał Miłecki
Forwarding to ppl I could often notice in git log time.h -- Wiadomość przekazana dalej -- From: Rafał Miłecki Date: 21 lutego 2010 15:10 Subject: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up To: Linux Kernel Mailing List , dri-devel

Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up

2010-02-24 Thread Rafał Miłecki
Ping? Can I interpret lack of objections as permission for committing that? If so, by which tree should we get this patch mainline? Dave: this patch is needed for radeon driver. Can we get this through drm-2.6 maybe? -- Rafał ---

Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up

2010-02-21 Thread Rafał Miłecki
W dniu 21 lutego 2010 16:01 użytkownik Thomas Hellstrom napisał: > Rafał Miłecki wrote: >> >> Signed-off-by: Rafał Miłecki >> --- >> We try to implement some PM in radeon KMS and we need to sync with VLBANK >> for >> reclocking engine/memory. The easiest and cleanest way seems to be >> sleeping i

Re: [PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up

2010-02-21 Thread Thomas Hellstrom
Rafał Miłecki wrote: > Signed-off-by: Rafał Miłecki > --- > We try to implement some PM in radeon KMS and we need to sync with VLBANK for > reclocking engine/memory. The easiest and cleanest way seems to be sleeping in > timer handler just before reclocking. Then our IRQ handler calls wake_up and

[PATCH][RFC] time: add wait_interruptible_timeout macro to sleep (w. timeout) until wake_up

2010-02-21 Thread Rafał Miłecki
Signed-off-by: Rafał Miłecki --- We try to implement some PM in radeon KMS and we need to sync with VLBANK for reclocking engine/memory. The easiest and cleanest way seems to be sleeping in timer handler just before reclocking. Then our IRQ handler calls wake_up and we continue reclocking. As you