[PATCH RFC 05/24] Revert "drm: Nerf the preclose callback for modern drivers"

Eric Anholt eric at anholt.net
Mon May 21 19:37:00 UTC 2018


Qiang Yu <yuq825 at gmail.com> writes:

> This reverts commit 45c3d213a400c952ab7119f394c5293bb6877e6b.
>
> lima driver need preclose to wait all task in the context
> created within closing file to finish before free all the
> buffer object. Otherwise pending tesk may fail and get
> noisy MMU fault message.
>
> Move this wait to each buffer object free function can
> achieve the same result but some buffer object is shared
> with other file context, but we only want to wait the
> closing file context's tasks. So the implementation is
> not that straight forword compared to the preclose one.

You should just separate your MMU structures from drm_file, and have
drm_file and the jobs using it keep a reference on them.  This is what
I've done in V3D as well.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20180521/7eacb2f2/attachment.sig>


More information about the dri-devel mailing list