Skip to contentSkip to conversation

Do we also need to reset HW when execlist mode is enabled?

DISCUSSION Zhi Wang 2 participants 2 messages Jun 24, 2015

lore
Share & tools
lore

Zhi Wang

author
#0 lore raw

Hi Experts:
Recently we found that when i915 module got unloaded, when we were
debugging some bugs in XenGT. It would not reset HW under execlist mode. I'm not sure if this is an issue. But if we keep loading/unloading module with the different submission mode, e.g. from execlist mode to ring buffer mode via loading/unloading i915, this should be a corner case.... Maybe you can provide some advice, or make sure if we need to fix it. :)

If so, we can submit a patch. :)

Code:
void i915_gem_context_fini(struct drm_device *dev)

{
        struct drm_i915_private *dev_priv = dev->dev_private;
        struct intel_context *dctx = dev_priv->ring[RCS].default_context;
        int i;

        if (dctx->legacy_hw_ctx.rcs_state) {
                /* The only known way to stop the gpu from accessing the

hw context is
* to reset it. Do this as the very last operation to
avoid confusing
* other code, leading to spurious errors. */
intel_gpu_reset(dev); // <------------ Move this one to
the beginning of the function.

Thanks,
Zhi.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#1 lore raw
Quoted 20 lines · Zhi Wang

Hi Experts:
Recently we found that when i915 module got unloaded, when we were
debugging some bugs in XenGT. It would not reset HW under execlist mode. I'm not sure if this is an issue. But if we keep loading/unloading module with the different submission mode, e.g. from execlist mode to ring buffer mode via loading/unloading i915, this should be a corner case.... Maybe you can provide some advice, or make sure if we need to fix it. :)

If so, we can submit a patch. :)

Code:
void i915_gem_context_fini(struct drm_device *dev)

{
        struct drm_i915_private *dev_priv = dev->dev_private;
        struct intel_context *dctx = dev_priv->ring[RCS].default_context;
        int i;

        if (dctx->legacy_hw_ctx.rcs_state) {
                /* The only known way to stop the gpu from accessing the
Quoted 6 lines

hw context is
* to reset it. Do this as the very last operation to
avoid confusing
* other code, leading to spurious errors. */
intel_gpu_reset(dev); // <------------ Move this one to
the beginning of the function.

Yeah makes sense, if this fixes up your troubles with module unloading and execlist.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx