From: Arun Siluvery <arun.siluvery@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
intel-gfx@lists.freedesktop.org,
Mika Kuoppala <mika.kuoppala@linux.intel.com>
Subject: Re: [PATCH 03/11] drm/i915/tdr: Update reset_in_progress to account for engine reset
Date: Wed, 27 Jul 2016 12:16:04 +0100 [thread overview]
Message-ID: <579897F4.2080800@linux.intel.com> (raw)
In-Reply-To: <20160726215242.GG31051@nuc-i3427.alporthouse.com>
On 26/07/2016 22:52, Chris Wilson wrote:
> On Tue, Jul 26, 2016 at 05:40:49PM +0100, Arun Siluvery wrote:
>> Now that we track reset progress using separate set of flags, update it to
>> account for engine reset as well.
>>
>> A bit corresponding engine->id is set if reset is in progress for that
>> engine. Bit0 is for full gpu reset.
>>
>> Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com>
>> ---
>> drivers/gpu/drm/i915/i915_drv.h | 16 +++++++++++++++-
>> 1 file changed, 15 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
>> index 11436e7..125fafa 100644
>> --- a/drivers/gpu/drm/i915/i915_drv.h
>> +++ b/drivers/gpu/drm/i915/i915_drv.h
>> @@ -1403,6 +1403,8 @@ struct i915_gpu_error {
>> #define I915_RESET_IN_PROGRESS 0
>> #define I915_WEDGED (BITS_PER_LONG-1)
>>
>> + unsigned long engine_reset_count[I915_NUM_ENGINES];
>> +
>> /**
>> * Waitqueue to signal when a hang is detected. Used to for waiters
>> * to release the struct_mutex for the reset to procede.
>> @@ -3194,9 +3196,10 @@ i915_gem_find_active_request(struct intel_engine_cs *engine);
>> void i915_gem_retire_requests(struct drm_i915_private *dev_priv);
>> void i915_gem_retire_requests_ring(struct intel_engine_cs *engine);
>>
>> +/* indicates the progress of engine reset or full gpu reset */
>> static inline bool i915_reset_in_progress(struct i915_gpu_error *error)
>> {
>> - return test_bit(I915_RESET_IN_PROGRESS, &error->flags);
>> + return unlikely(READ_ONCE(error->flags) & ~BIT(I915_WEDGED));
>> }
>>
>> static inline bool i915_terminally_wedged(struct i915_gpu_error *error)
>> @@ -3214,6 +3217,17 @@ static inline u32 i915_reset_count(struct i915_gpu_error *error)
>> return READ_ONCE(error->reset_count);
>> }
>>
>> +static inline bool i915_full_gpu_reset_in_progress(struct i915_gpu_error *error)
>> +{
>> + return test_bit(I915_RESET_IN_PROGRESS, &error->flags);
>> +}
>> +
>> +static inline bool i915_engine_reset_in_progress(struct i915_gpu_error *error,
>> + struct intel_engine_cs *engine)
>> +{
>> + return test_bit(engine->id + 1, &error->flags);
>> +}
>
> ?
>
> A totally unexplained change. If it is because you think to want to break
> waiters on struct_mutex, try again.
So you don't want error->flags to include engine reset bits?
ok, it should be possible to use engine_mask itself.
Next patch separates engine reset and full gpu reset in separate
functions, for branching purposes i915_full_gpu_reset_in_progress() is
added, is this ok or directly use test_bit() ?
regards
Arun
> -Chris
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-07-27 11:16 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-26 16:40 [PATCH 00/11] Execlist based Engine reset patches Arun Siluvery
2016-07-26 16:40 ` [PATCH 01/11] drm/i915: Update i915.reset to handle engine resets Arun Siluvery
2016-07-26 16:40 ` [PATCH 02/11] drm/i915: Separate out reset flags from the reset counter Arun Siluvery
2016-07-26 16:40 ` [PATCH 03/11] drm/i915/tdr: Update reset_in_progress to account for engine reset Arun Siluvery
2016-07-26 21:52 ` Chris Wilson
2016-07-27 11:16 ` Arun Siluvery [this message]
2016-07-27 11:41 ` Chris Wilson
2016-07-27 11:52 ` Arun Siluvery
2016-07-26 16:40 ` [PATCH 04/11] drm/i915/tdr: Modify error handler for per engine hang recovery Arun Siluvery
2016-07-26 16:40 ` [PATCH 05/11] drm/i915/tdr: Identify hung request and drop it Arun Siluvery
2016-07-26 21:37 ` Chris Wilson
2016-07-27 11:54 ` Arun Siluvery
2016-07-27 12:27 ` Chris Wilson
2016-07-27 21:35 ` Resubmitting requests following the hang Chris Wilson
2016-07-27 21:35 ` [PATCH 1/3] drm/i915: Record the position of the start of the request Chris Wilson
2016-07-27 21:35 ` [PATCH 2/3] lrc Chris Wilson
2016-07-27 21:36 ` [PATCH 3/3] reset-request-recovery Chris Wilson
2016-07-26 16:40 ` [PATCH 06/11] drm/i915/tdr: Restart submission after engine reset Arun Siluvery
2016-07-26 21:32 ` Chris Wilson
2016-07-26 16:40 ` [PATCH 07/11] drm/i915/tdr: Add support for per engine reset recovery Arun Siluvery
2016-07-26 21:51 ` Chris Wilson
2016-07-27 11:49 ` Arun Siluvery
2016-07-26 16:40 ` [PATCH 08/11] drm/i915: Skip reset request if there is one already Arun Siluvery
2016-07-26 16:40 ` [PATCH 09/11] drm/i915/tdr: Add engine reset count to error state Arun Siluvery
2016-07-26 16:40 ` [PATCH 10/11] drm/i915/tdr: Export reset count info to debugfs Arun Siluvery
2016-07-26 16:40 ` [PATCH 11/11] drm/i915/tdr: Enable Engine reset and recovery support Arun Siluvery
2016-07-26 17:11 ` ✗ Ro.CI.BAT: failure for Execlist based Engine reset patches Patchwork
2016-07-28 5:40 ` ✗ Ro.CI.BAT: failure for Execlist based Engine reset patches (rev4) Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=579897F4.2080800@linux.intel.com \
--to=arun.siluvery@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox