Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b77c1c0 authored by Marcin Slusarz's avatar Marcin Slusarz Committed by Ben Skeggs
Browse files

drm/nouveau: idle channel before releasing notify object



Unmapping it while it's still in use (e.g. by M2MF) can lead to page faults
and a lot of TRAP_M2MF spam in dmesg.

Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent c8f28f89
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -116,6 +116,11 @@ nouveau_abi16_chan_fini(struct nouveau_abi16 *abi16,
{
{
	struct nouveau_abi16_ntfy *ntfy, *temp;
	struct nouveau_abi16_ntfy *ntfy, *temp;


	/* wait for all activity to stop before releasing notify object, which
	 * may be still in use */
	if (chan->chan && chan->ntfy)
		nouveau_channel_idle(chan->chan);

	/* cleanup notifier state */
	/* cleanup notifier state */
	list_for_each_entry_safe(ntfy, temp, &chan->notifiers, head) {
	list_for_each_entry_safe(ntfy, temp, &chan->notifiers, head) {
		nouveau_abi16_ntfy_fini(chan, ntfy);
		nouveau_abi16_ntfy_fini(chan, ntfy);