Non-blocking commits on -ERESTARTSYS

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Wed Dec 13 17:23:37 UTC 2017


Op 13-12-17 om 17:19 schreef Leo Li:
> Hi Daniel, Maarten,
>
> Just digging an old thread out of the grave:
> https://lists.freedesktop.org/archives/dri-devel/2017-August/150495.html
>
> It's suppose to fix a memory leak on the drm_commit object during
> non-blocking commits. Within drm_atomic_helper_setup_commit, a reference
> to the commit object is obtained by the new_crtc_state. This reference
> is suppose to be 'put' once flip_done is signaled (via the
> release_crtc_commit callback), but never happens if .prepare_fb returns
> -ERESTARTSYS: drm_atomic_helper_commit early returns before the
> commit_tail work is queued.
>
> We're starting to bump into this issue again. Regarding Daniel's
> suggestion for an IGT test, has there been any work done on it? I'd be
> interested in taking a look otherwise. As a side note, I can also
> reproduce this on i915.
>
> Thanks,
> Leo

I'm curious, isn't it better to handle this in __drm_atomic_helper_crtc_destroy_state with the attached patch?

No idea if sane though, but drivers are supposed to clear crtc_state->event on success..

-------------- next part --------------
A non-text attachment was scrubbed...
Name: drop-extra-refcount.patch
Type: text/x-diff
Size: 553 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171213/98c54e99/attachment.patch>


More information about the dri-devel mailing list