Comment 60 for bug 583760

Revision history for this message
In , Laurence (laurence-redhat-bugs) wrote :

This problem still happens for me, using the latest upstream git of everything (linux, xorg xorg drivers, etc) as of Feb 18 2010, however it has "improved" a little since earlier. My system chip is Quadro NVS 135M (rev a1).

This kludge to the nouveau driver in linux stops the problems happening for me altogether:

------------------------------------------------------------
--- a/drivers/gpu/drm/nouveau/nv50_cursor.c
+++ b/drivers/gpu/drm/nouveau/nv50_cursor.c
@@ -41,6 +41,14 @@ nv50_cursor_show(struct nouveau_crtc *nv_crtc, bool
update) struct drm_device *dev = nv_crtc->base.dev;
        int ret;

+ static int count = 0;
+
+ if (count > 3) {
+ return;
+ } else {
+ count++;
+ }
+
        NV_DEBUG_KMS(dev, "\n");

        if (update && nv_crtc->cursor.visible)
@@ -76,6 +84,8 @@ nv50_cursor_hide(struct nouveau_crtc *nv_crtc, bool
update) struct drm_device *dev = nv_crtc->base.dev;
        int ret;

+ return;
+
        NV_DEBUG_KMS(dev, "\n");

        if (update && !nv_crtc->cursor.visible)
------------------------------------------------------------

This raises a lot of issues - what was happening is that READ_GET() in
drivers/gpu/drm/nouveau/nouveau_dma.c returned EBUSY. It looks to me that
the performance problems are because of a spin lock - if I try increasing
the timeout int READ_GET() from 100000 to 1000000, the performance problems
get 10 times worse.

Secondly, why are nv50_cursor_show() & nv50_cursor_hide()
in /drivers/gpu/drm/nouveau/nv50_cursor.c being called so often? _show
only needs to be called once per attached monitor, and then _hide only when
it really does need to be hidden, ie. when playing a movie or switching VT
(ie. with the above kludge the mouse cursor stays visible on the VT's), not
every time the mouse cursor changes. It could be even my WM (IceWM) making all those calls, I haven't looked into this further.

I don't have time to look into this further at all.