Hey, Den 2025-11-21 kl. 16:12, skrev Christian König: > On 11/21/25 11:12, Pierre-Eric Pelloux-Prayer wrote: >> Until now ttm stored a single pipelined eviction fence which means >> drivers had to use a single entity for these evictions. >> >> To lift this requirement, this commit allows up to 8 entities to >> be used. >> >> Ideally a dma_resv object would have been used as a container of >> the eviction fences, but the locking rules makes it complex. >> dma_resv all have the same ww_class, which means "Attempting to >> lock more mutexes after ww_acquire_done." is an error. >> >> One alternative considered was to introduced a 2nd ww_class for >> specific resv to hold a single "transient" lock (= the resv lock >> would only be held for a short period, without taking any other >> locks). >> >> The other option, is to statically reserve a fence array, and >> extend the existing code to deal with N fences, instead of 1. >> >> The driver is still responsible to reserve the correct number >> of fence slots. >> >> --- >> v2: >> - simplified code >> - dropped n_fences >> - name changes >> v3: use ttm_resource_manager_cleanup >> --- >> >> Signed-off-by: Pierre-Eric Pelloux-Prayer >> <[email protected]> > > Reviewed-by: Christian König <[email protected]> > > Going to push separately to drm-misc-next on Monday. > Pushing this broke drm-tip, the amd driver fails to build, as it's not using the eviction_fences array.
Kind regards, ~Maarten Lankhorst
