summaryrefslogtreecommitdiff
path: root/xf86drmMode.c
AgeCommit message (Collapse)AuthorFilesLines
2011-09-18drm mode: fix drmIoctl wrapperMarcin Slusarz1-1/+1
Both drmIoctl and ioctl define second argument as unigned long. Debugging/tracing tools (like strace or valgrind) on 64-bit machines see different request value for ioctls with 32nd bit set, because casting signed int to unsigned long extends 32nd bit to upper word, so 0x80000000 becomes 0xFFFFFFFF80000000) Nobody noticed because higher 32 bits are chopped off on their way to kernel.
2011-07-12Specify the return type explicitly.Chih-Wei Huang1-1/+1
2010-08-24Free the property blob along the error path.Chris Wilson1-1/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-07-01drm mode: Return -errno on drmIoctl() failureChris Wilson1-24/+18
The high layers expect to receive a status code on error (on the pessimistic assumption that the errno value will have been overwritten by the time the failure is propagated all the way up), so convert xf86drmMode.c to return -errno on an ioctl error and be consistent with the rest of the libdrm API. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-01-06modes: Retry GETCONNECTOR if a hotplug event occurs between the two ioctlsPeter Clifton1-15/+43
If the available modes changes between the two GETCONNECTOR ioctls, that caused the kernel to skip filling one array and led to a crash (as the size of the allocated and initialised block of memory differed from the reported size, and might be NULL if no modes were present at first). This bug manifest its self on my machine due to spurious false positive detections of a connected TV-out. Fixes: http://bugs.freedesktop.org/show_bug.cgi?id=25912 Crash whilst probing modes Based upon the similar fixes for the GETRESOURCES ioctls by Chris Wilson, in the following commits: commit e6c136ca7a4c54457b48be1aec2be024b3e4a28d commit 85fb3e55fdb7af9b5f59c1ec0f15d1950e601b05 commit d1308f4fe7f94aae51ca9f70947aea8e09597f37 Signed-off-by: Peter Clifton <pcjc2@cam.ac.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-01-06modes: Fix previous commit for potential legal NULLsChris Wilson1-1/+5
If the count is 0, then the malloc is permitted to return NULL, so don't throw an error in that case. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-01-06modes: Free local resources after allocation failure in GETRESOURCESChris Wilson1-9/+29
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-01-06modes: Retry GETRESOURCES if a hotplug event occurs between the two ioctlsChris Wilson1-7/+22
Peter Clifton hit an issue whereby he had a spurious TV hotplug event that occurred between the two GETRESOURCES ioctls that caused the kernel to skip filling one array and led to a crash (as the size of the allocated and initialised block of memory differed from the reported size). Fixes: http://bugs.freedesktop.org/show_bug.cgi?id=25912 Crash whilst probing modes Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reported-by: Peter Clifton <pcjc2@cam.ac.uk>
2009-12-02Merge branch 'modesetting-dirty-libdrm'Jakob Bornecrantz1-0/+12
Conflicts: include/drm/drm.h
2009-12-03Bump event context structure version for page flippingJesse Barnes1-1/+1
2009-12-03Merge branch 'pageflip' of git://people.freedesktop.org/~jbarnes/drmJesse Barnes1-1/+24
Conflicts: include/drm/drm.h - RMFB had its signature changed to avoid uint32_t
2009-11-26Bring dirty code from old branchJakob Bornecrantz1-0/+12
2009-11-17Move libdrm/ up one levelKristian Høgsberg1-0/+712