[Nouveau] [PATCH 3/3] drm/nv50: wait for pgraph to idle before unloading the context

Maarten Maathuis madman2003 at gmail.com
Mon Jan 11 13:12:09 PST 2010


A few comments are in order, i noticed that this additional
wait_for_idle does cause delays sometimes (obviously). and it seems
like an excellent way to do a DOS attack on your gpu. fbcon is visibly
lagging sometimes and even unusable (gpu is not locked up,  X works
fine started from ssh). This seems like something to consider when
choosing the preferred solution.

On Mon, Jan 11, 2010 at 9:22 PM, Maarten Maathuis <madman2003 at gmail.com> wrote:
> This patch *is* alone, sorry for the typo.
>
> On Mon, Jan 11, 2010 at 9:20 PM, Maarten Maathuis <madman2003 at gmail.com> wrote:
>> 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 <madman2003 at gmail.com> wrote:
>>> - This should fix the problem with gpu hangs people have had when closing
>>> channels.
>>>
>>> Signed-off-by: Maarten Maathuis <madman2003 at gmail.com>
>>> ---
>>>  drivers/gpu/drm/nouveau/nv50_graph.c |    1 +
>>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/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)
>>>                return 0;
>>>        inst &= NV50_PGRAPH_CTXCTL_CUR_INSTANCE;
>>>
>>> +       nouveau_wait_for_idle(dev);
>>>        nv_wr32(dev, 0x400500, fifo & ~1);
>>>        nv_wr32(dev, 0x400784, inst);
>>>        nv_wr32(dev, 0x400824, nv_rd32(dev, 0x400824) | 0x20);
>>> --
>>> 1.6.6
>>>
>>>
>>
>


More information about the Nouveau mailing list