[Intel-gfx] [PATCH 14/14] drm/i915/gt: Use intel_gt as the primary object for handling resets

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Thu Jul 11 20:49:51 UTC 2019



On 7/11/19 1:45 PM, Daniele Ceraolo Spurio wrote:
> <snip>
> 
>> --- a/drivers/gpu/drm/i915/selftests/i915_selftest.c
>> +++ b/drivers/gpu/drm/i915/selftests/i915_selftest.c
>> @@ -256,7 +256,7 @@ int __i915_live_setup(void *data)
>>   {
>>       struct drm_i915_private *i915 = data;
>> -    return i915_terminally_wedged(i915);
>> +    return intel_gt_terminally_wedged(&i915->gt);
>>   }
>>   int __i915_live_teardown(int err, void *data)
>> @@ -273,6 +273,27 @@ int __i915_live_teardown(int err, void *data)
>>       return err;
>>   }
>> +int __intel_gt_live_setup(void *data)
>> +{
>> +    struct intel_gt *gt = data;
>> +
>> +    return intel_gt_terminally_wedged(gt);
>> +}
>> +
>> +int __intel_gt_live_teardown(int err, void *data)
>> +{
>> +    struct intel_gt *gt = data;
>> +
>> +    mutex_lock(&gt->i915->drm.struct_mutex);
>> +    if (igt_flush_test(gt->i915, I915_WAIT_LOCKED))
>> +        err = -EIO;
>> +    mutex_unlock(&gt->i915->drm.struct_mutex);
>> +
>> +    i915_gem_drain_freed_objects(gt->i915);
>> +
>> +    return err;
>> +}
> 
> this is basically a copy of __i915_live_teardown, it might be worth 
> having one of the 2 functions call into the other if you're not planning 
> to have them diverge in the short term.
> 
> s/intel_gpu_reset/intel_gt_reset/ also didn't materialize but I'm happy 
> for that to come later.
> 
> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> 

I've replied to the wrong version of this patch, the one I've actually 
reviewed is the one in the 18 patches series. They look pretty much the 
same anyway, but I'm clarifying anyway in case there is a difference I 
missed.

Daniele

> P.S.: if you have to respin for other reasons, it'd be nice if you could 
> use a local i915 variable where there are a lot of s/i915/gt->i915/ to 
> keep the diff smaller :P
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list