[PATCH 6/7] drm/i915: Store last context instead of the obj

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

 



On Fri, Apr 05, 2013 at 08:51:57AM +0100, Chris Wilson wrote:
> On Thu, Apr 04, 2013 at 04:41:53PM -0700, Ben Widawsky wrote:
> > Storing the last context requires refcounting. Mika recently submitted
> > some refcounting patches which leverages our request mechanism. This is
> > insufficient for my needs because we want to know the last context even
> > if the request has ended, ie. doing the kref_put when a request is
> > finished isn't okay (unless we switch back to the default context, and
> > wait for the switch)
> 
> This does not address Mika's requirements for tracking a ctx on each
> request - but note that request->ctx can be used here instead.
> -Chris
> 
> -- 
> Chris Wilson, Intel Open Source Technology Centre

First of all, I've realized my patch fails to accomplish what I set out
to accomplish.

My patch and Mika's patch are both subject to the same problem. Keep in
mind that I wanted access to the last context for the ring. If userspace
calls destroy, and the request completes, the refcount will drop to 0.
If you tried to access last context at that point, you're in trouble.

As I mentioned in response on patch 0/7 I now think I can get away
without needing the last context (at least for current GEN) because the
PDEs are global to all rings, so we can ignore this for now. I'll go
back and debug why Mika's patch was blowing up when I tried it before.

Thanks for taking the time to review. If you're bored, check if any of
the other patches are interesting ;-)

-- 
Ben Widawsky, Intel Open Source Technology Center


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