[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-24 Thread Marek Olšák
Alright then. Dave, if you are reading this, feel free not to include the two patches I sent you in the next pull request. Marek On Mon, Oct 24, 2011 at 7:28 PM, Thomas Hellstrom wrote: > Marek, > > The problem is that the patch adds a lot of complicated code where it's not > needed, and I

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-24 Thread Thomas Hellstrom
Marek, The problem is that the patch adds a lot of complicated code where it's not needed, and I don't want to end up reverting that code and re-implementing the new Radeon gem ioctl by myself. Having a list of two fence objects and waiting for either of them shouldn't be that complicated to

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-24 Thread Marek Olšák
Hi Thomas, I have made no progress so far due to lack of time. Would you mind if I fixed the most important things first, which are: - sync objects are not ordered, (A) - every sync object must have its corresponding sync_obj_arg, (B) and if I fixed (C) some time later. I planned on moving the

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-24 Thread Thomas Hellstrom
On 10/24/2011 06:42 PM, Marek Ol??k wrote: > On Sat, Oct 8, 2011 at 1:32 PM, Thomas Hellstrom > wrote: > >> On 10/08/2011 01:27 PM, Ville Syrj?l? wrote: >> >>> On Sat, Oct 08, 2011 at 01:10:13PM +0200, Thomas Hellstrom wrote: >>> >>> On 10/08/2011 12:26 PM, Ville Syrj?l?

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-24 Thread Marek Olšák
On Sat, Oct 8, 2011 at 1:32 PM, Thomas Hellstrom wrote: > On 10/08/2011 01:27 PM, Ville Syrj?l? wrote: >> >> On Sat, Oct 08, 2011 at 01:10:13PM +0200, Thomas Hellstrom wrote: >> >>> >>> On 10/08/2011 12:26 PM, Ville Syrj?l? wrote: >>> On Fri, Oct 07, 2011 at 10:58:13AM +0200, Thomas

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-24 Thread Thomas Hellstrom
On 10/08/2011 12:03 AM, Marek Ol??k wrote: > On Fri, Oct 7, 2011 at 10:00 AM, Thomas Hellstrom > wrote: > >> OK. First I think we need to make a distinction: bo sync objects vs driver >> fences. The bo sync obj api is there to strictly provide functionality that >> the ttm bo subsystem is

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-24 Thread Thomas Hellstrom
On 10/08/2011 12:03 AM, Marek Olšák wrote: On Fri, Oct 7, 2011 at 10:00 AM, Thomas Hellstromtho...@shipmail.org wrote: OK. First I think we need to make a distinction: bo sync objects vs driver fences. The bo sync obj api is there to strictly provide functionality that the ttm bo subsystem

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-24 Thread Marek Olšák
On Sat, Oct 8, 2011 at 1:32 PM, Thomas Hellstrom tho...@shipmail.org wrote: On 10/08/2011 01:27 PM, Ville Syrjälä wrote: On Sat, Oct 08, 2011 at 01:10:13PM +0200, Thomas Hellstrom wrote: On 10/08/2011 12:26 PM, Ville Syrjälä wrote: On Fri, Oct 07, 2011 at 10:58:13AM +0200, Thomas

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-24 Thread Thomas Hellstrom
On 10/24/2011 06:42 PM, Marek Olšák wrote: On Sat, Oct 8, 2011 at 1:32 PM, Thomas Hellstromtho...@shipmail.org wrote: On 10/08/2011 01:27 PM, Ville Syrjälä wrote: On Sat, Oct 08, 2011 at 01:10:13PM +0200, Thomas Hellstrom wrote: On 10/08/2011 12:26 PM, Ville Syrjälä wrote:

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-24 Thread Marek Olšák
Hi Thomas, I have made no progress so far due to lack of time. Would you mind if I fixed the most important things first, which are: - sync objects are not ordered, (A) - every sync object must have its corresponding sync_obj_arg, (B) and if I fixed (C) some time later. I planned on moving the

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-24 Thread Thomas Hellstrom
Marek, The problem is that the patch adds a lot of complicated code where it's not needed, and I don't want to end up reverting that code and re-implementing the new Radeon gem ioctl by myself. Having a list of two fence objects and waiting for either of them shouldn't be that complicated

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-24 Thread Marek Olšák
Alright then. Dave, if you are reading this, feel free not to include the two patches I sent you in the next pull request. Marek On Mon, Oct 24, 2011 at 7:28 PM, Thomas Hellstrom tho...@shipmail.org wrote: Marek, The problem is that the patch adds a lot of complicated code where it's not

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-08 Thread Ville Syrjälä
On Sat, Oct 08, 2011 at 01:10:13PM +0200, Thomas Hellstrom wrote: > On 10/08/2011 12:26 PM, Ville Syrj?l? wrote: > > On Fri, Oct 07, 2011 at 10:58:13AM +0200, Thomas Hellstrom wrote: > > > >> Oh, and one more style comment below: > >> > >> On 08/07/2011 10:39 PM, Marek Ol??k wrote: > >>

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-08 Thread Thomas Hellstrom
On 10/08/2011 01:27 PM, Ville Syrj?l? wrote: > On Sat, Oct 08, 2011 at 01:10:13PM +0200, Thomas Hellstrom wrote: > >> On 10/08/2011 12:26 PM, Ville Syrj?l? wrote: >> >>> On Fri, Oct 07, 2011 at 10:58:13AM +0200, Thomas Hellstrom wrote: >>> >>> Oh, and one more style comment

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-08 Thread Ville Syrjälä
On Fri, Oct 07, 2011 at 10:58:13AM +0200, Thomas Hellstrom wrote: > Oh, and one more style comment below: > > On 08/07/2011 10:39 PM, Marek Ol??k wrote: > > > > +enum ttm_buffer_usage { > > +TTM_USAGE_READ = 1, > > +TTM_USAGE_WRITE = 2, > > +TTM_USAGE_READWRITE = TTM_USAGE_READ |

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-08 Thread Thomas Hellstrom
On 10/08/2011 12:26 PM, Ville Syrj?l? wrote: > On Fri, Oct 07, 2011 at 10:58:13AM +0200, Thomas Hellstrom wrote: > >> Oh, and one more style comment below: >> >> On 08/07/2011 10:39 PM, Marek Ol??k wrote: >> >>> +enum ttm_buffer_usage { >>> +TTM_USAGE_READ = 1, >>> +

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-08 Thread Thomas Hellstrom
On 10/07/2011 11:30 PM, Marek Ol??k wrote: > On Fri, Oct 7, 2011 at 3:38 PM, Jerome Glisse wrote: > >> I should have look at the patch long ago ... anyway i think a better >> approach would be to expose fence id as 64bits unsigned to each >> userspace client. I was thinking of mapping a page

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-08 Thread Marek Olšák
On Fri, Oct 7, 2011 at 10:00 AM, Thomas Hellstrom wrote: > OK. First I think we need to make a distinction: bo sync objects vs driver > fences. The bo sync obj api is there to strictly provide functionality that > the ttm bo subsystem is using, and that follows a simple set of rules: > > 1) the

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-08 Thread Marek Olšák
On Fri, Oct 7, 2011 at 3:38 PM, Jerome Glisse wrote: > I should have look at the patch long ago ... anyway i think a better > approach would be to expose fence id as 64bits unsigned to each > userspace client. I was thinking of mapping a page readonly (same page > as the one gpu write back) at

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-08 Thread Marek Olšák
On Fri, Oct 7, 2011 at 3:42 PM, Jerome Glisse wrote: > Forget to mention that we would need a new wait_fence ioctl to wait > for a specific fence seq on a specific ring We need a wait_fence ioctl anyway and even with a timeout parameter. It's a mandatory OpenGL feature. r600g uses a loop with

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-08 Thread Thomas Hellstrom
On 10/07/2011 11:30 PM, Marek Olšák wrote: On Fri, Oct 7, 2011 at 3:38 PM, Jerome Glissej.gli...@gmail.com wrote: I should have look at the patch long ago ... anyway i think a better approach would be to expose fence id as 64bits unsigned to each userspace client. I was thinking of mapping

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-08 Thread Ville Syrjälä
On Fri, Oct 07, 2011 at 10:58:13AM +0200, Thomas Hellstrom wrote: Oh, and one more style comment below: On 08/07/2011 10:39 PM, Marek Olšák wrote: +enum ttm_buffer_usage { +TTM_USAGE_READ = 1, +TTM_USAGE_WRITE = 2, +TTM_USAGE_READWRITE = TTM_USAGE_READ | TTM_USAGE_WRITE

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-08 Thread Thomas Hellstrom
On 10/08/2011 12:26 PM, Ville Syrjälä wrote: On Fri, Oct 07, 2011 at 10:58:13AM +0200, Thomas Hellstrom wrote: Oh, and one more style comment below: On 08/07/2011 10:39 PM, Marek Olšák wrote: +enum ttm_buffer_usage { +TTM_USAGE_READ = 1, +TTM_USAGE_WRITE = 2, +

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-08 Thread Ville Syrjälä
On Sat, Oct 08, 2011 at 01:10:13PM +0200, Thomas Hellstrom wrote: On 10/08/2011 12:26 PM, Ville Syrjälä wrote: On Fri, Oct 07, 2011 at 10:58:13AM +0200, Thomas Hellstrom wrote: Oh, and one more style comment below: On 08/07/2011 10:39 PM, Marek Olšák wrote: +enum

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-08 Thread Thomas Hellstrom
On 10/08/2011 01:27 PM, Ville Syrjälä wrote: On Sat, Oct 08, 2011 at 01:10:13PM +0200, Thomas Hellstrom wrote: On 10/08/2011 12:26 PM, Ville Syrjälä wrote: On Fri, Oct 07, 2011 at 10:58:13AM +0200, Thomas Hellstrom wrote: Oh, and one more style comment below: On 08/07/2011

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Thomas Hellstrom
On 10/07/2011 03:38 PM, Jerome Glisse wrote: > On Fri, Oct 7, 2011 at 4:00 AM, Thomas Hellstrom > wrote: > >> On 10/07/2011 12:42 AM, Marek Ol??k wrote: >> >>> On Wed, Oct 5, 2011 at 7:54 AM, Thomas Hellstrom >>> wrote: >>> >>> In any case, I'm not saying fences is the

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Thomas Hellstrom
On 10/07/2011 03:24 PM, Alex Deucher wrote: > On Fri, Oct 7, 2011 at 4:00 AM, Thomas Hellstrom > wrote: > >> On 10/07/2011 12:42 AM, Marek Ol??k wrote: >> >>> On Wed, Oct 5, 2011 at 7:54 AM, Thomas Hellstrom >>> wrote: >>> >>> In any case, I'm not saying fences is the

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Thomas Hellstrom
Oh, and one more style comment below: On 08/07/2011 10:39 PM, Marek Ol??k wrote: > > +enum ttm_buffer_usage { > +TTM_USAGE_READ = 1, > +TTM_USAGE_WRITE = 2, > +TTM_USAGE_READWRITE = TTM_USAGE_READ | TTM_USAGE_WRITE > +}; > > Please don't use enums for bit operations. #define

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Alex Deucher
On Fri, Oct 7, 2011 at 10:05 AM, Thomas Hellstrom wrote: > On 10/07/2011 03:24 PM, Alex Deucher wrote: >> >> On Fri, Oct 7, 2011 at 4:00 AM, Thomas Hellstrom >> ?wrote: >> >>> >>> On 10/07/2011 12:42 AM, Marek Ol??k wrote: >>> On Wed, Oct 5, 2011 at 7:54 AM, Thomas Hellstrom

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Thomas Hellstrom
On 10/07/2011 12:42 AM, Marek Ol??k wrote: > On Wed, Oct 5, 2011 at 7:54 AM, Thomas Hellstrom > wrote: > >> In any case, I'm not saying fences is the best way to flush but since the bo >> code assumes that signaling a sync object means "make the buffer contents >> available for CPU read /

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Jerome Glisse
On Fri, Oct 7, 2011 at 9:38 AM, Jerome Glisse wrote: > On Fri, Oct 7, 2011 at 4:00 AM, Thomas Hellstrom > wrote: >> On 10/07/2011 12:42 AM, Marek Ol??k wrote: >>> >>> On Wed, Oct 5, 2011 at 7:54 AM, Thomas Hellstrom >>> ?wrote: >>> In any case, I'm not saying fences is the best way to

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Jerome Glisse
On Fri, Oct 7, 2011 at 4:00 AM, Thomas Hellstrom wrote: > On 10/07/2011 12:42 AM, Marek Ol??k wrote: >> >> On Wed, Oct 5, 2011 at 7:54 AM, Thomas Hellstrom >> ?wrote: >> >>> >>> In any case, I'm not saying fences is the best way to flush but since the >>> bo >>> code assumes that signaling a sync

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Alex Deucher
On Fri, Oct 7, 2011 at 4:00 AM, Thomas Hellstrom wrote: > On 10/07/2011 12:42 AM, Marek Ol??k wrote: >> >> On Wed, Oct 5, 2011 at 7:54 AM, Thomas Hellstrom >> ?wrote: >> >>> >>> In any case, I'm not saying fences is the best way to flush but since the >>> bo >>> code assumes that signaling a sync

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Marek Olšák
On Wed, Oct 5, 2011 at 7:54 AM, Thomas Hellstrom wrote: > In any case, I'm not saying fences is the best way to flush but since the bo > code assumes that signaling a sync object means "make the buffer contents > available for CPU read / write", it's usually a good way to do it; there's > even a

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Thomas Hellstrom
On 10/07/2011 12:42 AM, Marek Olšák wrote: On Wed, Oct 5, 2011 at 7:54 AM, Thomas Hellstromtho...@shipmail.org wrote: In any case, I'm not saying fences is the best way to flush but since the bo code assumes that signaling a sync object means make the buffer contents available for CPU read

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Thomas Hellstrom
Oh, and one more style comment below: On 08/07/2011 10:39 PM, Marek Olšák wrote: +enum ttm_buffer_usage { +TTM_USAGE_READ = 1, +TTM_USAGE_WRITE = 2, +TTM_USAGE_READWRITE = TTM_USAGE_READ | TTM_USAGE_WRITE +}; Please don't use enums for bit operations. #define

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Alex Deucher
On Fri, Oct 7, 2011 at 4:00 AM, Thomas Hellstrom tho...@shipmail.org wrote: On 10/07/2011 12:42 AM, Marek Olšák wrote: On Wed, Oct 5, 2011 at 7:54 AM, Thomas Hellstromtho...@shipmail.org  wrote: In any case, I'm not saying fences is the best way to flush but since the bo code assumes that

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Jerome Glisse
On Fri, Oct 7, 2011 at 4:00 AM, Thomas Hellstrom tho...@shipmail.org wrote: On 10/07/2011 12:42 AM, Marek Olšák wrote: On Wed, Oct 5, 2011 at 7:54 AM, Thomas Hellstromtho...@shipmail.org  wrote: In any case, I'm not saying fences is the best way to flush but since the bo code assumes that

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Jerome Glisse
On Fri, Oct 7, 2011 at 9:38 AM, Jerome Glisse j.gli...@gmail.com wrote: On Fri, Oct 7, 2011 at 4:00 AM, Thomas Hellstrom tho...@shipmail.org wrote: On 10/07/2011 12:42 AM, Marek Olšák wrote: On Wed, Oct 5, 2011 at 7:54 AM, Thomas Hellstromtho...@shipmail.org  wrote: In any case, I'm not

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Thomas Hellstrom
On 10/07/2011 03:24 PM, Alex Deucher wrote: On Fri, Oct 7, 2011 at 4:00 AM, Thomas Hellstromtho...@shipmail.org wrote: On 10/07/2011 12:42 AM, Marek Olšák wrote: On Wed, Oct 5, 2011 at 7:54 AM, Thomas Hellstromtho...@shipmail.org wrote: In any case, I'm not saying fences

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Thomas Hellstrom
On 10/07/2011 03:38 PM, Jerome Glisse wrote: On Fri, Oct 7, 2011 at 4:00 AM, Thomas Hellstromtho...@shipmail.org wrote: On 10/07/2011 12:42 AM, Marek Olšák wrote: On Wed, Oct 5, 2011 at 7:54 AM, Thomas Hellstromtho...@shipmail.org wrote: In any case, I'm not saying

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Alex Deucher
On Fri, Oct 7, 2011 at 10:05 AM, Thomas Hellstrom tho...@shipmail.org wrote: On 10/07/2011 03:24 PM, Alex Deucher wrote: On Fri, Oct 7, 2011 at 4:00 AM, Thomas Hellstromtho...@shipmail.org  wrote: On 10/07/2011 12:42 AM, Marek Olšák wrote: On Wed, Oct 5, 2011 at 7:54 AM, Thomas

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Marek Olšák
On Fri, Oct 7, 2011 at 3:38 PM, Jerome Glisse j.gli...@gmail.com wrote: I should have look at the patch long ago ... anyway i think a better approach would be to expose fence id as 64bits unsigned to each userspace client. I was thinking of mapping a page readonly (same page as the one gpu

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-07 Thread Marek Olšák
On Fri, Oct 7, 2011 at 10:00 AM, Thomas Hellstrom tho...@shipmail.org wrote: OK. First I think we need to make a distinction: bo sync objects vs driver fences. The bo sync obj api is there to strictly provide functionality that the ttm bo subsystem is using, and that follows a simple set of

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-05 Thread Thomas Hellstrom
On 10/05/2011 04:08 AM, Marek Ol??k wrote: > On Tue, Oct 4, 2011 at 1:48 PM, Thomas Hellstrom > wrote: > >> Bah, I totally missed this patch and thus never reviewed it :( Probably on >> vacation. >> >> There are a couple of things I'd like to point out. >> >> 1) The bo subsystem may never

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-05 Thread Marek Olšák
On Tue, Oct 4, 2011 at 1:48 PM, Thomas Hellstrom wrote: > Bah, I totally missed this patch and thus never reviewed it :( Probably on > vacation. > > There are a couple of things I'd like to point out. > > 1) The bo subsystem may never assume that fence objects are ordered, so that > when we unref

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-04 Thread Thomas Hellstrom
On 08/07/2011 10:39 PM, Marek Ol??k wrote: > Sometimes we want to know whether a buffer is busy and wait for it (bo_wait). > However, sometimes it would be more useful to be able to query whether > a buffer is busy and being either read or written, and wait until it's stopped > being either read

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-04 Thread Marek Olšák
On Tue, Oct 4, 2011 at 1:48 PM, Thomas Hellstrom tho...@shipmail.org wrote: Bah, I totally missed this patch and thus never reviewed it :( Probably on vacation. There are a couple of things I'd like to point out. 1) The bo subsystem may never assume that fence objects are ordered, so that

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-10-04 Thread Thomas Hellstrom
On 10/05/2011 04:08 AM, Marek Olšák wrote: On Tue, Oct 4, 2011 at 1:48 PM, Thomas Hellstromtho...@shipmail.org wrote: Bah, I totally missed this patch and thus never reviewed it :( Probably on vacation. There are a couple of things I'd like to point out. 1) The bo subsystem may never

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-08-13 Thread Marek Olšák
On Fri, Aug 12, 2011 at 7:21 PM, Jerome Glisse wrote: >> diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c >> b/drivers/gpu/drm/ttm/ttm_execbuf_util.c >> index 3832fe1..0438296 100644 >> --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c >> +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c >> @@ -223,6

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-08-12 Thread Jerome Glisse
On Sun, Aug 7, 2011 at 4:39 PM, Marek Ol??k wrote: > Sometimes we want to know whether a buffer is busy and wait for it (bo_wait). > However, sometimes it would be more useful to be able to query whether > a buffer is busy and being either read or written, and wait until it's stopped > being

Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-08-12 Thread Jerome Glisse
On Sun, Aug 7, 2011 at 4:39 PM, Marek Olšák mar...@gmail.com wrote: Sometimes we want to know whether a buffer is busy and wait for it (bo_wait). However, sometimes it would be more useful to be able to query whether a buffer is busy and being either read or written, and wait until it's stopped

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-08-07 Thread Marek Olšák
Sometimes we want to know whether a buffer is busy and wait for it (bo_wait). However, sometimes it would be more useful to be able to query whether a buffer is busy and being either read or written, and wait until it's stopped being either read or written. The point of this is to be able to avoid

[PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write

2011-08-07 Thread Marek Olšák
Sometimes we want to know whether a buffer is busy and wait for it (bo_wait). However, sometimes it would be more useful to be able to query whether a buffer is busy and being either read or written, and wait until it's stopped being either read or written. The point of this is to be able to avoid