Commit Graph

189 Commits (f70e8ae83590d2a1fb1972dc7e875dd6a9355b77)

Author SHA1 Message Date
Leo Liu 5faee77272 amdgpu/drm: add AMDGPU_HW_IP_VCN_DEC
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2017-05-23 17:43:07 -04:00
Hawking Zhang 3f457d2a6e amdgpu: add raven family id
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2017-05-23 17:41:31 -04:00
Daniel Stone e379c6a137 Headers: Sync drm{,_mode}.h with the kernel
Generated using make headers_install, based on drm-misc-next commit
5db06a8a98f515f67446a69c57577c4c363ec65d.

This clarifies the comments around modifiers such that they are
per-framebuffer rather than per-plane, adds the beginnings of aspect
ratio mode flags, link status properties, and updates the 'reserved'
field from vblank events to include the CRTC ID.

v2: Split into separate patch, pull in full kernel changes.
v3: Undo revert of connector-type enums, since it is not actually
    harmful.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-06 20:32:43 +01:00
Nicolai Hähnle 0a4626fead headers: the uint*_t vs. __u* discrepancy in amdgpu_drm is fixed
This was already done in commit 3dc002df3e ("amdgpu: sync amdgpu_drm.h
with kernel 4.11-rc2"), now update the README accordingly.

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 18:32:09 +02:00
Nicolai Hähnle f104148e40 headers: sync amdgpu_drm.h from airlied/drm-next
Changes include: PRT and preemption flags, sensor info, and some more
changes for Vega10.

Generated using make headers_install from airlied/drm-next commit
320d8c3d38739fa8e31a076b86cbdafcf8897d5e.

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 18:31:47 +02:00
Leo Liu c7b5aaeb1f amdgpu_drm: add AMDGPU_HW_IP_UVD_ENC
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2017-03-27 21:45:50 +02:00
Marek Olšák c34b28ae9b amdgpu: update amdgpu_drm.h for Vega10
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-27 21:42:07 +02:00
Marek Olšák 3dc002df3e amdgpu: sync amdgpu_drm.h with kernel 4.11-rc2
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-27 21:42:07 +02:00
Emil Velikov f6499b1153 headers: add explicit note against local changes in the README
Even with the step by step guide people sometimes get confused.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-02-14 01:35:56 +00:00
Chris Wilson a3d715ee14 Import uapi/i915_drm.h from v4.10-rc5-950-g152d5750dda9
To sync with "drm/i915: Support explicit fencing for execbuf"
2017-01-27 20:00:38 +00:00
Eric Anholt a8315834a9 vc4: Add new GETPARAMs that have been merged to drm-next.
Signed-off-by: Eric Anholt <eric@anholt.net>
2016-11-28 10:24:22 -08:00
Grazvydas Ignotas 1924b6704a libdrm: random typo fixes
Just some trivial boring typo fixes all over the tree.
READMEs and comments only.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-11-22 13:54:31 +00:00
Emil Velikov de13ea3877 headers: Add README file
Since we're trying to standardise and make things more consistent in
the area, add a basic README which covers some of the more popular
topics.

v2:
 - Drop drm-misc (Daniel Vetter)
v3:
 - Elaborate on when and which headers to update
 - Add a list of headers and the respective "issues"
 - Add file to EXTRA_DIST

Cc: Dave Airlie <airlied@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-11-14 19:52:38 +00:00
Michel Dänzer 9433b702fc headers: Sync drm{,_mode}.h with the kernel
Generated using make headers_install, based on linus master commit
b67be92feb486f800d80d72c67fd87b47b79b18e.

Acked-by: Daniel Vetter <daniel@ffwll.ch>
2016-10-13 16:53:36 +09:00
Yang Rong 98887140e3 intel: Export pooled EU and min no. of eus in a pool.
Update kernel interface with new I915_GETPARAM ioctl entries for
pooled EU and min no. of eus in a pool. Add a wrapping function
for each parameter. Userspace drivers need these values when decide
the thread count. This kernel enabled pooled eu by default for BXT
and for fused down 2x6 parts it is advised to turn it off.

But there is another HW issue in these parts (fused
down 2x6 parts) before C0 that requires Pooled EU to be enabled as a
workaround. In this case the pool configuration changes depending upon
which subslice is disabled and the no. of eus in a pool is different,
So userspace need to know min no. of eus in a pool.

V2: use return value as the query results.
    ret < 0 when error, ret = 0 when not support, and ret > 0 indicate
    query results.(Chris)
V3: Correct V2 errors.

Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-07 13:50:23 +01:00
Marek Olšák 77bc69ae9c amdgpu: sync amdgpu_drm.h with the kernel
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2016-09-05 15:43:22 +02:00
Marek Olšák 39fff59962 radeon: sync radeon_drm.h with the kernel
the CIK tile mode definitions are moved out,
userspace doesn't use them

Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2016-09-05 15:43:22 +02:00
Flora Cui 4462303700 amdgpu: expose the AMDGPU_GEM_CREATE_VRAM_CLEARED flag
With this flag specified, VRAM buffer will be cleared at
allocation time.

Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Alexandre Demers <alexandre.f.demers@gmail.com>
2016-09-02 17:30:19 -04:00
Andreas Boll 9af2ccdef3 virtgpu: Update kernel header
Generated using make headers_install.

This brings the C++ guard, proper include path for drm.h and the
switching to kernel types for fixed-with integers.

Generated from drm-next commit c11dea5b0290984fa48111957ba3fdc5b3bdae5a

Suggested-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-07-23 09:45:53 +02:00
Eric Anholt 2212a6465d vc4: Update kernel headers for getparam addition.
This also brings over the C++ guard introduced recently in the kernel
headers.

Signed-off-by: Eric Anholt <eric@anholt.net>
2016-07-15 15:38:12 -07:00
Daniel Vetter cc9a53f076 headers: Update drm.h
This needs the kernel patch to make sure the C++ protection is in place.

Otherwise just new defines, using the right fixed-width types and
some shuffling in where stuff is defined (the DRM_CAP list moved, but
the #defines are the same).

Generated using make headers_install.

Generated fromd drm-misc commit 249c4f538b1aae55d41699f8bafc6cb762a7f48f

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-12 13:15:49 +02:00
Daniel Vetter 89cdda3d5f headers: Update drm_mode.h
Generated using make headers_install.

Only cosmetics&new definitions here now.

Generated fromd drm-misc commit 249c4f538b1aae55d41699f8bafc6cb762a7f48f

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-12 13:15:49 +02:00
Daniel Vetter 268ae7cae5 headers: Update drm_fourcc.h
Only real difference is switching to kernel types for fixed-width
integers, like we should.

Generated fromd drm-misc commit 249c4f538b1aae55d41699f8bafc6cb762a7f48f

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-12 13:15:49 +02:00
Daniel Vetter f37b9a8edd headers: Update drm_sarea.h
Generated using make headers_install. Only difference is a new value
of SAREA_MAX for mips. Not that we ever shipped a dri1 driver on that
platform probably ...

Generated fromd drm-misc commit 249c4f538b1aae55d41699f8bafc6cb762a7f48f

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-12 13:15:49 +02:00
Daniel Vetter 7cba3bb75e headers: Update drm_i915.h
Generated using make header_install.

Generated fromd drm-intel-next-queued commit
55c561a708eec328822721233b1148119e80f5c3

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-12 13:15:49 +02:00
Daniel Vetter 81506da8cf headers: Remove _DRM_GEM
This was purely a kernel-internal type used in a early patch version
to add GEM bo mmap support. It was never used in-kernel in merged code
nor in userspace. Nuke it to align with kernel headers.

For reference the kernel patch:

commit 05f51722a154e73019434bd020e50ddb941046c5
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Dec 11 11:34:32 2013 +0100

    drm/bufs: remove handling of _DRM_GEM mappings

    Gone with the new gem vma offset manager from David.

    We can also ditch the uapi header definition from the enum since
    userspace never used this. It ended up in there purely for historical
    reasons (for reusing the old drm mmap code essentially), not because
    userspace ever needed it.

    Cc: David Herrmann <dh.herrmann@gmail.com>
    Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-12 13:15:49 +02:00
Thierry Reding 65ea85d85c tegra: Sync with Linux kernel UAPI header
Update the UAPI header to the latest version in the Linux kernel. This
changes the struct drm_tegra_gem_mmap to properly handle offsets on 64-
bit architectures.

See commit bdf765071a8b ("drm/tegra: gem: Return 64-bit offset for
mmap(2)") in the Linux kernel (as of v4.1).

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-04-07 18:32:03 +01:00
Thomas Hellstrom db7202d180 vmwgfx: update uapi
The libdrm shipped vmwgfx_drm.h is obsolete and incorrect.
Update it to latest kernel version.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2016-02-24 10:08:28 +01:00
Eric Anholt eeb23de23b vc4: Add the DRM header file.
I'll build some libdrm C code soon, but for now this lets libdrm users
use vc4 ioctls.  Produced from headers_install of
1df59b8497f47495e873c23abd6d3d290c730505 (drm-next) in the kernel.

Signed-off-by: Eric Anholt <eric@anholt.net>
2016-02-03 11:29:44 -08:00
Ben Skeggs d1ec093e4c nouveau: import and install a selection of nvif headers from the kernel
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-22 13:21:05 +10:00
Kristian Høgsberg Kristensen 7d74a83d22 intel: Update i915_drm.h
Copy from drm-intel-nightly a307a3a81c2bf2883457e03abcf5c9520cf452c1.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-12-14 11:30:10 -08:00
Tvrtko Ursulin ce3185d345 libdrm: Use userspace compatible type in fourcc_mod_code macro
__u64 should be used instead of u64.

Kernel headers originally pulled in:

commit 8983fe5497
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-05 16:11:21 -05:00
Dave Airlie c745e541a9 drm: add virtgpu_drm.h
This is in drm-next now, so add to libdrm.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-10-21 09:21:07 +10:00
Tvrtko Ursulin 8983fe5497 libdrm: Add framebuffer modifiers uapi
Sync up with new kernel features as per commits:

e3eb3250d84ef97b766312345774367b6a310db8
93b81f5102a7cd270a305c2741b17c8d44bb0629
b5ff6e1637b683d5996ae11ac29afe406c0bee90
8c4f83fb1e8bf317e894f62d17a63c32b7a6b75e
570655b09b065d2fff1b8ab9bdb8308f4c5a05a3

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-09-09 11:15:17 -04:00
Alexandr Akulich 399ac8bafa libdrm/amdgpu: Fixed drm.h include.
The include type changed from system to own.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alexandr Akulich <akulichalexander@gmail.com>
2015-08-05 13:47:52 -04:00
Leo Liu d2cbe9ecbe amdgpu: add VCE harvesting instance query
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2015-08-05 13:47:52 -04:00
Alex Deucher cf5646001e amdgpu: update to the latest kernel header
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-05 13:47:51 -04:00
Christian König 933091e1d6 amdgpu: cleanup VA IOCTL handling
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-05 13:47:51 -04:00
Jammy Zhou d273d84754 amdgpu: merge amdgpu_drm.h from kernel
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-05 13:47:51 -04:00
Marek Olšák 76af5c249f amdgpu: remove bo_handle from amdgpu_cs_ib_info, IBs should be in buffer list
Reviewed-by: Christian König <christian.koenig@amd.com>
2015-08-05 13:47:51 -04:00
Ken Wang ef9aa370bb amdgpu: add ib_start_alignment and ib_size_alignment for interface query
Signed-off-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-05 13:47:50 -04:00
Ken Wang cdd1edcae0 amdgpu: add ce_ram_size for interface query
Signed-off-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-05 13:47:50 -04:00
Ken Wang 4bf29413a3 amdgpu: add vram_type and vram_bit_width for interface query
Signed-off-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-05 13:47:50 -04:00
Ken Wang fc9fc7dd11 amdgpu: add max_memory_clock for interface query
Signed-off-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-05 13:47:50 -04:00
Marek Olšák 745081395e amdgpu: rename GEM_OP_SET_INITIAL_DOMAIN -> GEM_OP_SET_PLACEMENT
No users.

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-05 13:47:50 -04:00
Christian König 942a5dbe6c amdgpu: stop checking flag masks
The kernel is responsible for parameter checking, not libdrm.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
2015-08-05 13:47:50 -04:00
Marek Olšák 7c50f0d984 amdgpu: add new AMDGPU_TILING flags
Copied from the kernel.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
2015-08-05 13:47:50 -04:00
Marek Olšák 4b39a8e7cf amdgpu: implement amdgpu_cs_query_reset_state
v2: also return the number of hangs

Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-05 13:47:49 -04:00
Jammy Zhou 241cf6d105 amdgpu: validate the upper limit of virtual address v2
Only 8GB virtual address space is used by default now

v2: use -ENOSPC for the error case

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
2015-08-05 13:47:49 -04:00
Jammy Zhou db126d1d8a amdgpu: reuse the kernel IB flags v2
v2: remove 'CE' from the preamble flag

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2015-08-05 13:47:49 -04:00
Jammy Zhou d9c431dd02 amdgpu: add ctx_id for wait_cs
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: David Zhou <david1.zhou@amd.com>
2015-08-05 13:47:49 -04:00
Jammy Zhou a4c8321179 amdgpu: remove AMDGPU_GEM_CREATE_CPU_GTT_UC
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-05 13:47:49 -04:00
Alex Deucher 0936139536 drm: add libdrm_amdgpu (v7)
This is the new ioctl wrapper used by the new admgpu driver.
It's primarily used by xf86-video-amdgpu and mesa.

v2: fix amdgpu_drm.h install
v3: Integrate some of the sugestions from Emil:
    clean up Makefile.am, configure.ac
    capitalize header guards
    fix _FILE_OFFSET_BITS with config.h
    use drm_mmap/drm_munmap
    Remove unused ARRAY_SIZE macro
    use shared list implementation
    use shared math implementation
    use drmGetNodeTypeFromFd helper
v4: remove unused tiling defines
v5: include amdgpu.h in Makefile.am
v6: update amdgpu_drm.h
v7: libdrm.h -> libdrm_macros.h

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-05 13:47:48 -04:00
Daniel Stone 32471b265c Add blob property create/destroy ioctl wrappers
v2: Use memclear to zero out structure.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
2015-06-29 19:19:22 +01:00
Ville Syrjälä ed44e0b958 Support atomic modesetting ioctl
Add support for the atomic modesetting ioctl through a property-set API.

v1: Squashed intermediate patches from Ville, Rob and myself. Updated
    for current kernel interface (no blobs).
v2: Rewrite user-facing API to provide transactional/cursor interface.
    Use memclear to zero out ioctl.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Daniel Stone <daniels@collabora.com>

v3 [Emil Velikov]: Remove DRM_CAP_ATOMIC - superseded by
DRM_CLIENT_CAP_ATOMIC.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-29 19:01:19 +01:00
Alexandre Courbot a1acffd4e0 nouveau: add coherent BO attribute
Add a flag allowing Nouveau to specify that an object should be coherent
at allocation time. This is required for some class of objects like
fences which are randomly-accessed by both the CPU and GPU. This flag
instructs the kernel driver to make sure the object remains coherent
even on architectures for which coherency is not guaranteed by the bus.

Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
2015-05-21 21:20:29 +03:00
Neil Roberts 8576527cfa intel: Merge latest i915_drm.h
The main incentive to do this is to get I915_PARAM_REVISION.

v2: Rebase on top of some changes that were made to the header without
    copying the whole file from the kernel source.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Neil Roberts <neil@linux.intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-19 17:19:46 +00:00
Jeff McGee d556e068a7 intel: Export total subslice and EU counts
Update kernel interface with new I915_GETPARAM ioctl entries for
subslice total and EU total. Add a wrapping function for each
parameter. Userspace drivers need these values when constructing
GPGPU commands. This kernel query method is intended to replace
the PCI ID-based tables that userspace drivers currently maintain.
The kernel driver can employ fuse register reads as needed to
ensure the most accurate determination of GT config attributes.
This first became important with Cherryview in which the config
could differ between devices with the same PCI ID.

The kernel detection of these values is device-specific. Userspace
drivers should continue to maintain ID-based tables for older
devices which return ENODEV when using this query.

v2: remove unnecessary include of <stdbool.h> and increment the
    I915_GETPARAM indices to match updated kernel patch.

For: VIZ-4636
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-18 18:15:37 +00:00
Adam Cheney 566c3ce877 Add new DRM_MODE_CONNECTOR and _ENCODER defines
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>
2015-01-05 14:30:57 -05:00
Thierry Reding 7b5e652689 tegra: Add SET/GET_FLAGS IOCTLs
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-27 17:20:32 +01:00
Thierry Reding 5ad2eef6ea tegra: Add GET/SET_TILING IOCTLs
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-27 17:20:32 +01:00
Thierry Reding d6a4c2cbd1 libdrm: Add NVIDIA Tegra support
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-27 17:05:35 +01:00
Rob Clark fb4177046d update signed/object prop types
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-11-24 19:56:50 -05:00
Emil Velikov deb690f78d Remove i810_drm.h and i830_drm.h from the distribution tarball
Both of these headers are not installed since they were imported.
They  are not even used internally. The latter no longer exist in the
kernel...

Note the * symbol in EXTRA_DIST causes 'make distcheck' to fail. When
was the last time we ran it ?

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-28 17:09:33 +01:00
Emil Velikov 98ec08d836 automake: remove obsolete makefiles
Rather than having two extra makefiles in order to ship ~10 headers
just fold its 5 lines of code into the top one makefile.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-09-28 17:09:33 +01:00
Emil Velikov 4255d3d51d libdrm, freedreno, intel, nouveau, radeon: add Makefile.sources
Will be used to consolidate the required sources lists as well as the
install-able headers. This is turn will help us to avoid the
duplication with the upcoming Android build support.

v2: Rename the headers variable to *_H_FILES.
v3: Rebase on top of symbol visibility patches.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-09-01 16:06:01 +01:00
Andreas Boll 8bdb4cfa45 libdrm: Fix drm.h include in qxl drm header file
Use "drm.h" instead of "drm/drm.h" as used in the other header files.
Fixes xserver-xorg-video-qxl build with KMS support on Debian, where this
file is installed in /usr/include/libdrm.

Fixes Debian bug #746807

Reported-by: Bastian Blank <waldi@debian.org>
Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-07-28 17:35:29 +02:00
Tvrtko Ursulin 4fddc92e04 intel: Add new userptr ioctl
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2014-06-19 18:35:05 +01:00
Damien Lespiau 20edfb9a16 intel: Sync typo fix from the kernel sources.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-06-19 18:29:20 +01:00
Damien Lespiau 3cde43f566 intel: Sync the command parser version parameter from kernel
Cc: Bradley Volkin <bradley.d.volkin@intel.com>
Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-06-19 18:29:02 +01:00
Matt Roper 8fc62ca8ac drm: Add universal plane capability bit and plane type enums
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-05-19 19:43:16 -04:00
Marek Olšák 4e77991424 radeon: sync with radeon_drm.h from kernel headers
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-04-04 19:07:55 +02:00
Ben Widawsky a254cb5041 intel: Merge latest i915_drm.h
This was not done as a straight copy because reset_stats IOCTL landed in
libdrm before upstream kernel.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-10 11:05:50 -08:00
Marek Olšák 4c5de721c4 Bump the version to 2.4.50 2013-12-03 19:50:22 +01:00
Marek Olšák 67d92404d6 radeon: implement 2D tiling for CIK
Bug fixes and simplification by Marek.
We have to use the tile index of 0 for non-MSAA depth-stencil after all.

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-11-23 00:35:39 +01:00
Ian Romanick 5a41b02504 intel: Add support for GPU reset status query ioctl
I would have just used the drmIoctl interface directly in Mesa, but the
ioctl needs some data from the drm_intel_context that is not exposed
outside libdrm.

This ioctl is in the drm-intel-next tree as b635991.

v2: Update based on Mika's kernel work.

v3: Fix compile failures from last-minute typos.  Sigh.

v4: Import the actual changes from the kernel i915_drm.h.  Only comments
on some fields of drm_i915_reset_stats differed.  There are still some
deltas between the kernel i915_drm.h and the one in libdrm, but those
can be resolved in other patches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> [v3]
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-15 11:31:49 -08:00
Dave Airlie da738d1ed0 Revert "intel: Add support for GPU reset status query ioctl"
This reverts commit 6335e1d28c.

No taxation without representation, in other words no userspace without kernel
stuff being in a stable location, either drm-next but I'll accept drm-intel-next
for intel specific stuff.
2013-11-08 16:40:18 +10:00
Ian Romanick 6335e1d28c intel: Add support for GPU reset status query ioctl
I would have just used the drmIoctl interface directly in Mesa, but the
ioctl needs some data from the drm_intel_context that is not exposed
outside libdrm.

v2: Update based on Mika's kernel work.

v3: Fix compile failures from last-minute typos.  Sigh.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-07 19:14:31 -08:00
Keith Packard ebff7a1e22 Add DRM_MODE_PAGE_FLIP_ASYNC define
This exposes the kernel API for performing asynchronous flips

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-11-06 19:49:39 -08:00
Damien Lespiau 2dd7054781 drm: Sync the DRM_SET_CLIENT_CAP ioctl definition
v2: SET_CAP -> SET_CLIENT_CAP renaming

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 13:35:49 +01:00
Damien Lespiau edf5c7cde5 drm: Synchronize the stereo 3D mode flags from the kernel headers
v2: stereo layouts are now an enum (Daniel Vetter)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-09-30 13:35:49 +01:00
Daniel Kurtz 0f4452bb51 libdrm: Make some drm headers compatible with gcc -std=c89 -pedantic
The following minor changes were needed to these headers:
 * Convert // comments to /* */
 * No , after final member of enum

With these changes, these header files can be included by a program that
is built with gcc options:
  -std=c89 -Werror -pedantic

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-09-22 13:30:46 -07:00
Michel Dänzer a48d6e5621 radeon: Fix tiling mode index for 1D tiled depth/stencil surfaces on CIK
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-09-18 18:28:51 +02:00
Imre Deak f8f1f6e37a libdrm: add missing DRM_CAP_TIMESTAMP_MONOTONIC
Just add the definition according the kernel's copy of drm.h

Signed-off-by: Imre Deak <imre.deak@intel.com>
2013-07-04 11:03:52 +03:00
Dave Airlie 2e0ab62376 drm: add hotspot cursor interface support.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-07-02 09:21:39 +01:00
Dave Airlie 040f6b015e drm: add qxl drm header file
Now that this driver is merged add the header file.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-05-09 12:55:42 +10:00
Xiang, Haihao 011999927f intel: Add support for VEBOX ring (v2)
v2: Fix the test for has_vebox

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-27 11:31:22 -07:00
Jerome Glisse 309cb649a3 radeon: update radeon_drm.h to kernel last API additions v2
v2: sync with radeon-next tree for 3.10

http://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next-3.10-wip

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2013-04-12 09:46:20 -04:00
Eric Anholt 934ea3b321 intel: Import updated i915_drm.h.
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-10 09:48:05 -07:00
Dave Airlie cc0a14575d libdrm: add prime fd->handle and handle->fd interfaces
These are just basic ioctl wrappers around the prime ioctls,
along with the capability reporting.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-16 02:39:56 +01:00
Dave Airlie 41dfb20cdc libdrm: add missing caps from kernel to drm.h
This just moves over some missing caps from the kernel.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-07-16 02:39:12 +01:00
Ben Widawsky a5b2946889 intel: updated header for contexts
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-By: Kenneth Graunke <kenneth@whitecape.org>
2012-06-27 09:57:16 -07:00
Rob Clark 7b228e900f Add support for bitmask properties
A bitmask property is similar to an enum.  The enum value is a bit
position (0-63), and valid property values consist of a mask of
zero or more of (1 << enum_val[n]).

Signed-off-by: Rob Clark <rob@ti.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2012-06-08 09:27:21 -05:00
Paulo Zanoni 8c75703df0 Add support for generic object properties IOCTLs
New library calls:
- drmModeObjectGetProperties
- drmModeFreeObjectProperties
- drmModeObjectSetProperties

Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Reviewed-by: Rob Clark <rob@ti.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2012-06-08 09:27:20 -05:00
Ben Widawsky ba6130c2d6 intel: wait render header updates
make headers_install in kernel. Copy to here.

v2: signed ns_timeout

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-06 14:09:29 -07:00
Ben Widawsky 69e7469e35 intel: sanitize i915_drm.h
run make headers_isntall on d-i-n, copy to here

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-06 14:09:10 -07:00
Rob Clark 9b893e4a42 libdrm: update drm headers from kernel for prime/dmabuf
Sync drm.h with from kernel headers for the new PRIME_HANDLE_TO_FD
and PRIME_FD_TO_HANDLE ioctls from Dave Airlie's "drm: base prime/
dma-buf support (v5)" kernel patch.

Signed-off-by: Rob Clark <rob@ti.com>
2012-04-11 09:44:35 -05:00
Alan Coopersmith f82c778703 Make drm/drm_fourcc.h portable to non-linux platforms
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-05 19:07:02 -08:00
Jerome Glisse c51f7f0e46 radeon: add surface allocator helper v10
The surface allocator is able to build complete miptree when allocating
surface for r600/r700/evergreen/northern islands GPU family. It also
compute bo size and alignment for render buffer, depth buffer and
scanout buffer.

v2 fix r6xx/r7xx 2D tiling width align computation
v3 add tile split support and fix 1d texture alignment
v4 rework to more properly support compressed format, split surface pixel
   size and surface element size in separate fields
v5 support texture array (still issue on r6xx)
v6 split surface value computation and mipmap tree building, rework eg
   and newer computation
v7 add a check for tile split and 2d tiled
v8 initialize mode value before testing it in all case, reenable
   2D macro tile mode on r6xx for cubemap and array. Fix cubemap
   to force array size to the number of face.
v9 fix handling of stencil buffer on evergreen
v10 on evergreen depth buffer need to have enough room for a stencil
    buffer just after depth one

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-01 17:11:29 -05:00
Eugeni Dodonov 151cdcfe68 intel: query for LLC support
This adds support for querying the kernel about the LLC support in the
hardware.

In case the ioctl fails, we assume that it is present on GEN6 and GEN7.

v2: fix the return code checking

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-02-01 15:54:02 -02:00