[PATCH] drm/i915/gvt: destroy dmabuf mutex in intel_gvt_destroy_vgpu

Hang Yuan hang.yuan at linux.intel.com
Tue Aug 7 05:19:58 UTC 2018


On 08/07/2018 10:48 AM, Zhenyu Wang wrote:
> On 2018.08.03 18:29:24 +0800, intel-gvt-dev-bounces at lists.freedesktop.org wrote:
>> From: Hang Yuan <hang.yuan at linux.intel.com>
>>
>> dmabuf mutex is initialized when vgpu is created. Destroy it when vgpu
>> is removed.
>>
>> Fixes: 6046f8b91e87("drm/i915/gvt: initialize dmabuf mutex in vgpu_create")
>> Signed-off-by: Hang Yuan <hang.yuan at linux.intel.com>
>> ---
>>   drivers/gpu/drm/i915/gvt/vgpu.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c b/drivers/gpu/drm/i915/gvt/vgpu.c
>> index 1c8609d..d6ffee3 100644
>> --- a/drivers/gpu/drm/i915/gvt/vgpu.c
>> +++ b/drivers/gpu/drm/i915/gvt/vgpu.c
>> @@ -268,6 +268,7 @@ void intel_gvt_destroy_vgpu(struct intel_vgpu *vgpu)
>>   	intel_vgpu_free_resource(vgpu);
>>   	intel_vgpu_clean_mmio(vgpu);
>>   	intel_vgpu_dmabuf_cleanup(vgpu);
>> +	mutex_destroy(&vgpu->dmabuf_lock);
>>   	mutex_unlock(&vgpu->vgpu_lock);
>>
> 
> We normally ignore to call destroy to mutex, is this helping you for debugging or else?
This patch is just trying to address one review comment on previous 
patch "initialize dmabuf mutex in vgpu_create". Thanks for the review.

>>   	mutex_lock(&gvt->lock);
>> -- 
>> 2.7.4
>>
>> _______________________________________________
>> intel-gvt-dev mailing list
>> intel-gvt-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
> 



More information about the intel-gvt-dev mailing list