Re: [proaudio] Nvidia drivers with RT kernel

[ Thread Index | Date Index | More lists.tuxfamily.org/proaudio Archives ]


Yeah, I got it working locally, thanks. I was more interested in
getting this to be a proper ebuild in the overlay so that nvidia users
don't have to hand edit their ebuilds themselves (and find these
comments on the mailing list).

On Tue, Oct 26, 2010 at 1:25 PM, Arve Barsnes <arve.barsnes@xxxxxxxxx> wrote:
> To get it working, simply add the following to your ebuild in the
> src_prepare() section:
>
> # Add fix for later RT kernels
> epatch "${FILESDIR}"/256.44-rt-fix.patch
>
> And then create the files/256.44-rt-fix.patch file with the following content:
>
> diff --git a/kernel/nv-linux.h b/kernel/nv-linux.h
> index 3ba43e7..e95460a 100644
> --- a/kernel/nv-linux.h
> +++ b/kernel/nv-linux.h
> @@ -218,16 +218,16 @@ extern int nv_pat_mode;
>  #endif
>
>  #if defined(CONFIG_PREEMPT_RT)
> -typedef atomic_spinlock_t         nv_spinlock_t;
> -#define NV_SPIN_LOCK_INIT(lock)   atomic_spin_lock_init(lock)
> -#define NV_SPIN_LOCK_IRQ(lock)    atomic_spin_lock_irq(lock)
> -#define NV_SPIN_UNLOCK_IRQ(lock)  atomic_spin_unlock_irq(lock)
> -#define NV_SPIN_LOCK_IRQSAVE(lock,flags) atomic_spin_lock_irqsave(lock,flags)
> +typedef raw_spinlock_t         nv_spinlock_t;
> +#define NV_SPIN_LOCK_INIT(lock)   raw_spin_lock_init(lock)
> +#define NV_SPIN_LOCK_IRQ(lock)    raw_spin_lock_irq(lock)
> +#define NV_SPIN_UNLOCK_IRQ(lock)  raw_spin_unlock_irq(lock)
> +#define NV_SPIN_LOCK_IRQSAVE(lock,flags) raw_spin_lock_irqsave(lock,flags)
>  #define NV_SPIN_UNLOCK_IRQRESTORE(lock,flags) \
> -  atomic_spin_unlock_irqrestore(lock,flags)
> -#define NV_SPIN_LOCK(lock)        atomic_spin_lock(lock)
> -#define NV_SPIN_UNLOCK(lock)      atomic_spin_unlock(lock)
> -#define NV_SPIN_UNLOCK_WAIT(lock) atomic_spin_unlock_wait(lock)
> +  raw_spin_unlock_irqrestore(lock,flags)
> +#define NV_SPIN_LOCK(lock)        raw_spin_lock(lock)
> +#define NV_SPIN_UNLOCK(lock)      raw_spin_unlock(lock)
> +#define NV_SPIN_UNLOCK_WAIT(lock) raw_spin_unlock_wait(lock)
>  #else
>  typedef spinlock_t                nv_spinlock_t;
>  #define NV_SPIN_LOCK_INIT(lock)   spin_lock_init(lock)
> @@ -791,7 +791,7 @@ static inline int nv_execute_on_all_cpus(void
> (*func)(void *info), void *info)
>  }
>
>  #if defined(CONFIG_PREEMPT_RT)
> -#define NV_INIT_MUTEX(mutex) semaphore_init(mutex)
> +#define NV_INIT_MUTEX(mutex) sema_init(mutex,1)
>  #else
>  #if !defined(__SEMAPHORE_INITIALIZER) &&
> defined(__COMPAT_SEMAPHORE_INITIALIZER)
>  #define __SEMAPHORE_INITIALIZER __COMPAT_SEMAPHORE_INITIALIZER
> --
> 1.7.2.1
>
>
> Hopefully anyone's e-mail prog won't screw up the lines on that one.
> Of course, if you want to add this to your personal overlay, your
> files directory will need to contain a bunch of other files as well,
> but I'll leave the details of that up to you ;)
>
>
> On 26 October 2010 13:37, Allan Klinbail <sonofzev@xxxxxxxxxxxx> wrote:
>> I would love to get this working too!!
>>
>> (Although I find latency on the gentoo-sources not to be of a problem
>> but it can always be better )...
>>
>>
>> On Sun, 2010-10-24 at 18:23 +0200, Arve Barsnes wrote:
>>> I have this working here, let me know if you need it.
>>>
>>> On 24 October 2010 15:38, Alex Montgomery <apmontgomery@xxxxxxxxx> wrote:
>>> > Hello,
>>> >
>>> > I've been avoiding doing a deep update since the latest nvidia drivers
>>> > have known issues with the RT kernels. However I ran across this
>>> > thread which talks about a working patch that might be maintained by
>>> > the pro-audio overlay:
>>> > http://forums.gentoo.org/viewtopic-p-6455967.html?sid=0ae783b568222fd063e0e7da6e47253f
>>> >
>>> > it references this bug:
>>> > http://bugs.gentoo.org/show_bug.cgi?id=308945
>>> >
>>> > So basically it looks like there is a working patch for the Nvidia
>>> > drivers to compile against the rt-kernel in the overlay, but the patch
>>> > and fixed ebuild are just sitting on some guy's overlay. Would it be
>>> > possible to integrate this into the pro-audio overlay?
>>> >
>>> > Cheers,
>>> > -- Alex
>>> >
>>> >
>>> >
>>>
>>>
>>
>>
>>
>>
>>
>
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/