platform/upstream/libdrm.git
8 years agomodetest: add mediatek to module list
Daniel Kurtz [Thu, 1 Sep 2016 01:48:17 +0000 (09:48 +0800)]
modetest: add mediatek to module list

There is a mediatek drm kms driver: Add "mediatek" to the static
lists of driver names.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: JB Tsai <jb.tsai@mediatek.com>
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
8 years agomodetest: Adding amdgpu to module list
satsahu [Tue, 9 Aug 2016 07:17:51 +0000 (12:47 +0530)]
modetest: Adding amdgpu to module list

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agolist: fix an issue with android build using clang
Rob Clark [Tue, 2 Aug 2016 20:16:02 +0000 (16:16 -0400)]
list: fix an issue with android build using clang

Sorry, I don't understand the android build system enough to say *which*
version of clang this effects, but either "clang-2812033" or
"clang-3016494" (probably the later).

But when 'sample' is undefined (ie. unitialized variable), the result is
not as well defined as it is with gcc.  Instead use a typeof() cast with
a defined value (ie. zero).

This fixes a crash that was reported on android.

Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agoSimplify the RELEASING steps based on current release.sh.
Eric Anholt [Wed, 20 Jul 2016 19:24:00 +0000 (12:24 -0700)]
Simplify the RELEASING steps based on current release.sh.

Since release.sh creates and pushes a libdrm-$VERSION tag for us,
there's no need to also have the user manually generating a $VERSION
tag as well.

I also dropped the "optional" part of distcheck.  You shouldn't have
pushed master with a version bump that hasn't passed distcheck.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoBump version for release libdrm-2.4.70
Rob Clark [Sat, 23 Jul 2016 13:25:48 +0000 (09:25 -0400)]
Bump version for release

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agoradeon: Fix typo in stderr message
Andreas Boll [Thu, 21 Jul 2016 12:27:33 +0000 (14:27 +0200)]
radeon: Fix typo in stderr message

Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoman: Fix typo
Andreas Boll [Thu, 21 Jul 2016 12:25:41 +0000 (14:25 +0200)]
man: Fix typo

Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoautomake: Include virtgpu_drm.h in the release tarball
Andreas Boll [Thu, 21 Jul 2016 12:03:33 +0000 (14:03 +0200)]
automake: Include virtgpu_drm.h in the release tarball

The plan is to use this version of virtgpu_drm.h in mesa and drop mesa's
local copy.
To actually use this header it needs to be shipped in the tarball.

This was missed in c745e541a9d8dfd3fb5e1ac57297e58d34d9328f

Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agovirtgpu: Update kernel header
Andreas Boll [Fri, 22 Jul 2016 09:45:36 +0000 (11:45 +0200)]
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>
8 years agoautomake: Don't include Android Makefiles in the release tarball
Andreas Boll [Thu, 21 Jul 2016 10:05:03 +0000 (12:05 +0200)]
automake: Don't include Android Makefiles in the release tarball

Currently only some Android Makefiles are included in the release tarball.
To be more consistent one could either add the remaining files or don't
ship Android Makefiles altogether.

According to Emil the Android folk doesn't use our release tarballs.
Thus it makes sense to remove those files from distribution which also
means less work for maintenance in the future.

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>
8 years agoradeon: Wire up radeon-symbol-check to make check
Andreas Boll [Thu, 21 Jul 2016 08:54:15 +0000 (10:54 +0200)]
radeon: Wire up radeon-symbol-check to make check

This was missed in 552de225bf2740ba0cb52312c21353d71d934b8c

Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agofreedreno: fix warnings
Rob Clark [Thu, 21 Jul 2016 17:59:53 +0000 (13:59 -0400)]
freedreno: fix warnings

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Tested-by: Rob Herring <robh@kernel.org>
8 years agofreedreno: fix android build break
Rob Clark [Thu, 21 Jul 2016 17:19:35 +0000 (13:19 -0400)]
freedreno: fix android build break

The 'deprecated' #define was causing problems with bionic system headers
which used __attribute__((deprecated)).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Tested-by: Rob Herring <robh@kernel.org>
8 years agofreedreno: fix distcheck errors
Rob Clark [Thu, 21 Jul 2016 14:54:49 +0000 (10:54 -0400)]
freedreno: fix distcheck errors

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: move legacy kgsl related README
Rob Clark [Wed, 20 Jul 2016 17:11:58 +0000 (13:11 -0400)]
freedreno: move legacy kgsl related README

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno/msm: use hashtable to track bo idx
Rob Clark [Tue, 28 Jun 2016 17:33:07 +0000 (13:33 -0400)]
freedreno/msm: use hashtable to track bo idx

Note: cache the last ring the bo was emitted on, to avoid excess
hashtable lookups.  We do this by tracking ring seqno to avoid
problems with dangling pointers.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: support growable cmdstream buffers
Rob Clark [Mon, 20 Jun 2016 18:06:24 +0000 (14:06 -0400)]
freedreno: support growable cmdstream buffers

The issue that userspace needed to solve is that there is ~two orders of
magnitude size difference in cmdstream buffers (both for gmem commands
and for draw commands), and that the previous practice of allocating
worst-case sizes is quite wasteful.  Previously a submit would be
constructed (for example) like:

  CMD  TARGET  DESCRIPTION
   g0    N     gmem/tiling commands
   b0    Y     binning commands
   d0    Y     draw commands

Which, after the one non-IB-target cmd buffer is inserted into the
kernel controlled ringbuffer, looks like (not to scale):

         b0:           d0:
        +-----+       +-----+
   IB1  | ... |       | ... |
        +-----+       +-----+
         ^             ^
         |             |
         +-----+       +-+---------+
         g0:   |         |         |
        +----+----+----+----+----+----+----
   IB0  | .. | IB | .. | IB | .. | IB | ...
        +----+----+----+----+----+----+----
         ^              tile0     tile1
         |
         +-----------+
  userspace          |
  ~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  kernel             |
               ----+----+----
   ringbuffer  ... | IB | ...
               ----+----+----

Now, multiple physical cmdstream buffers per fd_ringbuffer are supported,
so this becomes:

  CMD  TARGET  DESCRIPTION
   g0    N
   ...   N     gmem/tiling commands
   gN    N
   b0    Y
   ...   Y     binning commands
   bN    Y
   d0    Y
   ...   Y     draw commands
   dN    Y

Which, after the non-IB-target cmd buffers (g0..gN) are inserted into
the kernel controlled ringbuffer, looks like:

             b0:      b1            d0:      d1
            +-----+  +-----+        +-----+  +-----+
       IB1  | ... |  | ... | ...    | ... |  | ... | ...
            +-----+  +-----+        +-----+  +-----+
             ^        ^              ^        ^
             |        |              |        |
             |        +-+            |  +-----+------+
             +-----+    |            |  |            |
                   |    |         +--+----------+    |
             g0:   |    |         |     |       |    |
            +----+----+----+----+----+----+---+----+----+----
       IB0  | .. | IB | IB | .. | IB | IB |.. | IB | IB |...
            +----+----+----+----+----+----+---+----+----+----
             ^                   tile0         tile1
             | to b0  to b1
             |   |      |          to|d0    to|d1
             |   |      +----+       |      +-+-----------+
             |   |           |       |      |             |
             |   +------+    |       +-+-------------+    |
             |    g1:   |    |         |    |        |    |
             |   +----+----+----+----+----+----+---+----+----+----
       IB0   |   | .. | IB | IB | .. | IB | IB |.. | IB | IB |...
             |   +----+----+----+----+----+----+---+----+----+----
             |    ^                   tileX         tileY
             |    |
             |    +-----------+
             +-----------+    |
      userspace          |    |
      ~~~~~~~~~~~~~~~~~~~|~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      kernel             |    |
                   ----+----+----+----
       ringbuffer  ... | IB | IB | ...
                   ----+----+----+----

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno/msm: split out dump_submit() helper
Rob Clark [Wed, 22 Jun 2016 14:41:24 +0000 (10:41 -0400)]
freedreno/msm: split out dump_submit() helper

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agolist: add first/last entry macros
Rob Clark [Tue, 21 Jun 2016 15:33:30 +0000 (11:33 -0400)]
list: add first/last entry macros

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno/msm: split out cmd buffer tracking from ring
Rob Clark [Fri, 3 Jun 2016 19:41:20 +0000 (15:41 -0400)]
freedreno/msm: split out cmd buffer tracking from ring

First step towards supporting a single logical ringbuffer mapping to
multiple physical cmd buffers, which will enable dynamically growing
ringbuffers.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno/msm: drop return from get_cmd()
Rob Clark [Sat, 18 Jun 2016 13:08:53 +0000 (09:08 -0400)]
freedreno/msm: drop return from get_cmd()

Not actually needed.  It just needs to ensure that there is a
corresponding entry in the submit's cmds table.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno/msm: use private bo-cache for ringbuffer bo's
Rob Clark [Wed, 1 Jun 2016 20:11:52 +0000 (16:11 -0400)]
freedreno/msm: use private bo-cache for ringbuffer bo's

Since they get vmap'd on the kernel side, they are a bit more costly.
Don't let them mingle with the riffraff.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: fix potential leak at free
Rob Clark [Wed, 1 Jun 2016 20:04:13 +0000 (16:04 -0400)]
freedreno: fix potential leak at free

If user has emit'd reloc's, and then resets or deletes the ring, we want
to drop the ref's that the ring holds to the bo's to avoid a leak.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: ocd
Rob Clark [Wed, 1 Jun 2016 19:42:55 +0000 (15:42 -0400)]
freedreno: ocd

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: support either coarse or fine-grained bucket sizes
Rob Clark [Wed, 1 Jun 2016 19:37:52 +0000 (15:37 -0400)]
freedreno: support either coarse or fine-grained bucket sizes

The normal bo cache uses some intermediate steps between power of two
jumps to reduce memory wastage.  But for a ringbuffer bo cache, we do
not need this.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: expose kernel driver version
Rob Clark [Wed, 1 Jun 2016 18:35:44 +0000 (14:35 -0400)]
freedreno: expose kernel driver version

gallium needs to know if the kernel is new enough to support explicit
fencing, dynamically grown ringbuffers, etc.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: fix potential fd leak in error path
Rob Clark [Wed, 1 Jun 2016 18:35:06 +0000 (14:35 -0400)]
freedreno: fix potential fd leak in error path

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: add madvise support
Rob Clark [Tue, 31 May 2016 16:06:50 +0000 (12:06 -0400)]
freedreno: add madvise support

With a new enough drm/msm, we can let the kernel know about buffers that
are in the bo cache, so the kernel can free them under memory pressure.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: sync uapi
Rob Clark [Tue, 31 May 2016 15:49:46 +0000 (11:49 -0400)]
freedreno: sync uapi

(from drm-next for 4.8)

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: move bo-cache to it's own file
Rob Clark [Tue, 31 May 2016 14:46:59 +0000 (10:46 -0400)]
freedreno: move bo-cache to it's own file

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: refactor bo-cache API
Rob Clark [Mon, 30 May 2016 16:45:33 +0000 (12:45 -0400)]
freedreno: refactor bo-cache API

Split out interface to allocate from and release to bo-cache, and get
rid of direct usage of bucket level API from fd_bo/etc.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: split out fd_bo_cache
Rob Clark [Mon, 30 May 2016 15:49:39 +0000 (11:49 -0400)]
freedreno: split out fd_bo_cache

Eventually we'll want a separate bo-cache for ringbuffer bo's, since
ringbuffer bo's get vmap'd on the kernel side, it is preferrable to
re-use them as ringbuffers rather than something else.  Plus should
help to add madvise support if it is a bit better decoupled from bo
allocation (next patch).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: add simpler ring-reloc
Rob Clark [Fri, 20 May 2016 21:19:04 +0000 (17:19 -0400)]
freedreno: add simpler ring-reloc

Provide a way to insert a reference (ie. OUT_IB()) to a target ring,
executing all the cmds in the target ring from the start.

Sometimes the ringmarker stuff is just overkill.  And it will won't
really work properly once we support multiple physical cmdstream buffers
per fd_ringbuffer.  So in the future the old ringmarker related APIs
will be deprecated in a few releases.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: rework internal ring->emit_reloc_ring()
Rob Clark [Fri, 20 May 2016 21:14:43 +0000 (17:14 -0400)]
freedreno: rework internal ring->emit_reloc_ring()

No need for it to deal with ringmarkers.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agotests/drmdevice: be move verbose when using open()
Emil Velikov [Wed, 13 Jul 2016 09:01:34 +0000 (10:01 +0100)]
tests/drmdevice: be move verbose when using open()

Print out the node we're attempting to open and a message if/why we fail
to do so.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agotests/drmdevice: print out the full 'bus' and 'dev' strings
Emil Velikov [Wed, 13 Jul 2016 08:43:26 +0000 (09:43 +0100)]
tests/drmdevice: print out the full 'bus' and 'dev' strings

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agodrm: fix drmFreeDevices memory leak on multi GPU setups
Qiang Yu [Thu, 14 Jul 2016 09:10:56 +0000 (17:10 +0800)]
drm: fix drmFreeDevices memory leak on multi GPU setups

When in multi GPU case, devices array may have some
NULL "hole" in between two devices. So check all
array elements and free non-NULL device.

Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agodrm: drmGetDevice return correct device on multi GPU setups
Qiang Yu [Thu, 14 Jul 2016 09:10:55 +0000 (17:10 +0800)]
drm: drmGetDevice return correct device on multi GPU setups

Currently drmGetDevice always returns the first device it finds under
/dev/dri/.

Move the target device to the start of the list during iteration. This
way during deduplication it'll preserve its place and will be returned
to the user.

v2: Keep the memory leak separate.
v3: Move the drmFoldDuplicatedDevices description

Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
[Emil Velikov: move drmFoldDuplicatedDevices description, add
changelog, reword commit message]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoBump version to 2.4.69 for release. libdrm-2.4.69
Eric Anholt [Wed, 20 Jul 2016 18:42:45 +0000 (11:42 -0700)]
Bump version to 2.4.69 for release.

Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agovc4: Update kernel headers for getparam addition.
Eric Anholt [Sat, 2 Jul 2016 21:18:43 +0000 (14:18 -0700)]
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>
8 years agopull in sys/sysmacros.h when available
Mike Frysinger [Tue, 21 Jun 2016 16:18:15 +0000 (12:18 -0400)]
pull in sys/sysmacros.h when available

This header provides major/minor/makedev funcs under most Linux C
libs.  Pull it in to fix building with newer versions that drop the
implicit include via sys/types.h.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94231
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
8 years agoxf86drm.c: Fix mix of tabs and spaces
Jan Vesely [Thu, 30 Jun 2016 18:22:52 +0000 (14:22 -0400)]
xf86drm.c: Fix mix of tabs and spaces

Remove whitespace at the end of line.

8 years agoAndroid: strip out header files from sources list
Rob Herring [Tue, 5 Jul 2016 20:21:18 +0000 (15:21 -0500)]
Android: strip out header files from sources list

AOSP master now errors if LOCAL_SRC_FILES contains headers, so filter
out header files from the source lists.

Signed-off-by: Rob Herring <robh@kernel.org>
8 years agointel: Removing PCI IDs that are no longer listed as Kabylake.
Rodrigo Vivi [Tue, 28 Jun 2016 00:02:34 +0000 (17:02 -0700)]
intel: Removing PCI IDs that are no longer listed as Kabylake.

This is unusual. Usually IDs listed on early stages of platform
definition are kept there as reserved for later use.

However these IDs here are not listed anymore in any of steppings
and devices IDs tables for Kabylake on configurations overview
section of BSpec.

So it is better removing them before they become used in any
other future platform.

v2: Rebase.

Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
8 years agointel: Add more Kabylake PCI IDs.
Rodrigo Vivi [Thu, 23 Jun 2016 21:01:33 +0000 (14:01 -0700)]
intel: Add more Kabylake PCI IDs.

The spec has been updated adding new PCI IDs.

v2: Avoid using "H" instead of HALO to keep names uniform - DK.

Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
8 years agoradeon: use SAMPLE_SPLIT=2 for better MSAA perf on EG/CM
Marek Olšák [Thu, 26 May 2016 12:33:12 +0000 (14:33 +0200)]
radeon: use SAMPLE_SPLIT=2 for better MSAA perf on EG/CM

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agofreedreno/msm: fix memory leak on ringbuffer free
Rob Clark [Mon, 13 Jun 2016 13:49:46 +0000 (09:49 -0400)]
freedreno/msm: fix memory leak on ringbuffer free

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agoxf86drm: ensure proper alignment of pointers in drmProcessPciDevice
Nicolai Hähnle [Fri, 13 May 2016 06:11:13 +0000 (01:11 -0500)]
xf86drm: ensure proper alignment of pointers in drmProcessPciDevice

Previously, (*device)->businfo.pci would end up misaligned, which results
in undefined behavior.

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agodrm: fix multi GPU drmGetDevices only return one device
Qiang Yu [Mon, 6 Jun 2016 16:29:16 +0000 (12:29 -0400)]
drm: fix multi GPU drmGetDevices only return one device

When multi GPU present, after drmFoldDuplicatedDevices
merge same busid deveces, two different devices may be
seperated by zero in local_devices[]. The for loop
should check all local_devices instead of exit when
meet a zero.

Reviewed-by: Jim Qu <Jim.Qu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
8 years agoamdgpu: fix fence status query
Christian König [Thu, 2 Jun 2016 11:37:05 +0000 (13:37 +0200)]
amdgpu: fix fence status query

Not initializing the ip instance leads to sporadic fails in the tests.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agotests/amdgpu: adapt to new polaris10/11 uvd fw
Sonny Jiang [Thu, 12 May 2016 16:48:43 +0000 (12:48 -0400)]
tests/amdgpu: adapt to new polaris10/11 uvd fw

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: add interface to adapt firmware requirement
Leo Liu [Thu, 17 Mar 2016 15:30:57 +0000 (11:30 -0400)]
tests/amdgpu: add interface to adapt firmware requirement

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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: expand write/copy tests to compute
Alex Deucher [Sat, 20 Feb 2016 00:28:23 +0000 (19:28 -0500)]
tests/amdgpu: expand write/copy tests to compute

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: expand write/copy tests to compute
Alex Deucher [Sat, 20 Feb 2016 00:22:51 +0000 (19:22 -0500)]
tests/amdgpu: expand write/copy tests to compute

Uses same packets as gfx.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoBump version for release libdrm-2.4.68
Kenneth Graunke [Thu, 28 Apr 2016 00:52:50 +0000 (17:52 -0700)]
Bump version for release

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agointel/skl: Add missing SKL PCI IDs
Michał Winiarski [Wed, 17 Feb 2016 10:40:19 +0000 (11:40 +0100)]
intel/skl: Add missing SKL PCI IDs

Used by production devices:
    Intel(R) HD Graphics 510
    Intel(R) HD Graphics 535
    Intel(R) Iris(TM) Graphics 550
    Intel(R) Iris(TM) Graphics P555

Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Tested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agofreedreno: add dummy fd_bo_from_fbdev implementation when KGSL is disabled
Nicolas Dechesne [Mon, 11 Apr 2016 14:50:23 +0000 (16:50 +0200)]
freedreno: add dummy fd_bo_from_fbdev implementation when KGSL is disabled

Make sure that this function is defined (even empty/dummy) when KGSL support is
disabled, since it's part of the driver i/f and it was reported to cause symbols
issues when building against musl libc implementation.

Reported-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agoheaders: Update drm.h
Daniel Vetter [Wed, 30 Mar 2016 13:51:00 +0000 (15:51 +0200)]
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>
8 years agoheaders: Update drm_mode.h
Daniel Vetter [Wed, 30 Mar 2016 13:44:42 +0000 (15:44 +0200)]
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>
8 years agoheaders: Update drm_fourcc.h
Daniel Vetter [Wed, 30 Mar 2016 13:39:12 +0000 (15:39 +0200)]
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>
8 years agoheaders: Update drm_sarea.h
Daniel Vetter [Wed, 30 Mar 2016 13:38:28 +0000 (15:38 +0200)]
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>
8 years agoheaders: Update drm_i915.h
Daniel Vetter [Wed, 30 Mar 2016 13:36:55 +0000 (15:36 +0200)]
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>
8 years agotests/kms-steal-crtc: Use correct includes
Daniel Vetter [Wed, 30 Mar 2016 14:18:53 +0000 (16:18 +0200)]
tests/kms-steal-crtc: Use correct includes

It was relying on drm_fourcc.h providing <stdint.h>, which is silly.
Fix it.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
8 years agoheaders: Remove _DRM_GEM
Daniel Vetter [Wed, 30 Mar 2016 13:40:26 +0000 (15:40 +0200)]
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>
8 years agotegra: Sync with Linux kernel UAPI header
Thierry Reding [Thu, 31 Mar 2016 10:41:10 +0000 (12:41 +0200)]
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>
8 years agoxf86drm: Fix spelling mistakes
Eric Engestrom [Sun, 3 Apr 2016 18:48:12 +0000 (19:48 +0100)]
xf86drm: Fix spelling mistakes

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agotests: Fix spelling mistakes
Eric Engestrom [Sun, 3 Apr 2016 18:48:11 +0000 (19:48 +0100)]
tests: Fix spelling mistakes

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agointel: Fix spelling mistakes
Eric Engestrom [Sun, 3 Apr 2016 18:48:09 +0000 (19:48 +0100)]
intel: Fix spelling mistakes

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agofreedreno: Fix spelling mistakes
Eric Engestrom [Sun, 3 Apr 2016 18:48:08 +0000 (19:48 +0100)]
freedreno: Fix spelling mistakes

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoexynos: Fix spelling mistake
Eric Engestrom [Sun, 3 Apr 2016 18:48:07 +0000 (19:48 +0100)]
exynos: Fix spelling mistake

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoamdgpu: Fix spelling mistakes
Eric Engestrom [Sun, 3 Apr 2016 18:48:06 +0000 (19:48 +0100)]
amdgpu: Fix spelling mistakes

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agoproptest: print signed values correctly
Emil Velikov [Mon, 28 Mar 2016 21:15:03 +0000 (22:15 +0100)]
proptest: print signed values correctly

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agomodetest: print signed values correctly
Gustavo Padovan [Tue, 22 Mar 2016 21:42:52 +0000 (18:42 -0300)]
modetest: print signed values correctly

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agogitignore: ignore kms-steal-crtc and kms-universal-planes
Gustavo Padovan [Tue, 22 Mar 2016 21:42:51 +0000 (18:42 -0300)]
gitignore: ignore kms-steal-crtc and kms-universal-planes

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by; Emil Velikov <emil.l.velikov@gmail.com>

