Quoting Mika Kuoppala (2017-09-04 11:19:09) > Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes: > > +/* > > + * Wait until the work is finally complete, even if it tries to postpone > > + * by requeueing itself. Note, that if the worker never cancels itself, > > + * we will spin forever. > > + */ > > +static inline void drain_delayed_work(struct delayed_work *dw) > > +{ > > + do { > > + while (flush_delayed_work(dw)) > > + ; > > + } while (delayed_work_pending(dw)); > > So we end spinning if someone doesn't let go of mutex. > > Add a timeout for doing this and let it slide into > suspend with a error message anyways instead of spinning > forever? Such error messages already exist (NMI). But for us if we skip flushing the work, we leave the driver in a very inconsistent state and expect to blow up on resume. It's a lose-lose. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx