Re: Multiple hardware locks

2004-11-02 Thread Thomas Hellström
> --- Thomas Hellström <[EMAIL PROTECTED]> wrote: > >> >> You are probably right, and it would be quite easy to implement such >> checks in the via command verifier as long as each lock is associated >> with >> a certain hardware address range. >> >> However, I don't quite see the point in plugging

Other security issue (WAS Re: Multiple hardware locks)

2004-11-02 Thread Thomas HellstrÃm
Michel DÃnzer wrote: On Mon, 2004-11-01 at 14:21 +0100, Thomas HellstrÃm wrote: Hmm, correct me If I'm wrong, but after a brief check in the code, it seems like the current _DRM_LOCK_IS_HELD() used in dma buffer submission IOCTLS just checks that the lock is indeed held, but not i

Re: Multiple hardware locks

2004-11-01 Thread Michel Dänzer
On Mon, 2004-11-01 at 14:21 +0100, Thomas HellstrÃm wrote: > > Hmm, correct me If I'm wrong, but after a brief check in the code, it > seems like the current _DRM_LOCK_IS_HELD() used in dma buffer > submission IOCTLS just checks that the lock is indeed held, but not if > it is held by the current

Re: Multiple hardware locks

2004-11-01 Thread Mike Mestnik
--- Nicolai Haehnle <[EMAIL PROTECTED]> wrote: > On Monday 01 November 2004 07:01, Thomas Hellström wrote: > > You are probably right, and it would be quite easy to implement such > > checks in the via command verifier as long as each lock is associated > with > > a certain hardware address range

Re: Multiple hardware locks

2004-11-01 Thread Mike Mestnik
--- Thomas Hellström <[EMAIL PROTECTED]> wrote: > > You are probably right, and it would be quite easy to implement such > checks in the via command verifier as long as each lock is associated > with > a certain hardware address range. > > However, I don't quite see the point in plugging such a

Re: Multiple hardware locks

2004-11-01 Thread Ian Romanick
Thomas Hellström wrote: I want a DRI client to flip a video frame to screen, using a hardware entity called the HQV. This is a rather time critical operation. To do this I have to take the hardware lock. While this is happening, another thread is waiting for the mpeg decoder to complete a frame

Re: Multiple hardware locks

2004-11-01 Thread Thomas Hellström
Nicolai Haehnle wrote: On Monday 01 November 2004 07:01, Thomas Hellström wrote: You are probably right, and it would be quite easy to implement such checks in the via command verifier as long as each lock is associated with a certain hardware address range. However, I don't quite

Re: Multiple hardware locks

2004-11-01 Thread Nicolai Haehnle
On Monday 01 November 2004 07:01, Thomas Hellström wrote: > You are probably right, and it would be quite easy to implement such > checks in the via command verifier as long as each lock is associated with > a certain hardware address range. > > However, I don't quite see the point in plugging suc

Re: Multiple hardware locks

2004-11-01 Thread Keith Whitwell
Thomas Hellström wrote: On Sun, 2004-10-31 at 13:18, Thomas Hellström wrote: Keith Whitwell wrote: Thomas Hellström wrote: Hi, list! With display cards that have more and more hardware on them, (TV-capture, mpeg decoders) etc. that can work independently of oneanother, but share the same DMA engi

Re: Multiple hardware locks

2004-10-31 Thread Thomas Hellström
> On Sun, 2004-10-31 at 13:18, Thomas Hellström wrote: >> Keith Whitwell wrote: >> >> > Thomas Hellström wrote: >> > >> >> Hi, list! >> >> >> >> With display cards that have more and more hardware on them, >> >> (TV-capture, mpeg decoders) etc. that can work independently of >> >> oneanother, but s

Re: Multiple hardware locks

2004-10-31 Thread Thomas Hellström
> --- Thomas Hellström <[EMAIL PROTECTED]> wrote: > >> Keith Whitwell wrote: >> >> The typical case here: >> >> I want a DRI client to flip a video frame to screen, using a hardware >> entity called the HQV. This is a rather time critical operation. To do >> this I have to take the hardware lock. >

Re: Multiple hardware locks

2004-10-31 Thread Mike Mestnik
--- Thomas Hellström <[EMAIL PROTECTED]> wrote: > Keith Whitwell wrote: > > The typical case here: > > I want a DRI client to flip a video frame to screen, using a hardware > entity called the HQV. This is a rather time critical operation. To do > this I have to take the hardware lock. > > W

Re: Multiple hardware locks

2004-10-31 Thread Eric Anholt
On Sun, 2004-10-31 at 13:18, Thomas Hellström wrote: > Keith Whitwell wrote: > > > Thomas Hellström wrote: > > > >> Hi, list! > >> > >> With display cards that have more and more hardware on them, > >> (TV-capture, mpeg decoders) etc. that can work independently of > >> oneanother, but share the

Re: Multiple hardware locks