8 years agotests: add virtio_gpu to the driver list
Gustavo Padovan [Thu, 17 Mar 2016 21:42:25 +0000 (18:42 -0300)]
tests: add virtio_gpu to the driver list

modetest was failing to work with driver because it wasn't in the
module list.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agofreedreno: add support for FD_TIMESTAMP
Rob Clark [Tue, 23 Feb 2016 16:47:33 +0000 (11:47 -0500)]
freedreno: add support for FD_TIMESTAMP

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: update uapi
Rob Clark [Tue, 23 Feb 2016 16:39:53 +0000 (11:39 -0500)]
freedreno: update uapi

In drm-next.. needed for timestamp queries in mesa.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agointel: Adding missing Broxton PCI IDs.
Rodrigo Vivi [Wed, 2 Mar 2016 01:07:04 +0000 (17:07 -0800)]
intel: Adding missing Broxton PCI IDs.

These IDs were already part of the kernel since:

kernel commit 985dd4360fdf2533fe48a33a4a2094f2e4718dc0
Author: Imre Deak <imre.deak@intel.com>
Date:   Thu Jan 28 16:04:12 2016 +0200

    drm/i915/bxt: update list of PCIIDs

Cc: Venkateswarlu Vinjamuri <venkateswarlu.v.vinjamuri@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com>
8 years agoandroid: add virgl to be a valid driver
Chih-Wei Huang [Thu, 25 Feb 2016 16:41:53 +0000 (00:41 +0800)]
android: add virgl to be a valid driver

To avoid the warning:

external/libdrm/libkms/Android.mk:17: invalid GPU drivers: virgl

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agovmwgfx: update uapi
Thomas Hellstrom [Wed, 24 Feb 2016 09:08:28 +0000 (10:08 +0100)]
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>
8 years agoamdgpu/tests: fix tests for asics with one VCE instance
Sonny Jiang [Thu, 18 Feb 2016 15:59:56 +0000 (10:59 -0500)]
amdgpu/tests: fix tests for asics with one VCE instance

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoadd libdrm_vc4.pc to .gitignore
Rob Clark [Mon, 15 Feb 2016 18:50:51 +0000 (13:50 -0500)]
add libdrm_vc4.pc to .gitignore

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agoBump version for release libdrm-2.4.67
Rob Clark [Mon, 15 Feb 2016 18:42:51 +0000 (13:42 -0500)]
Bump version for release

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: add support for FD_MAX_FREQ
Rob Clark [Wed, 10 Feb 2016 17:27:33 +0000 (12:27 -0500)]
freedreno: add support for FD_MAX_FREQ

Only msm backend supports this.  Sorry, if you are using kgsl, no
time-elapsed query for you.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: small refactor for get_param
Rob Clark [Wed, 10 Feb 2016 17:26:55 +0000 (12:26 -0500)]
freedreno: small refactor for get_param

Will simplify next commit.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: update uapi
Rob Clark [Wed, 10 Feb 2016 17:26:20 +0000 (12:26 -0500)]
freedreno: update uapi

In drm-next.. needed for time-elapsed (and future perf ctrs) in mesa.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agoamdgpu: fix for submition with no ibs
Ken Wang [Thu, 4 Feb 2016 05:52:22 +0000 (13:52 +0800)]
amdgpu: fix for submition with no ibs

Avoid a crash if no IBs are specified.

Signed-off-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: add a test for cp dma copy
Alex Deucher [Wed, 3 Feb 2016 23:59:33 +0000 (18:59 -0500)]
tests/amdgpu: add a test for cp dma copy

Use the CP to copy data between buffers

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: make amdgpu_command_submission_sdma_copy_linear generic
Alex Deucher [Wed, 3 Feb 2016 23:55:20 +0000 (18:55 -0500)]
tests/amdgpu: make amdgpu_command_submission_sdma_copy_linear generic

