mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
680b9a2976f9eb8010c8160c425c2194fb5429d1
When the drmModeSetCursor2() call was replaced with bare drmIoctl() call in
b344e155, a bug was introduced. With the use of drmModeSetCursor2(),
the return value from drmIoctl() (which calls ioctl()) were mangled, if
they were negative, they were replaced by -errno by a wrapper function
in xf86drMode.c in libdrm. After replacing drmModeSetCursor2() with the
call to drmIoctl(), this mangling no longer happens, and we need to
explicitly check if the call to drmIoctl() fails, which is indicated by
returning -1, and then why it failed, by checking errno.
If the error indicated by errno is EINVAL, then we can't use the
DRM_IOCTL_MODE_CURSOR2 ioctl(), and need to fall back to the
DRM_IOCTL_MODE_CURSOR ioctl().
This bug can manifest itself by an invisible hw cursor on systems where the
DRM_IOCTL_MODE_CURSOR2 is not implemented by the graphics driver.
Signed-off-by: Niclas Zeising <zeising@daemonic.se>
xf86-video-amdgpu - Xorg driver for AMD Radeon GPUs using the amdgpu kernel driver
Questions regarding this software should be directed at the amd-gfx mailing list.
Please submit bug reports to the Xorg bugzilla.
The master development code repository can be found at FreeDesktop Gitlab.
Please use merge requests for patch submission.
See the X.org wiki for further patch submission instructions and more information on the git code manager.
Description
Languages
C
94.7%
M4
2.8%
Makefile
1.6%
Perl
0.8%