2004-10-31 Thread Thomas Hellström
Jon Smirl wrote: On Sun, 31 Oct 2004 22:54:25 +0100, Thomas Hellström <[EMAIL PROTECTED]> wrote: Wouldn't this severely break backwards binary compatibility with dri clients compiled with the old size of drm_sarea_t? You can't put them in drm_sarea_t. There is definitel

Re: Multiple hardware locks

2004-10-31 Thread Jon Smirl
On Sun, 31 Oct 2004 22:54:25 +0100, Thomas Hellström <[EMAIL PROTECTED]> wrote: > Wouldn't this severely break backwards binary compatibility with dri clients > compiled with the old size of drm_sarea_t? You can't put them in drm_sarea_t. There is definitely code that will break if you do. I don'

Re: Multiple hardware locks

2004-10-31 Thread Thomas Hellström
Jon Smirl wrote: On Sun, 31 Oct 2004 19:41:03 +0100, Thomas Hellström <[EMAIL PROTECTED]> wrote: /* For now the mapping works by using a fixed size defined * in the SAREA header */ if (sizeof(XF86DRISAREARec)+sizeof(VIASAREAPriv) > SAREA_MAX) { xf86DrvMsg

Re: Multiple hardware locks

2004-10-31 Thread Mike Mestnik
--- Thomas Hellström <[EMAIL PROTECTED]> wrote: > Such a case would be a client submitting 2D engine commands while the X > server waits for 2D engine idle. Either this has to be implemented in > the command verifier or considered acceptable behaviour. Today any dri > client can continously cl

Re: Multiple hardware locks

2004-10-31 Thread Thomas Hellström
Mike Mestnik wrote: --- Thomas Hellström <[EMAIL PROTECTED]> wrote: Hi, list! With display cards that have more and more hardware on them, (TV-capture, mpeg decoders) etc. that can work independently of oneanother, but share the same DMA engine I've find the need for more than

Re: Multiple hardware locks

2004-10-31 Thread Thomas Hellström
Keith Whitwell wrote: Thomas Hellström wrote: Hi, list! With display cards that have more and more hardware on them, (TV-capture, mpeg decoders) etc. that can work independently of oneanother, but share the same DMA engine I've find the need for more than one hardware lock. The first question

Re: Multiple hardware locks

2004-10-31 Thread Mike Mestnik
--- Thomas Hellström <[EMAIL PROTECTED]> wrote: > Hi, list! > > With display cards that have more and more hardware on them, > (TV-capture, mpeg decoders) etc. that can work independently of > oneanother, but share the same DMA engine I've find the need for more > than one hardware lock. I've

Re: Multiple hardware locks

2004-10-31 Thread Keith Whitwell
Thomas Hellström wrote: Hi, list! With display cards that have more and more hardware on them, (TV-capture, mpeg decoders) etc. that can work independently of oneanother, but share the same DMA engine I've find the need for more than one hardware lock. The first question is - have you found tha

Re: Multiple hardware locks

2004-10-31 Thread Jon Smirl
On Sun, 31 Oct 2004 19:41:03 +0100, Thomas Hellström <[EMAIL PROTECTED]> wrote: > > /* For now the mapping works by using a fixed size defined > * in the SAREA header > */ > if (sizeof(XF86DRISAREARec)+sizeof(VIASAREAPriv) > SAREA_MAX) { > xf86DrvMsg(pScrn->scrnIndex, X_E

Re: Multiple hardware locks

2004-10-31 Thread Thomas Hellström
Jon Smirl wrote: On Sun, 31 Oct 2004 18:41:42 +0100, Thomas Hellström <[EMAIL PROTECTED]> wrote: The idea of using a separate sarea is that it would be easy to extend the number of locks and more suitable for more drivers than via. Otherwise one idea would be to fill the private

Re: Multiple hardware locks

2004-10-31 Thread Jon Smirl
On Sun, 31 Oct 2004 18:41:42 +0100, Thomas Hellström <[EMAIL PROTECTED]> wrote: > The idea of using a separate sarea is that it would be easy to extend the > number of locks and more suitable for more drivers than via. Otherwise one > idea would be to > fill the private sarea from the back, but

Re: Multiple hardware locks

2004-10-31 Thread Thomas Hellström
Jon Smirl wrote: On Sun, 31 Oct 2004 16:52:35 +0100, Thomas Hellström <[EMAIL PROTECTED]> wrote: 1. A separate sarea to contain these locks, to avoid messing up the current sarea with binary incompatibilities as a consequence. It would probably be better to extend the cu

Re: Multiple hardware locks

2004-10-31 Thread Jon Smirl
On Sun, 31 Oct 2004 16:52:35 +0100, Thomas Hellström <[EMAIL PROTECTED]> wrote: > 1. A separate sarea to contain these locks, to avoid messing up the > current sarea with binary incompatibilities as a consequence. It would probably be better to extend the current driver specific sarea. You can neg

Multiple hardware locks

2004-10-31 Thread Thomas Hellström
Hi, list! With display cards that have more and more hardware on them, (TV-capture, mpeg decoders) etc. that can work independently of oneanother, but share the same DMA engine I've find the need for more than one hardware lock. I've done a simple implementation for the mpeg decoder of the via