So it can be shared for CP tests.

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: add a test for cp dma fill
Alex Deucher [Wed, 3 Feb 2016 23:52:18 +0000 (18:52 -0500)]
tests/amdgpu: add a test for cp dma fill

Use the CP to fill to memory.

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: make amdgpu_command_submission_sdma_const_fill generic
Alex Deucher [Wed, 3 Feb 2016 23:38:50 +0000 (18:38 -0500)]
tests/amdgpu: make amdgpu_command_submission_sdma_const_fill generic

So it can be shared for CP tests.

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: add a test for cp write data
Alex Deucher [Wed, 3 Feb 2016 23:33:45 +0000 (18:33 -0500)]
tests/amdgpu: add a test for cp write data

Use the CP to write data to memory.

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: make amdgpu_command_submission_sdma_write_linear generic
Alex Deucher [Thu, 4 Feb 2016 17:23:43 +0000 (12:23 -0500)]
tests/amdgpu: make amdgpu_command_submission_sdma_write_linear generic

So it can be shared for CP tests.

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agotests/amdgpu: make amdgpu_sdma_test_exec_cs() generic (v2)
Alex Deucher [Wed, 3 Feb 2016 23:14:48 +0000 (18:14 -0500)]
tests/amdgpu: make amdgpu_sdma_test_exec_cs() generic (v2)

Share with upcoming CP tests.

v2: drop unnecessary forward declaration

Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoandroid: enable building static version of libdrm
Sumit Semwal [Fri, 29 Jan 2016 16:00:47 +0000 (10:00 -0600)]
android: enable building static version of libdrm

Android needs libdrm built statically for recovery;
enable that as well.

Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agolibkms: add libdrm to Requires.private
Emil Velikov [Thu, 28 Jan 2016 11:39:03 +0000 (11:39 +0000)]
libkms: add libdrm to Requires.private

Analogous to last two changes (amdgpu and radeon).

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jakob Bornecrantz <wallbraker@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agoradeon: add libdrm to Requires.private
Emil Velikov [Thu, 28 Jan 2016 11:33:34 +0000 (11:33 +0000)]
radeon: add libdrm to Requires.private

Equivalent to the amdgpu commit before. Additionally, when libdrm is
installed to a 'non-default' location, users of libdrm_radeon will fail
to build, as radeon_cs.h (and maybe others) won't have their
dependencies (drm.h radeon_drm.h) fulfilled.

Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agoamdgpu: add libdrm as private requirement/dependency
Emil Velikov [Thu, 28 Jan 2016 11:26:24 +0000 (11:26 +0000)]
amdgpu: add libdrm as private requirement/dependency

Otherwise libdrm.so won't end up in the --libs, when one static links
libdrm_amdgpu.

Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agovc4: Add headers and .pc files for VC4 userspace development.
Eric Anholt [Mon, 25 Jan 2016 18:16:56 +0000 (10:16 -0800)]
vc4: Add headers and .pc files for VC4 userspace development.

The headers were originally written in Mesa, imported to the kernel,
and improved upon in vc4-gpu-tools.  These come from the v-g-t copies
and will replace the Mesa and v-g-t copies, and hopefully be used from
new tests in igt, as well.

v2: Fix linking against libdrm_intel instead of libdrm.
v3: Drop Libs and Cflags since they'll be inherited from libdrm.
v4: Switch to Requires.private.  I was wrong about standard practice,
    apparently only Intel was doing plain Requires (sorry to all
    involved).

Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agoutil: Add support for vc4.
Eric Anholt [Sat, 23 Jan 2016 00:37:25 +0000 (16:37 -0800)]
util: Add support for vc4.

This lets allows using modetest for overlay plane testing.

Signed-off-by: Eric Anholt <eric@anholt.net>