summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-04-28intel: resource streamer supportlibdrm_rsAbdiel Janulgue2-3/+5
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2015-04-28modetest: destroy the cursor boJoonyoung Shim1-0/+6
Currently we are missing the bo_destroy() when modetest terminates. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message.] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: clear buffer and framebuffer for planesJoonyoung Shim1-0/+20
Currently we don't destroy buffer and remove framebuffer for planes when closing modetest. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message. fb_id = 0 is unused] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: fix the error path handlingJoonyoung Shim1-5/+8
Remove the framebuffer and destroy the bo when error occurs on set_mode and test_page_flip. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message.] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: make use of drmModeRmFBJoonyoung Shim1-0/+4
We should remove the framebuffer before destroying the buffer. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message. fb_id = 0 is unused] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: fix Segmentation faultJoonyoung Shim1-1/+8
If use -P option without -s option, the program segfaults due to dev.mode.bo being NULL. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> [Emil Velikov: Tweak the commit message.] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28modetest: initialize handles/pitches in set_plane()Tobias Jakobi1-4/+4
Only the 'offsets' array was initialized to zero. Since bo_create only sets the handles which are necessary, were we passing garbage data to the kernel when calling drmModeAddFB2 later. The issue only seems to appear when passing e.g. NV12 data to the kernel, a case where not only handles[0] is used. I therefore also removed the corresponding comment. v2: Do the same for set_mode(), set_cursors() and test_page_flip(). Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28Add missing <strings.h> includesGreg Hackmann2-0/+2
A couple of files use ffs() without explicitly including strings.h. Some systems will pull in ffs()'s declaration through another header anyway, but not when compiling against bionic in AOSP master. Signed-off-by: Greg Hackmann <ghackmann@google.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28man: rework the Makefile.amEmil Velikov3-41/+57
Remove GNU make specific constructs and take into consideration that Solaris man 7 is not the same as Linux man 7. This commit introduces a dependency of xorg-macros 1.12 (released 4+ years ago) which is used to handle the above man section discrepancies. Cc: Niveditha Rau <niveditha.rau@oracle.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28drm: use c99 __func__ over __FUNCTION__Emil Velikov2-18/+8
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28configure: request/set the compiler in C99 modeEmil Velikov2-2/+5
Required by intel and drmstat at least. Considering that every compiler used to build libdrm is C99 compatible, just enable it for the whole build. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28drm: remove drm_public macroEmil Velikov24-241/+225
Some compilers (like the Oracle Studio), require that the function declaration must be annotated with the same visibility attribute as the definition. As annotating functions with drm_public is no longer required just remove the macro. Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28drm: remove no longer needed VISIBILITY_CFLAGSEmil Velikov8-22/+0
With earlier commits we've annotated the private symbols, thus we no longer require the -fvisibility=hidden CFLAGS. Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28drm: rename libdrm{,_macros}.hEmil Velikov33-34/+34
Provide a more meaningful name, considering what it does. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28tegra: add symbols testEmil Velikov2-0/+33
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28omap: add symbols testEmil Velikov2-0/+38
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28exynos: add symbols testEmil Velikov2-0/+40
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28libkms: add symbols testEmil Velikov2-1/+27
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28libkms: annotate private symbolsEmil Velikov9-15/+23
Cc: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28nouveau: add symbols testEmil Velikov2-1/+54
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28nouveau: annotate the private symbolsEmil Velikov3-17/+17
They are less and easier to track than the public ones. The macro drm_public will be going away by the end of the series. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28intel: add symbols testEmil Velikov2-2/+92
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28intel: annotate the private symbolsEmil Velikov2-12/+24
They are less and easier to track than the public ones. The macro drm_public will be going away by the end of the series. Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28intel: remove unused mmFindBlockEmil Velikov2-19/+0
The function was never part of the public API and a release or so back was hidden from the global name-space (list of exported symbols). According to git log this function was never used internally. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28intel: remove the drm_mm* symbol workaroundsEmil Velikov1-10/+0
Added with commit 57b4c4c32d3(Move the renaming of mm.c symbols to symbol duplication/collision with ones that are available elsewhere. As the public/private symbols of libdrm are properly annotated neither one of the symbols will end up in the global name-space, thus should no longer be required. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28freedreno: add symbols testEmil Velikov2-1/+54
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28freedreno: annotate the private symbolsEmil Velikov13-42/+54
They are less and easier to track than the public ones. The macro drm_public will be going away by the end of the series. Cc: Rob Clark <robdclark@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28radeon: add symbols testEmil Velikov2-1/+62
Will allow us to catch when the library exports more symbols than the ones in the public headers. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28radeon: move bof.[ch] out of libdrm_radeonEmil Velikov3-5/+10
The functions(files) are used if one explicitly modifies radeon_cs_gem.c by setting CS_BOF_DUMP to 1. As bof.[ch] is used (copied) to other out-of-tree projects, keep them around in the distribution tarball. Cc: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28configure.ac: split -fvisibility and __attribute__((visibility)) checksEmil Velikov1-4/+9
The former does not imply the latter and vice-versa. One such example is the Sun compiler. v2: Add missing closing brakets. (Alan) Cc: Alan Coopersmith <alan.coopersmith@oracle.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-15modeprint: add missing encoder/connector type namesRob Clark1-0/+5
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-04-14intel: Delay testing for userptr until first useChris Wilson1-50/+66
Running __mmu_notifier_register() is surprisingly expensive, so let's not do that unless we have to. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-04-14mode: Retrieve only the current information for a ConnectorChris Wilson3-7/+51
Add a new API that allows the caller to skip any forced probing, which may require slow i2c to a remote display, and only report the currently active mode and encoder for a Connector. This is often the information of interest and is much, much faster than re-retrieving the link status and EDIDs, e.g. if the caller only wishes to count the number of active outputs. v2: Fix error path to avoid double free after a failed GETCONNECTOR ioctl. v3: Daniel strongly disapproved of my disjoint in behaviour between GetConnector and GetConnectorCurrent, and considering how best to make a drop in replacement for drmmode_output_init() convinced me keeping the API as consistent as possible was the right approach. v4: Avoid probing on the second calls to GETCONNECTOR for unconnected outputs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: David Herrmann <dh.herrmann@googlemail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-04-09android: remove unnecessary TARGET_OUT_HEADERS variableChih-Wei Huang1-2/+0
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-05xf86drmMode.h: inline -> __inline for use with gcc -std=c89 -pedanticDaniel Kurtz1-1/+1
Unfortunately, there are some users of libdrm installed headers that like to be built with -std=c89 -pedantic, which does not like "inline". However, __inline works. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-05xf86drm: Fix ioctl struct clearing in drmAgpEnableConnor Behan1-1/+1
This one is a bit harder to notice. Signed-off-by: Connor Behan <connor.behan@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-05drm: use correct printf modifiersEmil Velikov1-2/+2
The valies are unsigned long, thus we should use %lu. v2: Drop old printf statement. (Jan) Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-04-05drm: replace HASH_DEBUG with DEBUGEmil Velikov3-5/+2
... and remove the useless SL_DEBUG and RANDOM_DEBUG v2: Rebase on earlier changes. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-04-05tests/random: return non-zero on test failureEmil Velikov2-5/+7
... and wire it up to make check v2: s/rand - state->check/rand != state->check/. (Jan) Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-04-05tests/random: extract test out of xf86drmRandom.cEmil Velikov6-75/+161
With follow up commits we can clear it up and wire to make check v2: - Use xf86drmRandom.h for common struct.(Jan) - Add test to .gitignore. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-04-05tests/hash: return non-zero on failureEmil Velikov2-14/+18
... and wire up to `make check' now that it's useful. v2: Really return non-zero on failure. v3: Initialise ret. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu> (v2)
2015-04-05tests/hash: style fixesEmil Velikov1-36/+54
v2: Rebase on earlier changes. Keep count initialisation as is. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-04-05tests/hash: misc compilation fixesEmil Velikov1-24/+21
Get the test from completely broken to working like a charm. - Use the same variable type for both HashInsert and HashLookup. - Use correct storage type for the HashLookup return value. - Remove useless backward iteration of HashLookup(i). v2: - Use void * instead of unsigned long. - Change value to key << 16 | key. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-04-05tests/hash: extract test out of xf86drmHash.cEmil Velikov6-186/+260
This way with follow up commits we can fix it and wire it up to make check v2: - Use xf86drmHash.h for common structs.(Jan) - Add test to .gitignore. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-04-04tests/drmsl: Extract tests out of xf86drmSL.cJan Vesely4-169/+184
v2: merge tests creation and xf86drmSL cleanup rename tests/drmsltest -> tests/drmsl move the test out of libudev test block v3: run test even on noudev builds Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-04drmSL: Fix neighbor lookupJan Vesely1-2/+4
Commit e4a519635f75bde38aeb5b09f2ff4efbf73453e9: Tidy up compile warnings by cleaning up types. removed call to SLLocate which gutted the function of all functionality. This patch restores the original behavior, with an additional fix that zeros the update array in case SLLocate bails early. v2: zero the update array instead of checking the return value. SLLocate returns NULL both on failure and if the element is greater than everything in the list v3: Improve commit message Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-26android: remove explicit include to libpciaccessEmil Velikov1-3/+0
Both android-x86 and android-ia versions of libpciacccess correctly "export" the include. If anyone else is wrapping up their own version they should do so as well. Remove this fixed location hack from the build. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
2015-03-20tests/exynos: Fix missing static keywordJan Vesely1-1/+1
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2015-03-20Remove drmSetDebugMsgFunction and related infrastructureJan Vesely1-12/+1
Not used anywhere Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20Fix unused function warningsJan Vesely2-13/+2
v2: Remove the handler function instead of commenting out split debugmsg function removal to a separate patch Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>