Quoting Tvrtko Ursulin (2020-07-22 09:12:14) > > On 20/07/2020 16:02, Chris Wilson wrote: > > Quoting Tvrtko Ursulin (2020-07-20 12:23:35) > >> > >> On 20/07/2020 10:23, Chris Wilson wrote: > >>> -void intel_engine_init_breadcrumbs(struct intel_engine_cs *engine) > >>> +struct intel_breadcrumbs * > >>> +intel_breadcrumbs_create(struct intel_engine_cs *irq_engine) > >>> { > >>> - struct intel_breadcrumbs *b = &engine->breadcrumbs; > >>> + struct intel_breadcrumbs *b; > >>> + > >>> + b = kzalloc(sizeof(*b), GFP_KERNEL); > >>> + if (!b) > >>> + return NULL; > >>> > >>> spin_lock_init(&b->irq_lock); > >>> INIT_LIST_HEAD(&b->signalers); > >>> INIT_LIST_HEAD(&b->signaled_requests); > >>> > >>> init_irq_work(&b->irq_work, signal_irq_work); > >>> + > >>> + b->irq_engine = irq_engine; > >>> + if (!irq_engine) > >>> + b->irq_armed = true; /* fake HW, used for irq_work */ > >> > >> Disarm is checking for !b->irq_engine and arm asserts there must be when > >> arming. If instead arm would abort on !b->irq_engine would it all work > >> just as well without the need for this hack? > > > > Yes, it is asymmetric. I thought keeping the asymmetry in place for the > > conversion would be simpler, but didn't really make an attempt to make > > irq_armed behave as one would expect. > > You think it's not as simple as early return in arm if on irq engine? And moving the early checks to disarm_irq for symmetry. I was just worrying too much about the impact of changing irq_armed. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx