[PATCH v4 3/6] drm/tests: managed: Remove the waitqueue usage

Maxime Ripard mripard at kernel.org
Mon Jan 8 10:45:52 UTC 2024


On Fri, Jan 05, 2024 at 11:13:21AM +0100, Michał Winiarski wrote:
> DRM managed release (drm_managed_release) is called as part of devres
> release (devres_release_all), which is not async.
> The release action should have already been executed once
> drm_kunit_helper_free_device exits, meaning that there's no need to use
> a waitqueue - we can just inspect the "action_done" state directly.
> 
> Signed-off-by: Michał Winiarski <michal.winiarski at intel.com>

I disagree, nothing guarantees in the API that it will be executed right
away. Since it might be asynchronous (if something else holds a
reference for example), we need the workqueue.

Fortunately, it turns out that it's actually done right away, which also
means we'll never hit the timeout and thus never stall the test run.

Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-xe/attachments/20240108/2d2d0f62/attachment.sig>


More information about the Intel-xe mailing list