Maarten Lankhorst
2013-Apr-08 12:04 UTC
[Nouveau] [PATCH] drm/nouveau: idle all channels before suspending
Seems to make suspend slightly more reliable on my system. Cc: stable at vger.kernel.org [3.7+] Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com> --- diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index b6bdc9f..5032c31 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -464,6 +464,23 @@ nouveau_do_suspend(struct drm_device *dev) NV_INFO(drm, "evicting buffers...\n"); ttm_bo_evict_mm(&drm->ttm.bdev, TTM_PL_VRAM); + list_for_each_entry(cli, &drm->clients, head) { + struct nouveau_abi16 *abi16 = cli->abi16; + struct nouveau_abi16_chan *chan; + + if (!abi16) + continue; + + list_for_each_entry(chan, &abi16->channels, head) + nouveau_channel_idle(chan->chan); + } + + if (drm->channel) + nouveau_channel_idle(drm->channel); + + if (drm->cechan) + nouveau_channel_idle(drm->cechan); + if (drm->fence && nouveau_fence(drm)->suspend) { if (!nouveau_fence(drm)->suspend(drm)) return -ENOMEM;
Ben Skeggs
2013-Apr-08 23:14 UTC
[Nouveau] [PATCH] drm/nouveau: idle all channels before suspending
On Mon, Apr 8, 2013 at 10:04 PM, Maarten Lankhorst < maarten.lankhorst at canonical.com> wrote:> Seems to make suspend slightly more reliable on my system. >NACK. "Seems to", and "slightly" don't make a very good argument for this. Likely all you've done is change the timing of certain things happening. The PFIFO and engine (PGRAPH etc) modules already take care of idling and unloading active channels. If something is broken there, that's where it needs fixing, not this hack that "maybe" "possibly" "slightly" works. Ben.> Cc: stable at vger.kernel.org [3.7+] > Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com> > --- > diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c > b/drivers/gpu/drm/nouveau/nouveau_drm.c > index b6bdc9f..5032c31 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_drm.c > +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c > @@ -464,6 +464,23 @@ nouveau_do_suspend(struct drm_device *dev) > NV_INFO(drm, "evicting buffers...\n"); > ttm_bo_evict_mm(&drm->ttm.bdev, TTM_PL_VRAM); > > + list_for_each_entry(cli, &drm->clients, head) { > + struct nouveau_abi16 *abi16 = cli->abi16; > + struct nouveau_abi16_chan *chan; > + > + if (!abi16) > + continue; > + > + list_for_each_entry(chan, &abi16->channels, head) > + nouveau_channel_idle(chan->chan); > + } > + > + if (drm->channel) > + nouveau_channel_idle(drm->channel); > + > + if (drm->cechan) > + nouveau_channel_idle(drm->cechan); > + > if (drm->fence && nouveau_fence(drm)->suspend) { > if (!nouveau_fence(drm)->suspend(drm)) > return -ENOMEM; > > _______________________________________________ > dri-devel mailing list > dri-devel at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20130409/711f4be4/attachment.html>
Maybe Matching Threads
- [PATCH 1/2] drm/nouveau: hold mutex while syncing to kernel channel
- [PATCH] drm/nouveau: add some basic debugfs dumping for nouveau's clients and vm mappings
- [PATCH] nouveau: move conditional suspend messages into conditionals
- [PATCH] drm/nouveau: fix handling empty channel list in ioctl's
- [PATCH 1/2] drm/nouveau: don't fini scheduler if not initialized