From: Maarten Maathuis Subject: Re: [PATCH 3/3] drm/nv50: wait for pgraph to idle before unloading the context Date: Mon, 11 Jan 2010 21:22:08 +0100 Message-ID: <6d4bc9fc1001111222t256fe973x64bb8fddd7bc8440@mail.gmail.com> References: <1263241133-13499-1-git-send-email-madman2003@gmail.com> <6d4bc9fc1001111220q2025bb8h862577a208831a00@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <6d4bc9fc1001111220q2025bb8h862577a208831a00-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Errors-To: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: nouveau.vger.kernel.org This patch *is* alone, sorry for the typo. On Mon, Jan 11, 2010 at 9:20 PM, Maarten Maathuis wr= ote: > This patch alone, so ignore the 3/3. I think this fixes the channel > unload hang issues in a less obscure way. Feedback appreciated as > usual. > > On Mon, Jan 11, 2010 at 9:18 PM, Maarten Maathuis = wrote: >> - This should fix the problem with gpu hangs people have had when closing >> channels. >> >> Signed-off-by: Maarten Maathuis >> --- >> =A0drivers/gpu/drm/nouveau/nv50_graph.c | =A0 =A01 + >> =A01 files changed, 1 insertions(+), 0 deletions(-) >> >> diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouv= eau/nv50_graph.c >> index 444a46b..d6897cf 100644 >> --- a/drivers/gpu/drm/nouveau/nv50_graph.c >> +++ b/drivers/gpu/drm/nouveau/nv50_graph.c >> @@ -282,6 +282,7 @@ nv50_graph_unload_context(struct drm_device *dev) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return 0; >> =A0 =A0 =A0 =A0inst &=3D NV50_PGRAPH_CTXCTL_CUR_INSTANCE; >> >> + =A0 =A0 =A0 nouveau_wait_for_idle(dev); >> =A0 =A0 =A0 =A0nv_wr32(dev, 0x400500, fifo & ~1); >> =A0 =A0 =A0 =A0nv_wr32(dev, 0x400784, inst); >> =A0 =A0 =A0 =A0nv_wr32(dev, 0x400824, nv_rd32(dev, 0x400824) | 0x20); >> -- >> 1.6.6 >> >> >