[Intel-gfx] [PATCH 10/15] drm/i915: Avoid sleeping inside per-engine reset
Michel Thierry
michel.thierry at intel.com
Wed Mar 28 21:56:57 UTC 2018
On 28/03/18 14:52, Chris Wilson wrote:
> Quoting Michel Thierry (2018-03-28 22:47:55)
>> On 28/03/18 14:18, Chris Wilson wrote:
>>> @@ -2094,7 +2095,7 @@ int intel_gpu_reset(struct drm_i915_private *dev_priv, unsigned engine_mask)
>>> int retry;
>>> int ret;
>>>
>>> - might_sleep();
>>> + might_sleep_if(engine_mask == ALL_ENGINES);
>>
>> I think this should also be checking for intel_has_reset_engine.
>>
>> If i915.reset is not 2, engine_mask can be != ALL_ENGINES and still be a
>> full device reset.
>
> Can it?
>
> i915_reset -> intel_gpu_reset(ALL_ENGINES);
> i915_reset_engine -> intel_gt_reset_engine -> intel_gpu_reset(BIT(engine->id));
>
> Plus a couple of others poking at intel_gpu_reset(ALL_ENGINES);
>
> Have I missed someone using intel_gpu_reset() directly?
No, you're right, I didn't see i915_reset was passing ALL_ENGINES.
And as you also noted, the only one passing something different than
ALL_ENGINES mask is intel_gt_reset_engine.
> -Chris
>
Reviewed-by: Michel Thierry <michel.thierry at intel.com>
More information about the Intel-gfx
mailing list