summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-10configure: omap, freedreno and tegra require atomicsEmil Velikov
They have used them since day one, but the check was never there. v2: - Update the freedreno message (API is no longer experimental). - Move the freedreno host_cpu detection next to the intel one. Cc: Rob Clark <robdclark@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-10automake: wrap an insanely long lineEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-06Revert "intel: Fix documentation for drm_intel_gem_bo_wait()"Daniel Vetter
This reverts commit 080b4929b7452dc1fea32ac1d32e7e571e7fb38b. Chris noticed that "negative values wait forever" is indeed intended behaviour and the issue is just that we didn't have a testcase (fixed now) and that a regression slipped through (fixed and on track for all stable kernels). So lets undo the documentation change for consistency, since working around kernel regressions isn't good. Practical impact is nil anyway. v2: Add a note to docs that some kernels have been broken. v3: Remove the random garbage included by accident. Cc: Kristian Høgsberg <krh@bitplanet.net> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-02intel: Fix documentation for drm_intel_gem_bo_wait()Kristian Høgsberg
The kernel doesn't actually wait indefinately when passed a negative, timeout, it returns immediately. Document this and suggest using INT64_MAX for indefinite waits. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-27tests/radeon: set the list* functions as inlineEmil Velikov
To silence the chatty compiler. As a future work we may want to merge these with libdrm_lists.h Cc: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27exynos_fimg2d_test: remove unused variablesEmil Velikov
Cc: Inki Dae <inki.dae@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27tests: remove unused variablesEmil Velikov
As kindly pointed out by GCC. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27autotools: add WARN_CFLAGS to all targetsEmil Velikov
... minus test/ttmtest. The latter is not really hooked up with the actual build. This will give us 66 warnings on a distribution build of which - 12 -Wunused-variable - 11 -Wunused-function - 19 -Wmissing-prototypes and a few -Wswitch-enum, -Wtype-limits etc. Adding the CFLAGS gives some exposure to these so that we can fix them. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27tests: fix implicit funciton declaration errorsEmil Velikov
ioctl() and strcmp() were used without the relevent header being included. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27exynos_fimg2d_test: fix implicit funciton declaration errorsEmil Velikov
As one adds WARN_CFLAGS to the build the compiler throws a couple of lovely error messages. Add the relevant includes to fix them. error: implicit declaration of function ‘time’ error: implicit declaration of function ‘getopt’ Cc: Inki Dae <inki.dae@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-27autotools: add AM_DISTCHECK_CONFIGURE_FLAGSEmil Velikov
To make sure that the release/distribution tarball is not broken for all the targets. Currently the experimental APIs are disabled by default amongst others. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
2015-02-25tests: add support for imx-drmPhilipp Zabel
Since imx-drm has graduated from staging it seems to be a good idea to recognize it by default in the libdrm tests. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-23Add new drmGetNodeTypeFromFd functionFrank Binns
Add a helper function that returns the type of device node from an fd. Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-23android: remove duplicate libdrm in LOCAL_SHARED_LIBRARIESChih-Wei Huang
v2: Fold libpciaccess and libdrm into a single local_shared_libraries Acked-by: Jan Vesely <jan.vesely@rutgers.edu> Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-23libdrm: fix the Android 64bit buildEmil Velikov
With 64bit bionic mmap now handles 64bit offset, thus we no longer need the __mmap2 trick. Fix from Chih-Wei Huang, over at the google forums. Cc: Chih-Wei Huang <cwhuang@android-x86.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-16nouveau: fix unlock nouveau_bo_name_ref()Jerome Glisse
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
2015-02-12Add new drmOpenOnceWithType function (v2)Jammy Zhou
v2: call drmOpenOnceWithType in drmOpenOnce, and drop unused param for drmOpenOnceWithType Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-02-12Add new drmOpenWithType function (v4)Jammy Zhou
v2: Add drmGetMinorBase, and call drmOpenWithType in drmOpen v3: Pass 'type' to drmOpenByBusid and drmOpenDevice in drmOpenByName v4: Renumber node type definitions, and return -1 for unsupported type Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v3) Reviewed-by: Frank Binns <frank.binns@imgtec.com>
2015-02-12Stop undefining _ATOMIC_TYPE in Solaris/NetBSD section of xf86atomic.hAlan Coopersmith
Since the atomic_set() macro references _ATOMIC_TYPE, undefining it broke that macro, resulting in build errors of: "intel_bufmgr_gem.c", line 775: undefined symbol: _ATOMIC_TYPE Now that we're leaving the macro in the namespace, renamed it to start with LIBDRM_ instead of _ to avoid polluting others namespace. Regression introduced in 87fdd32c8779648 Add NetBSD atomic ops support. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-By: Thomas Klausner <wiz@NetBSD.org>
2015-02-11xf86drm: Fix ioctl struct clearing in drmGetVersionDaniel Vetter
Oops, fumbled that one. Reported-by: Jan Vesely <jan.vesely@rutgers.edu> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-11tests: remove intel-specific testsDaniel Vetter
These all moved to igt meanwhile. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-11xf86drm: Unconditionally clear ioctl structsDaniel Vetter
We really have to do this to avoid surprises when extending the ABI later on. Especially when growing the structures. A bit overkill to update all the old legacy ioctl wrappers, but can't hurt really either. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-11drm: use drmIoctl everywhereDaniel Vetter
Well just core drm. All the other callers in there that still use direct calls to ioctl have some custom retry logic already, so should be good already. All the other offenders (tests, freedreno/kgsl, ...) don't really matter (e.g. kgsl is the blob library and so not a drm thing) or are again special exceptions with their own retry loops. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-11xf86drmMode: Unconditionally clear ioctl structsDaniel Vetter
We really have to do this to avoid surprises when extending the ABI later on. Especially when growing the structures. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-11intel: Unconditionally clear ioctl structsDaniel Vetter
We really have to do this to avoid surprises when extending the ABI later on. Especially when growing the structures. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-10Fix gcc -Wextra warningsJan Vesely
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Ian Romanick <idr@freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-10random: Use unsigned long for seedJan Vesely
v2: Remove unrelated change in main() This is more consistent with the rest, and avoids potential undefined behavior (signed overflow) ind drmRandom() Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Ian Romanick <idr@freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-02-02exynos: remove DRM_EXYNOS_GEM_{MAP_OFFSET/MMAP} ioctlsHyungwon Hwang
This patch removes the ioctls which are removed from the linux kernel. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-02-02exynos: Don't use DRM_EXYNOS_GEM_{MAP_OFFSET/MMAP} ioctlsHyungwon Hwang
The ioctl DRM_EXYNOS_GEM_MAP_OFFSET and DRM_EXYNOS_GEM_MMAP are removed from the linux kernel. This patch modifies libdrm and libkms to use drm generic ioctls instead of the removed ioctls. v2: The original patch was erroneous. In case the MODE_MAP_DUMB ioctl failed it would return the retvalue as a void-pointer. Users of libdrm would then happily use that ptr, eventually leading to a segfault. Change this to return NULL in that case and also restore the previous behaviour of logging to stderr. The other error was that 'bo->vaddr' was never filled with the mapped buffer address. Hence exynos_bo_map still returned NULL even if the buffer mapping succeeded. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-01-26nouveau: Remove unused static function.Thomas Klausner
Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
2015-01-26intel: Only define variable when it's used.Thomas Klausner
Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
2015-01-26Add NetBSD atomic ops support.Thomas Klausner
Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
2015-01-26Fix libdrm's atomic_dec_and_test on Solaris.Thomas Klausner
_nv means new value, not old value! Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
2015-01-23Add new drmOpenRender functionFrank Binns
Add a new function, drmOpenRender, that can be used to open render nodes. This can be used in the same way that drmOpenControl is used to open control nodes. Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
2015-01-23Rename DRM_NODE_RENDER to DRM_NODE_PRIMARYFrank Binns
Now that there are render nodes it doesn't seem appropriate for the type of the card nodes to be DRM_NODE_RENDER. For this reason, rename this type to DRM_NODE_PRIMARY as this name better represents the purpose of these nodes. Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
2015-01-21configure.ac: bump version to 2.4.59 for releaseMaarten Lankhorst
2015-01-21only enable support for freedreno on arm automaticallyMaarten Lankhorst
Users can still override this by explicitly passing --enable-freedreno to configure. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
2015-01-19radeon: align r600/700 fmask to 128 X blocks.Dave Airlie
After much searching and empricial testing, and reading of things I've no justifcation for this fix, other than it really appears this is what the hw is doing or close enough. It makes sense that each entry in the FMASK corresponds to an entry in the CMASKm and the CMASK is organised into 128x128 blocks, but I can't find anything in any of the docs/info from AMD. But I've spent a lot of time on this, and this seems to be the simplest fix, in that we don't over allocate things too much, once this fix in place we can nuke the extra multiplier in mesa. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-01-18configure/freedreno: enable freedreno by defaultRob Clark
Now that enabling freedreno doesn't automatically enable kgsl, lets enable it by default. The drm/msm driver has been upstream for a while now, and it's ABI is locked. So I don't think we need to keep calling it experimental. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-01-18configure/freedreno: make KGSL support optionalRob Clark
libdrm_freedreno currently supports two backends, 'msm' for the upstream drm/msm driver, and 'kgsl' which supports (to some extent), the android/ downstream kgsl driver plus a sort of drm shim nonsense to get flink names. However, kgsl support is strictly on a best-effort basis. Different android devices with different versions of kgsl may have different abi's. And the existing kgsl interface (at least the parts of it that we use) is completely broken for 64bit. Lets disable it by default lest anyone actually try to use it. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-01-16intel: Fix GTT entry setup for aub dumpZhenyu Wang
On recent emulator GTT entry setup for aub dump needs mem type as GTT_ENTRY instead of NONLOCAL. NONLOCAL would write data in main memory space which is wrong with new memory layout. GTT_ENTRY write would setup GTT memory pool and other required internal buffers. With this I can run aub dump on latest release without crash. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2015-01-11modetest: Allocate dumb buffers with the correct bppLaurent Pinchart
The modetest application uses libkms to allocate dumb buffers, leading to overallocation due to the hardcoded 32 bpp value. This can even cause failures in drivers when the resulting pitch is too large for the hardware to handle and gets rejected by the driver when creating the frame buffer. Fix this by computing the required bpp value and allocating dumb buffers directly without going through libkms. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2015-01-05Add new DRM_MODE_CONNECTOR and _ENCODER definesAdam Cheney
Update drm_mode.h defines from kernel upstream for connector and encoder types to expose DSI and other newly defined types. Signed-off-by: Adam Cheney <acheney@nvidia.com> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-27tegra: Implement drm_tegra_bo_{get,set}_tiling()Thierry Reding
These two functions are simple wrappers around the corresponding IOCTLs and operate on drm_tegra_bo objects. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-27tegra: Implement drm_tegra_bo_{get,set}_flags()Thierry Reding
These two functions are simple wrappers around the corresponding IOCTLs and operate on drm_tegra_bo objects. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-27tegra: Add SET/GET_FLAGS IOCTLsThierry Reding
The DRM_TEGRA_GEM_SET_FLAGS IOCTL can be used to set the flags of a buffer object after it has been allocated or imported. Flags associated with a buffer object can be queried using the DRM_TEGRA_GEM_GET_FLAGS IOCTL. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-27tegra: Add GET/SET_TILING IOCTLsThierry Reding
Currently the tiling parameters of buffer objects can only be set at allocation time, and only a single tiled mode is supported. This new DRM_TEGRA_GEM_SET_TILING IOCTL allows more modes to be set and also allows the tiling mode to be changed after the allocation. This will enable the Tegra DRM driver to import buffers from a GPU and directly scan them out by configuring the display controller appropriately. To complement this, the DRM_TEGRA_GEM_GET_TILING IOCTL can query the current tiling mode of a buffer object. This is necessary when importing buffers via handle (as is done in Mesa for example) so that userspace can determine the proper parameters for the 2D or 3D engines. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-27tegra: Add simple test for drm_tegra_open()Thierry Reding
This test opens a device, dumps the version information and checks that a Tegra DRM context can be opened on it. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-27libdrm: Add NVIDIA Tegra supportThierry Reding
Add the libdrm_tegra helper library to encapsulate Tegra-specific interfaces to the DRM. Furthermore, Tegra is added to the list of supported chips in the modetest and vbltest programs. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-24update signed/object prop typesRob Clark
Signed-off-by: Rob Clark <robclark@freedesktop.org>