Re: [PATCH 1/4] drm/i915: Do a synchronous switch-to-kernel-context on idling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 08/03/2019 12:46, Chris Wilson wrote:
Quoting Chris Wilson (2019-03-08 12:44:16)
Quoting Chris Wilson (2019-03-08 09:36:54)
+static bool switch_to_kernel_context_sync(struct drm_i915_private *i915)
+{
+       bool result = true;
+
+       /*
+        * Even if we fail to switch, give whatever is running a small chance
+        * to save itself before we report the failure. Yes, this may be a
+        * false positive due to e.g. ENOMEM, caveat emptor!
+        */
+       if (i915_gem_switch_to_kernel_context(i915))
+               result = false;
+
+       if (i915_gem_wait_for_idle(i915,
+                                  I915_WAIT_LOCKED |
+                                  I915_WAIT_FOR_IDLE_BOOST,
+                                  I915_GEM_IDLE_TIMEOUT))
+               result = false;
+
+       if (result) {
+               assert_kernel_context_is_current(i915);
+       } else {

         if (intel_has_gpu_reset()) {

+               /* Forcibly cancel outstanding work and leave the gpu quiet. */
+               dev_err(i915->drm.dev,
+                       "Failed to idle engines, declaring wedged!\n");
+               GEM_TRACE_DUMP();

         }

To prevent it spewing just for gem_eio???

I think the error message is important, but gem_eio is a bit of an arm
twister.

On the other hand, gem_eio does show that this can be user invoked so is
anything above a dev_notice() required?

Varying log level depending on intel_has_gpu_reset sounds like the answer.

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux