Quoting Andi Shyti (2021-01-14 03:02:25) > Hi Chris, > > On Wed, Jan 13, 2021 at 12:45:57PM +0000, Chris Wilson wrote: > > Lift the busy-stats context-in/out implementation out of intel_lrc, so > > that we can reuse it for other scheduler implementations. > > > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > > --- > > drivers/gpu/drm/i915/gt/intel_engine_stats.h | 49 +++++++++++++++++++ > > .../drm/i915/gt/intel_execlists_submission.c | 34 +------------ > > 2 files changed, 50 insertions(+), 33 deletions(-) > > create mode 100644 drivers/gpu/drm/i915/gt/intel_engine_stats.h > > this looks like just a copy paste... It's closer now indeed. It's not quite identical yet, as in one case we have boolean, the other an uint counter. (There's a third case for class runtime stats where it would be an atomic_t.) So not quite hitting the rule of 3 for adequate generalisation, though maybe with some magic macro constructors... -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx