[Intel-gfx] [PATCH 10/11] drm/i915: Mark the context and address space as closed
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Thu Dec 17 04:39:37 PST 2015
On 17/12/15 12:37, Tvrtko Ursulin wrote:
>
> Hi,
>
> On 14/12/15 11:36, Chris Wilson wrote:
>> When the user closes the context mark it and the dependent address space
>> as closed. As we use an asynchronous destruct method, this has two
>> purposes.
>> First it allows us to flag the closed context and detect internal
>> errors if
>> we to create any new objects for it (as it is removed from the user's
>> namespace, these should be internal bugs only). And secondly, it allows
>> us to immediately reap stale vma.
>>
>> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
>> ---
>> drivers/gpu/drm/i915/i915_drv.h | 4 ++++
>> drivers/gpu/drm/i915/i915_gem.c | 15 ++++++++-----
>> drivers/gpu/drm/i915/i915_gem_context.c | 39
>> +++++++++++++++++++++++++++++----
>> drivers/gpu/drm/i915/i915_gem_gtt.c | 11 +++++++---
>> drivers/gpu/drm/i915/i915_gem_gtt.h | 9 ++++++++
>> drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +-
>> 6 files changed, 66 insertions(+), 14 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_drv.h
>> b/drivers/gpu/drm/i915/i915_drv.h
>> index 696469a06715..66ecd6b3df95 100644
>> --- a/drivers/gpu/drm/i915/i915_drv.h
>> +++ b/drivers/gpu/drm/i915/i915_drv.h
>> @@ -892,6 +892,8 @@ struct intel_context {
>> } engine[I915_NUM_RINGS];
>>
>> struct list_head link;
>> +
>> + bool closed:1;
>> };
>>
>> enum fb_op_origin {
>> @@ -2720,6 +2722,8 @@ int __must_check i915_vma_unbind(struct i915_vma
>> *vma);
>> * _guarantee_ VMA in question is _not in use_ anywhere.
>> */
>> int __must_check __i915_vma_unbind_no_wait(struct i915_vma *vma);
>> +void i915_vma_close(struct i915_vma *vma);
>> +
>> int i915_gem_object_put_pages(struct drm_i915_gem_object *obj);
>> void i915_gem_release_all_mmaps(struct drm_i915_private *dev_priv);
>> void i915_gem_release_mmap(struct drm_i915_gem_object *obj);
>> diff --git a/drivers/gpu/drm/i915/i915_gem.c
>> b/drivers/gpu/drm/i915/i915_gem.c
>> index 7c13c27a6470..08ea0b7eda8b 100644
>> --- a/drivers/gpu/drm/i915/i915_gem.c
>> +++ b/drivers/gpu/drm/i915/i915_gem.c
>> @@ -2367,12 +2367,13 @@ i915_gem_object_flush_active(struct
>> drm_i915_gem_object *obj)
>> return 0;
>> }
>>
>> -static void i915_vma_close(struct i915_vma *vma)
>
> Can't find this in this series?
Ooops it is in a different mail folder, I did not sport the break in
patch numbers...
Regards,
Tvrtko
More information about the Intel-gfx
mailing list