A different flavour of:
https://lore.kernel.org/dri-devel/[email protected]/

Where Christian suggested to try with scope based cleanup macros. This is that
attempt.

We start with converting all the functions which use temporary arrays to scoped
cleanup and then in the last patch fast path is added via two handy macros.

Syncobj IGT pass, light gaming and light desktop as well, and there are no
kmemleak reports. Nevertheless this version is a bit more invasive so if the
approach is looking good a careful review will be required.

Cc: Christian König <[email protected]>
Cc: Fei Yu <[email protected]>
Cc: Maíra Canal <[email protected]>

Tvrtko Ursulin (7):
  drm/syncobj: Use vmemdup_array_user in drm_syncobj_array_find
  drm/syncobj: Use scoped cleanup for drm_syncobj_array_wait_timeout
    points
  drm/syncobj: Use scoped cleanup for drm_syncobj_array_wait_timeout
    syncobjs
  drm/syncobj: Use scoped cleanup for drm_syncobj_timeline_signal_ioctl
    points
  drm/syncobj: Use scoped cleanup for drm_syncobj_timeline_signal_ioctl
    chains
  drm/syncobj: Use scoped cleanup in drm_syncobj_array_find and callers
  drm/syncobj: Add temporary array allocation fast paths

 drivers/gpu/drm/drm_syncobj.c | 384 ++++++++++++++++++++--------------
 1 file changed, 224 insertions(+), 160 deletions(-)

-- 
2.56.0

Reply via email to