Created attachment 100690 [details] mouse cursor corruption photo 01 Distribution: Arch Linux Hardware: AMD A10-7850K Kaveri APU Kernel: 3.11+ (needed for Kaveri KMS support). Description: After launching weston on AMD Kaveri APU (or similar), mouse cursor gets corrupted. The bug was initially reported to kernel bugtracker: https://bugzilla.kernel.org/show_bug.cgi?id=77531 The conclusion was that weston assumes 64x64 cursor size, when this hardware support only 128x128. Steps to reproduce: - Launch weston (tested with 1.4+). - Mouse cursor gets corrupted.
This patch was mentioned in the kernel bug report as related to the issue: http://cgit.freedesktop.org/xorg/driver/xf86-video-modesetting/commit/?id=677935b2d20f54f21c645b5eb386b6c9485fee5f
Created attachment 100697 [details] [review] Do not assume 64x64 cursor, added support for other sizes (like in AMD Kaveri, 128x128). I've written a patch based on the xf86-video-modesetting link. Tested with weston-git + the patch, the problem is gone.
Comment on attachment 100697 [details] [review] Do not assume 64x64 cursor, added support for other sizes (like in AMD Kaveri, 128x128). Review of attachment 100697 [details] [review]: ----------------------------------------------------------------- ::: src/compositor-drm.c @@ +1307,3 @@ > else > ec->clock = CLOCK_REALTIME; > Shouldn't you initialize ec->cursor_{width,height} to 64 here, so that if drmGetCap() fails later, we get a sensible value?
Created attachment 100737 [details] [review] Original patch + fallback to 64x64 Is it ok like this? Added fallback to 64x64 if drmGetCap() fails.
Michel has a patch to fix the cursor bo flag in gbm as well.
Created attachment 100784 [details] gbm: Remove 64x64 restriction from GBM_BO_USE_CURSOR Here's the GBM patch Alex mentioned.
So, should I update the patch to use GBM_BO_USE_CURSOR?
(In reply to comment #7) > So, should I update the patch to use GBM_BO_USE_CURSOR? I think so, then I'll submit the GBM patch to Mesa. But you'll need some kind of fallback for currently released versions of Mesa, which don't define GBM_BO_USE_CURSOR yet.
Created attachment 100856 [details] [review] cursor_size v3 In this patch, GBM_BO_USE_CURSOR gets replaced with GBM_BO_USE_CURSOR_64X64 if is not defined. I've tested on my pc and it works, but is sufficient like that or GBM_BO_USE_CURSOR_64X64 should be used only if width and height are 64 (like in the previous patch)? (Sorry for my ignorance, it's my 1st patch in this area).
(In reply to comment #9) > I've tested on my pc and it works, but is sufficient like that or > GBM_BO_USE_CURSOR_64X64 should be used only if width and height are 64 (like > in the previous patch)? The latter, as GBM will reject cursor dimensions other than 64x64 if it doesn't define GBM_BO_USE_CURSOR. Something like this: #ifdef GBM_BO_USE_CURSOR flags = GBM_BO_USE_CURSOR | GBM_BO_USE_WRITE; #else flags = GBM_BO_USE_WRITE; if (ec->cursor_width == 64 && ec->cursor_height == 64) flags |= GBM_BO_USE_CURSOR_64X64; #endif
Created attachment 100857 [details] [review] cursor_size_v4 (original + fixes) This time it should be ok... If needed, I can squash the commits to simplify the patch.
Looks good to me. I just posted the GBM patch to the mesa-dev mailing list for review.
My GBM patch has landed on Mesa Git master. Can you post your patches to the wayland-devel mailing list? Not sure anyone will pick them up from here.
Hi. I've sent the patches to the mailing list. Thanks!
Looks like this patch landed in weston in July 2014, commit dce7c6e5a2fb2e639e1e96ec0eaaf0f6551bc7b6 This bug looks like it can be closed.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.