summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-01-06intel/kbl: Add Kabylake PCI idsHEADmasterkbl-cleanupjenkinsRodrigo Vivi1-1/+56
Also, following kernel definition Kabylake is skylake. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2015-12-22intel: Restore formatting of offsets in debug statementsMichał Winiarski1-9/+14
Using lower_32_bits and upper_32_bits macros was accidentally dropped in: commit 8b4d57e7b75cb0bd01d11ad7f597909034a316aa Author: Michał Winiarski <michal.winiarski@intel.com> Date: Wed Sep 9 16:07:10 2015 +0200 intel: Add support for softpin Let's restore previous, more readable format. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-12-22Bump version for releaseBen Skeggs1-1/+1
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22nouveau: clean up nouveau.h, noting deprecated members/functionsBen Skeggs1-113/+114
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22nouveau: add support for newer kernel interfacesBen Skeggs2-7/+155
v2. - leave client-provided pointer unmodified on sclass_get() failure Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22nouveau: add new interface to create a nouveau_deviceBen Skeggs3-47/+89
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22nouveau: remove nouveau_object_find()Ben Skeggs3-13/+0
No more internal users, and there's never been external users. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22nouveau: make use of nouveau_drm::fd instead of nouveau_device::fdBen Skeggs3-31/+40
The latter is deprecated, and will not be valid for newer clients. v2. - split out nouveau_object_find removal Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22nouveau: stack legacy nouveau_device on top of nouveau_drmBen Skeggs1-25/+21
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22nouveau: introduce object to represent the kernel clientBen Skeggs3-0/+55
Because NVIF intentionally lacks some of the paths necessary to be compatible with various mistakes we've made over the years, libdrm needs to know whether a client has been updated and that it's safe to make use of the new kernel interfaces. Clients still using nouveau_device_open()/wrap() will be forced to make use of ABI16 instead of NVIF. v2. - remove lib_version, nothing used it - leave client-provided pointer unmodified on failure Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22nouveau: add interfaces to query information about supported classesBen Skeggs5-1/+117
This will expose functionality supported by newer kernel interfaces. Current userspace uses the chipset to determine which classes are likely exposed, which generally works pretty well, but isn't as flexible as it could be. Unfortunately, the G98:GF100 video code in Mesa is still relying on the kernel exposing incorrect vdec classes on some chipsets. The ABI16 kernel interfaces have a workaround for this in place, but that will no longer be available once libdrm supports NVIF. To prevent a regression when NVIF support is added, if there's no kernel support for NVIF, libdrm will magic up a class list containing correct vdec classes anyway instead of failing with -ENODEV. v2. - add description of abi16/vdec workaround - add description of sclass/mclass - leave client-provided pointer unmodified on abi16_sclass() failure Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22nouveau: add interface to call an object's methodsBen Skeggs3-0/+10
This will expose functionality supported by newer kernel interfaces, giving access to things such as ZBC controls, perfmon, etc. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22nouveau: make it possible to init object in pre-allocated memoryBen Skeggs1-16/+48
Required for an upcoming patch, not exposed to library clients. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22nouveau: move object functions up, to avoid future foward declsBen Skeggs1-56/+56
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22nouveau: move more abi16-specific logic into abi16.cBen Skeggs3-58/+93
v2. - add a comment about the (ab)use of nouveau_object::length - add a comment about abi16_object() return values v3. - handle new client + old kernel for sw classes Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-22nouveau: import and install a selection of nvif headers from the kernelBen Skeggs10-2/+473
This commit also modifies the install path of the main libdrm_nouveau header to be under a nouveau/ subdirectory. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18tests: remove missleading commentsStefan Agner1-14/+1
The comment has been copied from modetest and is not applicable for vbltest. Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-12-18vbltest: Use util_open()Thierry Reding2-21/+20
Use the new util_open() helper instead of open-coding the method for finding a usable device. While at it, this adds -D and -M command-line options to vbltest to make its usage more consistent with its siblings modetest and proptest. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18proptest: Use util_open()Thierry Reding1-22/+38
Use the new util_open() helper instead of open-coding the method for finding a usable device. While at it, make the command-line interface more consistent with that of modetest by adding the -D and -M options. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18modetest: Use util_open()Thierry Reding1-24/+3
Use the new util_open() helper instead of open-coding the method for finding a usable device. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18tests: Add helper to open a device/moduleThierry Reding2-0/+57
The new function util_open() encapsulates the standard method employed by tests to open a device or module. There is a verbatim copy of this in almost all test programs, with slight variations in the list of modules. Moving this code into a common helper allows code reuse and makes tests more consistent. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18tests: kms: Implement universal planes testThierry Reding2-2/+365
This small program allows universal planes to be tested. Currently this isn't very flexible because it allows only the first plane of a given type to be tested on the first CRTC. However it should be simple to extend this with some additional command-line arguments. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18tests: kms: Implement CRTC stealing testThierry Reding2-0/+172
This test program sets a mode and framebuffer on a connector and cycles through all CRTCs, moving the connector to each of them in turn. This is useful to verify that CRTC stealing is properly handled in the DRM core and drivers. Signed-off-by: Thierry Reding <treding@nvidia.com>
2015-12-18tests: Add libkms-test libraryThierry Reding9-1/+795
This library contains abstractions for KMS that help remove the need for a lot of boilerplate in KMS test programs. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18proptest: Add Android supportThierry Reding3-2/+19
Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18tests: Move name tables to libutilThierry Reding5-101/+165
These tables are duplicated in several places, so move them into libutil so that they can be shared. Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18tests: Split helpers into libraryThierry Reding23-990/+1223
Some of the helpers, such as the pattern drawing helpers or the format lookup helpers, have potential to be reused. Move them into a separate library to make it easier to share them. Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18exynos: bump version numberTobias Jakobi1-1/+1
The Exynos API was extended quite a bit, so reflect this in the version number. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2015-12-18tests/exynos: add test for g2d_moveTobias Jakobi2-0/+133
To check if g2d_move() works properly we create a small checkerboard pattern in the center of the screen and then shift this pattern around with g2d_move(). The pattern should be properly preserved by the operation (but not the surrounding area). Tested-by: Hyungwon Hwang <human.hwang@samsung.com> Reviewed-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> [Emil Velikov: add g2d_move to the symbol check] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18exynos/fimg2d: add g2d_moveTobias Jakobi2-0/+98
We already have g2d_copy() which implements G2D copy operations from one buffer to another. However we can't do a overlapping copy operation in one buffer. Add g2d_move() which acts like the standard memmove() and properly handles overlapping copies. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2015-12-18exynos: fimg2d: add g2d_set_directionTobias Jakobi1-0/+51
This allows setting the two direction registers, which specify how the engine blits pixels. This can be used for overlapping blits, which happen e.g. when 'moving' a rectangular region inside a fixed buffer. Reviewed-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
2015-12-18tests/exynos: use XRGB8888 for framebufferTobias Jakobi1-1/+1
This matches the G2D color mode that is used in the entire code. The previous (incorrect) RGBA8888 would only work since the Exynos mixer did its configuration based on the bpp, and not based on the actual pixelformat. Reviewed-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2015-12-18tests/exynos: add fimg2d event testTobias Jakobi3-2/+336
This tests async processing of G2D jobs. A separate thread is spawned to monitor the DRM fd for events and check whether a G2D job was completed. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
2015-12-18exynos/fimg2d: add g2d_config_eventTobias Jakobi3-2/+28
This enables us to pass command buffers to the kernel which trigger an event on the DRM fd upon completion. The final goal is to enable asynchronous operation of the G2D engine, similar to async page flips. Passing the event userdata pointer through the G2D context was chosen to not change the current API (e.g. by adding a userdata argument to each public functions). Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2015-12-18tests/exynos: add fimg2d performance analysisTobias Jakobi3-2/+345
Currently only fast solid color clear performance is measured. A large buffer is allocated and solid color clear operations are executed on it with randomly chosen properties (position and size of the region, clear color). Execution time is measured and output together with the amount of pixels processed. The 'simple' variant only executes one G2D command buffer at a time, while the 'multi' variant executes multiple ones. This can be used to measure setup/exec overhead. The test also serves a stability check. If clocks/voltages are too high or low respectively, the test quickly reveals this. Tested-by: Hyungwon Hwang <human.hwang@samsung.com> Reviewed-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2015-12-18exynos: Introduce exynos_handle_event()Tobias Jakobi4-0/+115
Used to handle kernel events specific to the Exynos platform. Currently only G2D events are handled. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
2015-12-14intel: Add drm_intel_bo_set_softpin_offset to intel-symbol-checkKristian Høgsberg Kristensen1-0/+1
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-12-14Add tests/drmdevice to .gitignoreKristian Høgsberg Kristensen1-0/+1
Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-12-14intel: Add support for softpinMichał Winiarski4-27/+169
Softpin allows userspace to take greater control of GPU virtual address space and eliminates the need of relocations. It can also be used to mirror addresses between GPU and CPU (shared virtual memory). Calls to drm_intel_bo_emit_reloc are still required to build the list of drm_i915_gem_exec_objects at exec time, but no entries in relocs are created. Self-relocs don't make any sense for softpinned objects and can indicate a programming errors, thus are forbidden. Softpinned objects are marked by asterisk in debug dumps. Cc: Thomas Daniel <thomas.daniel@intel.com> Cc: Kristian Høgsberg <krh@bitplanet.net> Cc: Zou Nanhai <nanhai.zou@intel.com> Cc: Michel Thierry <michel.thierry@intel.com> Cc: Ben Widawsky <ben@bwidawsk.net> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
2015-12-14intel: add drm_intel_bo_use_48b_address_range to symbol-check testMichel Thierry1-0/+1
Signed-off-by: Michel Thierry <michel.thierry@intel.com> Reviewed-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com> Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-12-14intel: 48b ppgtt support (EXEC_OBJECT_SUPPORTS_48B_ADDRESS flag)Michel Thierry4-19/+95
Gen8+ supports 48-bit virtual addresses, but some objects must always be allocated inside the 32-bit address range. In specific, any resource used with flat/heapless (0x00000000-0xfffff000) General State Heap (GSH) or Instruction State Heap (ISH) must be in a 32-bit range, because the General State Offset and Instruction State Offset are limited to 32-bits. The i915 driver has been modified to provide a flag to set when the 4GB limit is not necessary in a given bo (EXEC_OBJECT_SUPPORTS_48B_ADDRESS). 48-bit range will only be used when explicitly requested. Callers to the existing drm_intel_bo_emit_reloc function should set the use_48b_address_range flag beforehand, in order to use full ppgtt range. v2: Make set/clear functions nops on pre-gen8 platforms, and use them internally in emit_reloc functions (Ben) s/48BADDRESS/48B_ADDRESS/ (Dave) v3: Keep set/clear functions internal, no-one needs to use them directly. v4: Don't set 48bit-support flag in emit reloc, check for ppgtt type before enabling set/clear function, print full offsets in debug statements, using port of lower_32_bits and upper_32_bits from linux kernel (Michał) References: http://lists.freedesktop.org/archives/intel-gfx/2015-July/072612.html Cc: Ben Widawsky <ben@bwidawsk.net> Cc: Michał Winiarski <michal.winiarski@intel.com> Signed-off-by: Michel Thierry <michel.thierry@intel.com> Reviewed-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com> Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-12-14intel: Update i915_drm.hKristian Høgsberg Kristensen1-10/+49
Copy from drm-intel-nightly a307a3a81c2bf2883457e03abcf5c9520cf452c1. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-12-01intel: add the missing <strings.h> includeChih-Wei Huang1-0/+1
It defines the prototype of ffs that fixes the building error on Android 6.0 64-bit image. Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-11-20amdgpu: Make amdgpu_cs_calculate_timeout() return something sensible on errorTom St Denis1-2/+4
Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-11-20amdgpu: fix overflow for timeout calculationJammy Zhou1-2/+6
Set the timeout to AMDGPU_TIMEOUT_INFINITE when overflow happens Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-11-16configure.ac: test for the same atomic function as the one we useEmil Velikov1-1/+1
Unlikely that we'll hit a case where __sync_fetch_and_add is present while __sync_add_and_fetch isn't. Regardless let's keep things sane and consistent. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-11-16configure.ac: rework compiler builtin atomic testsJonathan Gray1-2/+2
The libdrm autoconf test for atomics uses __sync_val_compare_and_swap with the address of a function argument which triggers a gcc ICE on sparc64 with the OpenBSD system compiler. Mark Kettenis pointed out that while other architectures probably spill the argument onto the stack this is likely not the case on register window architectures like SPARC and suggested passing a pointer as an argument instead which avoids the ICE and allows the drm libraries requiring atomics to build on sparc64 with the autoconf build. Reported-by: Christian Weisgerber <naddy@openbsd.org> Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Matthieu Herrb <matthieu@openbsd.org>
2015-11-10radeon: Handle surface offsets exceeding 32 bits correctlyMichel Dänzer1-8/+9
The slice_size and bo_size fields were getting truncated to 32 bits. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-11-05libdrm: Use userspace compatible type in fourcc_mod_code macroTvrtko Ursulin1-1/+1
__u64 should be used instead of u64. Kernel headers originally pulled in: commit 8983fe5497e89a3ffaba3ad1ee06a30a1c7e6daf Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Date: Mon Aug 3 10:48:03 2015 +0100 libdrm: Add framebuffer modifiers uapi Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: dri-devel@lists.freedesktop.org Cc: Rob Clark <robdclark@gmail.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-11-03intel: Cleanup SKL PCI ID definitions.Ben Widawsky1-18/+22
This removes ones which aren't used, and adds some new ones. I kept the original names where possible. Cc: Kristian Høgsberg <krh@bitplanet.net> Cc: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>