Re: [RFC 5/7] drm/i915: Wait for GPU to finish before event stop in Gen Perf PMU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 22, 2015 at 02:22:54PM +0100, Chris Wilson wrote:
> On Mon, Jun 22, 2015 at 03:25:07PM +0530, sourab.gupta@xxxxxxxxx wrote:
> > From: Sourab Gupta <sourab.gupta@xxxxxxxxx>
> > 
> > To collect timestamps around any GPU workload, we need to insert
> > commands to capture them into the ringbuffer. Therefore, during the stop event
> > call, we need to wait for GPU to complete processing the last request for
> > which these commands were inserted.
> > We need to ensure this processing is done before event_destroy callback which
> > deallocates the buffer for holding the data.
> 
> There's no reason for this to be synchronous. Just that you need an
> active reference on the output buffer to be only released after the
> final request.

Yeah I think the interaction between OA sampling and GEM is the critical
piece here for both patch series. Step one is to have a per-pmu lock to
keep track of data private to OA and mmio based sampling as a starting
point. Then we need to figure out how to structure the connection without
OA/PMU and gem trampling over each another's feet.

Wrt requests those are refcounted already and just waiting on them doesn't
need dev->struct_mutex. That should be all you need, assuming you do
correctly refcount them ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux