Mailinglist Archive: radeonhd (427 mails)

< Previous Next >
Re: [radeonhd] [PATCH] refactored RandR cursor code plus fix for bug #13405
  • From: Yang Zhao <yang@xxxxxxxxxx>
  • Date: Mon, 4 May 2009 09:24:05 -0700
  • Message-id: <40a7b1aa0905040924k52a65edfyb9c84168cbe91711@xxxxxxxxxxxxxx>
2009/5/4 Matthias Hopf <mhopf@xxxxxxx>:
- Code was added to correctly set cursor dimensions. This is disabled as
  there are apparently no benefits on doing so.

I would actually remove that (unused) code.
Yes, I stumbled over the Xserver loading MAX by MAX only as well.

Yeah, lets get rid of that. It was just left over testing code when I
squashed a bunch of commits together on rebase.


@@ -636,11 +644,26 @@ rhdCrtcShowCursor(struct rhdCrtc *Crtc)
[...]
+    /* Move cursor off-screen so it won't be visible*/
+    RHDRegWrite(Cursor, Cursor->RegOffset + D1CUR_POSITION,
+                (Crtc->X + Crtc->Width) << 16 | (Crtc->Y + Crtc->Height));
+    RHDRegWrite(Cursor, Cursor->RegOffset + D1CUR_HOT_SPOT, 0);
+

Is this consistent with the solution Alex found for how to fix part of
the corruptions (never move outside Crtc boundaries + don't let end at
multiples of 128)?
One way to circumvent this would be to use (0, Crtc->Y+Crtc->Height) as
coordinates. What do you think?

This is to work around a corner case where the cursors would get
enabled while the cursor coordinates for the "inactive" CRTC is still
in the visible area, leaving a ghost pointer. Last I checked, it's
worked around in radeon by setting the cursor dimension to 1x1.

In any case, the multiples-of-128 and don't-be-outside logic wasn't
included. Lets use 0 for X if it may be an issue.


 rhdCrtcSetCursorPosition(struct rhdCrtc *Crtc, int x, int y)
[...]
-    displayCursor(Crtc,   TRUE);
+    RHDRegWrite(Cursor, Cursor->RegOffset + D1CUR_POSITION, x << 16 | y);
+    RHDRegWrite(Cursor, Cursor->RegOffset + D1CUR_HOT_SPOT, hotx << 16 |
hoty);

This doesn't change cursor width any more if necessary (see above). That
has been the reason for the change to use displayCursor everywhere. It
does fix the cursor corruption issues (while it introduced other issues ;)
on a machine here, so I'm positive that this is actually necessary.

What issues are caused by cursor going beyond the CRTC area? I wasn't
able to reproduce anything obvious on my M56 for the non-rotated
non-panning cases.

--
Yang Zhao
http://yangman.ca
--
To unsubscribe, e-mail: radeonhd+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: radeonhd+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References