[RFC] drm/radeon: userfence IOCTL

2015-04-13 Thread Christian König
On 13.04.2015 18:08, Jerome Glisse wrote: > On Mon, Apr 13, 2015 at 05:45:21PM +0200, Christian König wrote: >> On 13.04.2015 17:31, Jerome Glisse wrote: >>> On Mon, Apr 13, 2015 at 04:52:14PM +0200, Christian König wrote: Hello everyone, we have a requirement for a bit different k

[RFC] drm/radeon: userfence IOCTL

2015-04-13 Thread Christian König
On 13.04.2015 17:39, Jerome Glisse wrote: > On Mon, Apr 13, 2015 at 11:25:30AM -0400, Serguei Sagalovitch wrote: >>> the BO to be kept in the same place while it is mapped inside the kernel >> page table >> ... >>> So this requires that we pin down the BO for the duration of the wait >> IOCTL. >> >

[RFC] drm/radeon: userfence IOCTL

2015-04-13 Thread Christian König
On 13.04.2015 17:31, Jerome Glisse wrote: > On Mon, Apr 13, 2015 at 04:52:14PM +0200, Christian König wrote: >> Hello everyone, >> >> we have a requirement for a bit different kind of fence handling. >> Currently we handle fences completely inside the kernel, but in >> the future we would like to

[RFC] drm/radeon: userfence IOCTL

2015-04-13 Thread Christian König
On 13.04.2015 17:25, Serguei Sagalovitch wrote: > > the BO to be kept in the same place while it is mapped inside the > kernel page table > ... > > So this requires that we pin down the BO for the duration of the > wait IOCTL. > > But my understanding is that it should be not duration of "wait" I

[RFC] drm/radeon: userfence IOCTL

2015-04-13 Thread Christian König
Hello everyone, we have a requirement for a bit different kind of fence handling. Currently we handle fences completely inside the kernel, but in the future we would like to emit multiple fences inside the same IB as well. This works by adding multiple fence commands into an IB which just write

[RFC] drm/radeon: userfence IOCTL

2015-04-13 Thread Jerome Glisse
On Mon, Apr 13, 2015 at 06:55:19PM +0200, Christian König wrote: > On 13.04.2015 18:08, Jerome Glisse wrote: > >On Mon, Apr 13, 2015 at 05:45:21PM +0200, Christian König wrote: > >>On 13.04.2015 17:31, Jerome Glisse wrote: > >>>On Mon, Apr 13, 2015 at 04:52:14PM +0200, Christian König wrote: > >

[RFC] drm/radeon: userfence IOCTL

2015-04-13 Thread Jerome Glisse
On Mon, Apr 13, 2015 at 11:52:19AM -0400, Serguei Sagalovitch wrote: > > Given that the userspace wait fence ioctl has not way to know which > > command buffer it is really waiting after then kernel has no knowledge > > if this user fence will signal at all. > > We could pass BO handle as paramete

[RFC] drm/radeon: userfence IOCTL

2015-04-13 Thread Jerome Glisse
On Mon, Apr 13, 2015 at 05:45:21PM +0200, Christian König wrote: > On 13.04.2015 17:31, Jerome Glisse wrote: > >On Mon, Apr 13, 2015 at 04:52:14PM +0200, Christian König wrote: > >>Hello everyone, > >> > >>we have a requirement for a bit different kind of fence handling. > >>Currently we handle f

[RFC] drm/radeon: userfence IOCTL

2015-04-13 Thread Serguei Sagalovitch
> Given that the userspace wait fence ioctl has not way to know which command buffer it is really waiting after then kernel has no knowledge of if this user fence will signal at all. We could pass BO handle as parameter in the "fence ioctl" to rely on it so kernel will know which BO it is wai

[RFC] drm/radeon: userfence IOCTL

2015-04-13 Thread Jerome Glisse
On Mon, Apr 13, 2015 at 05:35:04PM +0200, Christian König wrote: > On 13.04.2015 17:25, Serguei Sagalovitch wrote: > >> the BO to be kept in the same place while it is mapped inside the kernel > >page table > >... > >> So this requires that we pin down the BO for the duration of the wait > >IOCTL.

[RFC] drm/radeon: userfence IOCTL

2015-04-13 Thread Jerome Glisse
On Mon, Apr 13, 2015 at 11:25:30AM -0400, Serguei Sagalovitch wrote: > > the BO to be kept in the same place while it is mapped inside the kernel > page table > ... > > So this requires that we pin down the BO for the duration of the wait > IOCTL. > > But my understanding is that it should be not

[RFC] drm/radeon: userfence IOCTL

2015-04-13 Thread Serguei Sagalovitch
> Another alternative would be to use the userspace mapping to check the BO value This is what I was thinking. Sincerely yours, Serguei Sagalovitch On 15-04-13 11:35 AM, Christian König wrote: > On 13.04.2015 17:25, Serguei Sagalovitch wrote: >> > the BO to be kept in the same place while it

[RFC] drm/radeon: userfence IOCTL

2015-04-13 Thread Jerome Glisse
On Mon, Apr 13, 2015 at 04:52:14PM +0200, Christian König wrote: > Hello everyone, > > we have a requirement for a bit different kind of fence handling. > Currently we handle fences completely inside the kernel, but in > the future we would like to emit multiple fences inside the same > IB as wel

[RFC] drm/radeon: userfence IOCTL

2015-04-13 Thread Serguei Sagalovitch
> the BO to be kept in the same place while it is mapped inside the kernel page table ... > So this requires that we pin down the BO for the duration of the wait IOCTL. But my understanding is that it should be not duration of "wait" IOCTL but "duration" of command buffer execution. BTW: I w