Re: [Intel-gfx] [PATCH 2/2] drm/i915/execlists: Ensure the context is reloaded after a GPU reset
Quoting Mika Kuoppala (2019-09-12 12:53:01) > Chris Wilson writes: > > > After we manipulate the context to allow replay after a GPU reset, force > > that context to be reloaded. This should be a layer of paranoia, for if > > the GPU was reset, the context will no longer be resident! > > > > Signed-off-by: Chris Wilson > > Cc: Mika Kuoppala > > --- > > drivers/gpu/drm/i915/gt/intel_lrc.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c > > b/drivers/gpu/drm/i915/gt/intel_lrc.c > > index dbc90da2341a..47d766ccea71 100644 > > --- a/drivers/gpu/drm/i915/gt/intel_lrc.c > > +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c > > @@ -2445,6 +2445,7 @@ static void __execlists_reset(struct intel_engine_cs > > *engine, bool stalled) > > intel_ring_update_space(ce->ring); > > __execlists_reset_reg_state(ce, engine); > > __execlists_update_reg_state(ce, engine); > > + ce->lrc_desc |= CTX_DESC_FORCE_RESTORE; /* paranoid: GPU was > > reset! */ > > The CCID should be reset also, but I see no harm to be explicit. Yeah, I think it's developing into a healthy enough pattern. If we ever manipulate anything inside the image itself, we should probably force the restore. A bit more mulling over that, I like the current comment :) -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/2] drm/i915/execlists: Ensure the context is reloaded after a GPU reset
Chris Wilson writes: > After we manipulate the context to allow replay after a GPU reset, force > that context to be reloaded. This should be a layer of paranoia, for if > the GPU was reset, the context will no longer be resident! > > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_lrc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c > b/drivers/gpu/drm/i915/gt/intel_lrc.c > index dbc90da2341a..47d766ccea71 100644 > --- a/drivers/gpu/drm/i915/gt/intel_lrc.c > +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c > @@ -2445,6 +2445,7 @@ static void __execlists_reset(struct intel_engine_cs > *engine, bool stalled) > intel_ring_update_space(ce->ring); > __execlists_reset_reg_state(ce, engine); > __execlists_update_reg_state(ce, engine); > + ce->lrc_desc |= CTX_DESC_FORCE_RESTORE; /* paranoid: GPU was > reset! */ The CCID should be reset also, but I see no harm to be explicit. Acked-by: Mika Kuoppala > mutex_release(>pin_mutex.dep_map, 0, _THIS_IP_); > > unwind: > -- > 2.23.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 2/2] drm/i915/execlists: Ensure the context is reloaded after a GPU reset
After we manipulate the context to allow replay after a GPU reset, force that context to be reloaded. This should be a layer of paranoia, for if the GPU was reset, the context will no longer be resident! Signed-off-by: Chris Wilson Cc: Mika Kuoppala --- drivers/gpu/drm/i915/gt/intel_lrc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c index dbc90da2341a..47d766ccea71 100644 --- a/drivers/gpu/drm/i915/gt/intel_lrc.c +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c @@ -2445,6 +2445,7 @@ static void __execlists_reset(struct intel_engine_cs *engine, bool stalled) intel_ring_update_space(ce->ring); __execlists_reset_reg_state(ce, engine); __execlists_update_reg_state(ce, engine); + ce->lrc_desc |= CTX_DESC_FORCE_RESTORE; /* paranoid: GPU was reset! */ mutex_release(>pin_mutex.dep_map, 0, _THIS_IP_); unwind: -- 2.23.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 2/2] drm/i915/execlists: Ensure the context is reloaded after a GPU reset
After we manipulate the context to allow replay after a GPU reset, force that context to be reloaded. This should be a layer of paranoia, for if the GPU was reset, the context will no longer be resident! Signed-off-by: Chris Wilson Cc: Mika Kuoppala --- drivers/gpu/drm/i915/gt/intel_lrc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c index 61a38a4ccbca..40b479d0ca5d 100644 --- a/drivers/gpu/drm/i915/gt/intel_lrc.c +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c @@ -2921,6 +2921,7 @@ static void __execlists_reset(struct intel_engine_cs *engine, bool stalled) intel_ring_update_space(ce->ring); __execlists_reset_reg_state(ce, engine); __execlists_update_reg_state(ce, engine); + ce->lrc_desc |= CTX_DESC_FORCE_RESTORE; /* paranoid: GPU was reset! */ __context_pin_release(ce); unwind: -- 2.23.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx