platform/upstream/libdrm.git
9 years agonouveau: Only export public functions.
Maarten Lankhorst [Thu, 31 Jul 2014 12:33:36 +0000 (14:33 +0200)]
nouveau: Only export public functions.

This hides all the abi16_* functions and the nouveau_debug variable,
they should have been private to begin with.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoconfigure: Support symbol visibility when available
Thierry Reding [Wed, 19 Feb 2014 14:56:50 +0000 (15:56 +0100)]
configure: Support symbol visibility when available

Checks whether or not the compiler supports the -fvisibility option. If
so it sets the VISIBILITY_CFLAGS variable which can be added to the per
directory AM_CFLAGS where appropriate.

By default all symbols will be hidden via the VISIBILITY_CFLAGS. The
drm_public macro can be used to mark symbols that should be exported.

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoconfigure.ac: bump version to 2.4.56 for release 2.4.56 libdrm-2.4.56
Marek Olšák [Tue, 29 Jul 2014 16:54:33 +0000 (18:54 +0200)]
configure.ac: bump version to 2.4.56 for release

9 years agoradeon: fix typo in sample split / fixes MSAA on Hawaii
Marek Olšák [Sat, 26 Jul 2014 18:07:33 +0000 (20:07 +0200)]
radeon: fix typo in sample split / fixes MSAA on Hawaii

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
9 years agolibdrm: Fix drm.h include in qxl drm header file
Andreas Boll [Mon, 5 May 2014 21:28:23 +0000 (23:28 +0200)]
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>
9 years agobump to version 2.4.55 for release libdrm-2.4.55
Maarten Lankhorst [Fri, 25 Jul 2014 13:08:23 +0000 (15:08 +0200)]
bump to version 2.4.55 for release

9 years agoexynos: do not build fimg2d_test when building without libkms support.
Maarten Lankhorst [Fri, 25 Jul 2014 09:22:24 +0000 (11:22 +0200)]
exynos: do not build fimg2d_test when building without libkms support.

This prevents a build failure.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
9 years agoradeon: Add missing header includes.
Thomas Klausner [Tue, 15 Jul 2014 17:22:55 +0000 (19:22 +0200)]
radeon: Add missing header includes.

unistd.h for close() and xf86drm.h for drmOpen().

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
9 years agoradeon: Remove superfluous parentheses.
Thomas Klausner [Tue, 15 Jul 2014 17:22:52 +0000 (19:22 +0200)]
radeon: Remove superfluous parentheses.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
9 years agoexynos: fix scaling factor computation in g2d_copy_with_scale
Tobias Jakobi [Sun, 1 Jun 2014 16:04:06 +0000 (18:04 +0200)]
exynos: fix scaling factor computation in g2d_copy_with_scale

When division of source and destination width yields the
scaling factor for the x-coordinate, then it should be
source/destination _height_ for y.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agoexynos: fix G2D_DOUBLE_TO_FIXED for non-integer input
Tobias Jakobi [Sun, 1 Jun 2014 16:04:05 +0000 (18:04 +0200)]
exynos: fix G2D_DOUBLE_TO_FIXED for non-integer input

The hardware accepts scaling factors formatted in a
fixed-point format. The current macro casts to integer
first, then multiplies by the fp conversion factor.

This does not make any sense. In particular, truly
'fractional' inputs, like 1.5, won't work that way.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agoexynos: fix coordinate computation in g2d_copy
Tobias Jakobi [Sun, 1 Jun 2014 16:04:04 +0000 (18:04 +0200)]
exynos: fix coordinate computation in g2d_copy

The right-bottom register isn't set correctly.
Looks like a copy-and-paste error.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agointel: Add new userptr ioctl
Tvrtko Ursulin [Thu, 19 Jun 2014 14:48:34 +0000 (15:48 +0100)]
intel: Add new userptr ioctl

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
9 years agointel: Sync typo fix from the kernel sources.
Damien Lespiau [Thu, 19 Jun 2014 10:25:48 +0000 (11:25 +0100)]
intel: Sync typo fix from the kernel sources.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
9 years agointel: Sync the command parser version parameter from kernel
Damien Lespiau [Thu, 19 Jun 2014 10:25:03 +0000 (11:25 +0100)]
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>
9 years agofreedreno: add chip-id property
Rob Clark [Wed, 18 Jun 2014 13:45:23 +0000 (09:45 -0400)]
freedreno: add chip-id property

Userspace needs to know the patch-revision in addition to just the
gpu-id (ie. 320, 305, etc).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
9 years agofreedreno: sync kernel header
Rob Clark [Wed, 18 Jun 2014 13:42:11 +0000 (09:42 -0400)]
freedreno: sync kernel header

Signed-off-by: Rob Clark <robclark@freedesktop.org>
9 years agodrm: Add universal plane capability bit and plane type enums
Matt Roper [Thu, 10 Apr 2014 21:23:12 +0000 (14:23 -0700)]
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>
10 years agodrmOpenByName: remove redundant drmAvailable check
Daniel Kurtz [Thu, 17 Apr 2014 04:08:01 +0000 (12:08 +0800)]
drmOpenByName: remove redundant drmAvailable check

drmOpenByName() is a static function that is only called by drmOpen().
drmOpen() already checks drmAvailable(), so the check in
drmOpenByName() is redundant.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
10 years agoexynos: removed unused fd field
Daniel Kurtz [Thu, 17 Apr 2014 03:54:41 +0000 (11:54 +0800)]
exynos: removed unused fd field

The documentation says fd holds the fd from prime import/export.
However, it isn't actually used, nor is it necessary, so let's just remove
it.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
10 years agoexynos: prime: use drmPrime*() helpers
Daniel Kurtz [Thu, 17 Apr 2014 03:54:40 +0000 (11:54 +0800)]
exynos: prime: use drmPrime*() helpers

Reuse the common drmPrime() helper functions rather than reinventing them.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
10 years agoexynos_fimg2d_test: fix drmModeRmFB
Daniel Kurtz [Thu, 17 Apr 2014 03:54:39 +0000 (11:54 +0800)]
exynos_fimg2d_test: fix drmModeRmFB

The first parameter should be the drm fd, second param is the fb id.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
10 years agoexynos: remove unusable "run" target
Daniel Kurtz [Thu, 17 Apr 2014 03:54:38 +0000 (11:54 +0800)]
exynos: remove unusable "run" target

This looks like it was copied from kmstest, but isn't needed, and doesn't
actually work since exynos_fimg2d_test requires parameters.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
10 years agoexynos_fimg2d: fix cast from pointer to integer of different size
Daniel Kurtz [Thu, 17 Apr 2014 03:54:37 +0000 (11:54 +0800)]
exynos_fimg2d: fix cast from pointer to integer of different size

Fixes two gcc [-Wpointer-to-int-cast] warnings.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
10 years agoexynos: fix two warnings
Daniel Kurtz [Thu, 17 Apr 2014 03:54:36 +0000 (11:54 +0800)]
exynos: fix two warnings

warning: assignment makes pointer from integer without a cast [enabled by default]
warning: initialization makes integer from pointer without a cast [enabled by default]

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
10 years agoeyxnos: install exynos tests if HAVE_INSTALL_TESTS
Daniel Kurtz [Thu, 17 Apr 2014 03:54:35 +0000 (11:54 +0800)]
eyxnos: install exynos tests if HAVE_INSTALL_TESTS

This exynos test was added just before HAVE_INSTALL_TESTS, and so didn't
get this annotation.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
10 years agobump version to 2.4.54 for release libdrm-2.4.54
Alex Deucher [Fri, 2 May 2014 20:59:30 +0000 (16:59 -0400)]
bump version to 2.4.54 for release

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
10 years agoradeon: add Mullins pci ids
Samuel Li [Tue, 12 Nov 2013 20:39:31 +0000 (15:39 -0500)]
radeon: add Mullins pci ids

Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
10 years agoradeon: add Mullins chip family
Samuel Li [Thu, 17 Apr 2014 18:30:08 +0000 (14:30 -0400)]
radeon: add Mullins chip family

Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
10 years agoUse signed location for drmModeSetPlane
Daniel Kurtz [Thu, 1 May 2014 11:56:43 +0000 (19:56 +0800)]
Use signed location for drmModeSetPlane

DRM_IOCTL_MODE_SETPLANE crtc_x, crtc_y are s32.
This is to allow a destination location that is partially off screen.

Make this more obvious to users of libdrm by using signed crtc_x/_y
parameters for drmModeSetPlane() as well.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
10 years agointel/chv: Add Cherryview PCI IDs
Ville Syrjälä [Wed, 13 Feb 2013 21:05:45 +0000 (23:05 +0200)]
intel/chv: Add Cherryview PCI IDs

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agofreedreno: add missing fxn prototype
Rob Clark [Fri, 25 Apr 2014 18:53:48 +0000 (14:53 -0400)]
freedreno: add missing fxn prototype

Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agomodetest: add cursor support
Rob Clark [Tue, 22 Apr 2014 14:33:12 +0000 (10:33 -0400)]
modetest: add cursor support

Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agotests: Use drmFreeVersion() instead of drmFree()
Thierry Reding [Wed, 19 Feb 2014 13:45:30 +0000 (14:45 +0100)]
tests: Use drmFreeVersion() instead of drmFree()

drmFreeVersion() frees the memory allocated for the name, date and desc
fields in addition to that for the struct _drmVersion.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
10 years agolibdrm: Remove extraneous parameter
Thierry Reding [Tue, 8 Apr 2014 20:33:04 +0000 (22:33 +0200)]
libdrm: Remove extraneous parameter

The debug message's format string doesn't contain any conversion
specifiers, therefore making the fd argument unused.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
10 years agointel: Fix some format strings
Thierry Reding [Tue, 8 Apr 2014 20:18:18 +0000 (22:18 +0200)]
intel: Fix some format strings

Some of the format strings for debug messages use the wrong modifier to
print sizes.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
10 years agoMark functions printf-like where possible
Thierry Reding [Wed, 22 Jan 2014 11:06:51 +0000 (12:06 +0100)]
Mark functions printf-like where possible

These functions all take a format string and either a list of variable
arguments or a va_list. Use the new DRM_PRINTFLIKE macro to tell the
compiler about it so that the arguments can be checked against the
format string.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
10 years agoamend previous commit to actually compile
Maarten Lankhorst [Wed, 16 Apr 2014 14:52:48 +0000 (16:52 +0200)]
amend previous commit to actually compile

Ugh!

10 years agonouveau: safen up nouveau_device list usage against concurrent access
Maarten Lankhorst [Thu, 13 Mar 2014 02:05:15 +0000 (22:05 -0400)]
nouveau: safen up nouveau_device list usage against concurrent access

I cannot make nouveau_bo_wrap thread-safe (by design), but it seems to be used to convert
drm fb's to nouveau_bo's and to get a notify handle from fifo->notify in nv30_screen.c

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
10 years agoBump version to 2.4.53 for release 2.4.53 libdrm-2.4.53
Marek Olšák [Thu, 10 Apr 2014 19:12:54 +0000 (21:12 +0200)]
Bump version to 2.4.53 for release

10 years agoradeon: sync with radeon_drm.h from kernel headers
Marek Olšák [Fri, 4 Apr 2014 17:05:01 +0000 (19:05 +0200)]
radeon: sync with radeon_drm.h from kernel headers

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
10 years agofreedreno: zero out unused field
Rob Clark [Wed, 19 Mar 2014 14:11:13 +0000 (10:11 -0400)]
freedreno: zero out unused field

Since realloc() doesn't zero-init.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agofreedreno: do not leak drmVersion
Emil Velikov [Wed, 12 Mar 2014 20:45:45 +0000 (20:45 +0000)]
freedreno: do not leak drmVersion

Cc: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agofreedreno/kgsl: don't even bother trying CREATE_FD
Rob Clark [Fri, 28 Feb 2014 15:02:59 +0000 (10:02 -0500)]
freedreno/kgsl: don't even bother trying CREATE_FD

Don't even bother trying DRM_KGSL_GEM_CREATE_FD.  It hasn't worked since
(afaict) 2.6.35 kernels.  And in some cases seems to cause some
problems.  Instead just allocate a minimum size dummy object (just for
purposes of having a handle) and then mmap the framebuffer as user-mem
(which is deprecated, but seems to still work.. and as far as I can tell
is the best option for now).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agofreedreno: fix null ptr in error path
Rob Clark [Fri, 28 Feb 2014 14:25:10 +0000 (09:25 -0500)]
freedreno: fix null ptr in error path

Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agofreedreno: simplify device creation
Rob Clark [Fri, 28 Feb 2014 14:24:39 +0000 (09:24 -0500)]
freedreno: simplify device creation

Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agoEnable libkms by default on DragonFly
François Tigeot [Mon, 17 Feb 2014 09:07:54 +0000 (10:07 +0100)]
Enable libkms by default on DragonFly

Signed-off-by: François Tigeot <ftigeot@wolfpond.org>
10 years agofreedreno: some msm-ring reset/flush fixes
Rob Clark [Wed, 19 Feb 2014 16:01:23 +0000 (11:01 -0500)]
freedreno: some msm-ring reset/flush fixes

Need to update timestamp on all ring's associated with a submit (ie.
both the binning pass and main ring).  Also, make sure nr_reloc's
in particular gets cleared if the rb is reset.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agofreedreno: fix license
Rob Clark [Fri, 31 Jan 2014 16:58:30 +0000 (11:58 -0500)]
freedreno: fix license

The userspace headers were intended to be BSD license.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agodrm: Implement drmCheckModesettingSupported() for FreeBSD
Robert Millan [Thu, 23 Jan 2014 14:46:05 +0000 (14:46 +0000)]
drm: Implement drmCheckModesettingSupported() for FreeBSD

Add the missing implementation of drmCheckModesettingSupported()
to detect KMS support on FreeBSD (and GNU/kFreeBSD).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72847
Signed-off-by: Konstantin Belousov <kib@freebsd.org>
Signed-off-by: Robert Millan <rmh@freebsd.org>
10 years agomodeprint: pretty print connector names
Lucas Stach [Fri, 17 Jan 2014 11:19:17 +0000 (12:19 +0100)]
modeprint: pretty print connector names

Use same names as the kernel, makes it easier to identify
connectors in the common case.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
10 years agoBump the version to 2.4.52 libdrm-2.4.52
Kenneth Graunke [Mon, 13 Jan 2014 23:47:15 +0000 (15:47 -0800)]
Bump the version to 2.4.52

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agointel: Create a new drm_intel_bo offset64 field.
Kenneth Graunke [Mon, 13 Jan 2014 22:14:36 +0000 (14:14 -0800)]
intel: Create a new drm_intel_bo offset64 field.

The existing 'offset' field is unfortunately typed as 'unsigned long',
which is unfortunately only 4 bytes with a 32-bit userspace.

Traditionally, the hardware has only supported 32-bit virtual addresses,
so even though the kernel uses a __u64, the value would always fit.

However, Broadwell supports 48-bit addressing.  So with a 64-bit kernel,
the card virtual address may be too large to fit in the 'offset' field.

Ideally, we would change the type of 'offset' to be a uint64_t---but
this would break the libdrm ABI.  Instead, we create a new 'offset64'
field to hold the full 64-bit value from the kernel, and store the
32-bit truncation in the existing 'offset' field, for compatibility.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agointel: Track whether a buffer is idle to avoid trips to the kernel.
Eric Anholt [Wed, 15 Jan 2014 08:38:39 +0000 (00:38 -0800)]
intel: Track whether a buffer is idle to avoid trips to the kernel.

I've seen a number of apps spending unreasonable amounts of time in
drm_intel_bo_busy during the buffer mapping process.

We can't track idleness in general, in the case of buffers shared
across processes.  But this should significantly reduce our overhead
for checking for busy on things like VBOs.

Improves (unoptimized) glamor x11perf -f8text by 0.243334% +/-
0.161498% (n=1549), which has formerly been spending about .5% of its
time hitting the kernel for drm_intel_gem_bo_busy().

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agodrm: Initialize or valgrind-clear modesetting ioctl arguments.
Eric Anholt [Sun, 29 Dec 2013 06:06:51 +0000 (22:06 -0800)]
drm: Initialize or valgrind-clear modesetting ioctl arguments.

Fixes valgrind complaints in the modesetting driver.  I tried to
follow each ioctl's pattern for whether it was initializing just the
in values, or both in and out values.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
10 years agoMark debug_print with __attribute__ ((format(__printf__, 1, 0)))
Keith Packard [Sun, 12 Jan 2014 18:32:57 +0000 (10:32 -0800)]
Mark debug_print with __attribute__ ((format(__printf__, 1, 0)))

the drmServerInfo member, debug_print, takes a printf format string
and varargs list. Tell the compiler about it.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
10 years agofreedreno: add fd_device_new_dup()
Rob Clark [Sun, 12 Jan 2014 13:27:36 +0000 (08:27 -0500)]
freedreno: add fd_device_new_dup()

There seem to be some cases (I've noticed this switching resolution in
some games, for example) where the fd can get closed() before the device
and all it's bo's are destroyed.  Which, if the drm device is opened
again and bo's are allocated with the same handles, results that when
the first pipe_screen/pipe_context is destroyed causes the first dev to
close handles for bo's allocated by the second device.

The easy solution to that is to add a mode where the fd_device creates
it's own private fd (a dup()).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agomodetest: add the possibility to select the refresh frequency for a mode
Vincent ABRIOU [Fri, 10 Jan 2014 10:02:33 +0000 (11:02 +0100)]
modetest: add the possibility to select the refresh frequency for a mode

When mode is selected we only give the name of the mode as parameter.
But sometime, two different modes have the same name but not
the same vrefresh frequency.
This patch give the possibility to select a mode by its name
and optionally by its refresh frequency.

Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agotests/kmstest: support exynos
Hyungwon Hwang [Fri, 10 Jan 2014 07:44:30 +0000 (16:44 +0900)]
tests/kmstest: support exynos

In this patch, to support exynos for KMS, Exynos KMS driver is newly added.
Also, Exynos is added to the list of kmstest supported modules.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agointel: Merge latest i915_drm.h
Ben Widawsky [Thu, 2 Jan 2014 19:36:59 +0000 (11:36 -0800)]
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>
10 years agointel: Handle malloc fails in context create
Ben Widawsky [Fri, 27 Dec 2013 00:37:00 +0000 (16:37 -0800)]
intel: Handle malloc fails in context create

The previous code would just use the potentially unallocated variable,
which is probably okay most of the time, but not very nice to the user
of the library.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agointel: squash unused variable 'bo_gem'
Ben Widawsky [Fri, 27 Dec 2013 00:30:09 +0000 (16:30 -0800)]
intel: squash unused variable 'bo_gem'

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoBump the version to 2.4.51 2.4.51 libdrm-2.4.51
Rob Clark [Wed, 8 Jan 2014 20:36:29 +0000 (15:36 -0500)]
Bump the version to 2.4.51

Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agofreedreno: allow IB to different ringbuffer
Rob Clark [Sat, 21 Dec 2013 17:11:40 +0000 (12:11 -0500)]
freedreno: allow IB to different ringbuffer

Allow IB to different ringbuffer in addition to just different part of
same ringbuffer.  In particular, we need to add bo's to the parent (ie.
one passed to flush) bo table, since the bo table applies to all the
cmd buffers in submit ioctl.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agofreedreno/kgsl: fix crash introduced w/ bo-cache
Rob Clark [Sun, 5 Jan 2014 17:19:12 +0000 (12:19 -0500)]
freedreno/kgsl: fix crash introduced w/ bo-cache

Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agoradeon: fix sumo2 pci id
Alex Deucher [Tue, 24 Dec 2013 20:19:34 +0000 (15:19 -0500)]
radeon: fix sumo2 pci id

0x9649 is sumo2, not sumo.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
10 years agoradeon: avoid possible divide by 0 in surface manager
Alex Deucher [Tue, 10 Dec 2013 17:38:26 +0000 (12:38 -0500)]
radeon: avoid possible divide by 0 in surface manager

Some users report hitting a divide by 0 with the tile split in
certain apps.  Tile_split shouldn't ever be 0 unless the surface
structure was not properly initialized.  I think there may be some
cases where mesa uses an improperly initialized surface struct,
but I haven't had time to track it down.

Bug:
https://bugs.freedesktop.org/show_bug.cgi?id=72425

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
10 years agofreedreno: add bo cache
Rob Clark [Fri, 13 Dec 2013 17:48:30 +0000 (12:48 -0500)]
freedreno: add bo cache

Workloads which create many transient buffers cause significant CPU
overhead in buffer allocation, zeroing, cache maint, and mmap setup.
By caching and re-using existing buffers, the CPU overhead drops
significantly.  See:

http://bloggingthemonkey.blogspot.com/2013/09/freedreno-update-moar-fps.html

A simple time based policy is used for purging the cache.  Once the
kernel supports it, we could use madvise style API to handle memory
pressure scenarios a bit better.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
10 years agointel/test_decode: Allow gen8 to be infered from the batch filenames
Damien Lespiau [Fri, 13 Dec 2013 12:03:10 +0000 (12:03 +0000)]
intel/test_decode: Allow gen8 to be infered from the batch filenames

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agogitignore: Ignore various generated files
Damien Lespiau [Fri, 13 Dec 2013 17:15:14 +0000 (17:15 +0000)]
gitignore: Ignore various generated files

- *.log/*.trs are generated by make check
- TAGS are generated by make tags
- build-aux, config.h.in~ by autoconf
- *.sw? are temporary files create by vim
- name_from_fd wasn't ignored yet for some reason

v2: Ignore *~ as well (Daniel Vetter)

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agoBump the version to 2.4.50 2.4.50 libdrm-2.4.50
Marek Olšák [Tue, 3 Dec 2013 18:50:22 +0000 (19:50 +0100)]
Bump the version to 2.4.50

10 years ago intel: Track known prime buffers for re-use
Keith Packard [Fri, 22 Nov 2013 13:31:01 +0000 (05:31 -0800)]
 intel: Track known prime buffers for re-use

If the application sends us a file descriptor pointing at a prime
buffer that we've already got, we have to re-use the same bo_gem
structure or chaos will result.

Track the set of all known prime objects and look to see if the kernel
has returned one of those for a new file descriptor.

Also checks for prime buffers in the flink case.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoradeon: Update unaligned offset for 2D->1D tiling transition on SI
Michel Dänzer [Tue, 26 Nov 2013 09:16:03 +0000 (18:16 +0900)]
radeon: Update unaligned offset for 2D->1D tiling transition on SI

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71983

Tested-by: Arek Ruśniak <arek.rusi@gmail.com>
10 years agoBump the version for release 2.4.49 libdrm-2.4.49
Marek Olšák [Sat, 23 Nov 2013 00:27:57 +0000 (01:27 +0100)]
Bump the version for release

10 years agoradeon: handle P16 pipe configs for Hawaii
Marek Olšák [Fri, 22 Nov 2013 23:34:45 +0000 (00:34 +0100)]
radeon: handle P16 pipe configs for Hawaii

10 years agoradeon: don't overallocate stencil by 4 on SI and CIK
Michel Dänzer [Mon, 18 Nov 2013 10:40:08 +0000 (11:40 +0100)]
radeon: don't overallocate stencil by 4 on SI and CIK

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
10 years agoradeon: implement 2D tiling for CIK
Marek Olšák [Fri, 22 Nov 2013 22:31:13 +0000 (23:31 +0100)]
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>
10 years agoradeon: fix mipmap level 0 and 1 alignment for SI and CIK
Michel Dänzer [Thu, 14 Nov 2013 15:40:30 +0000 (16:40 +0100)]
radeon: fix mipmap level 0 and 1 alignment for SI and CIK

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>
10 years agointel: Use memset instead of VG_CLEAR
Ian Romanick [Wed, 20 Nov 2013 16:32:14 +0000 (08:32 -0800)]
intel: Use memset instead of VG_CLEAR

The ioctl expects that certain fields will be zeroed, so we should allow
the helper function to actually work in non-Valgrind builds.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reported-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolibdrm/mode: Update the encoder and connector defines
Thomas Hellstrom [Tue, 19 Nov 2013 06:50:11 +0000 (07:50 +0100)]
libdrm/mode: Update the encoder and connector defines

Update the defines to match the kernel drm_mode.h

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
10 years agolibdrm: bump to 2.4.48 2.4.48 libdrm-2.4.48
Ian Romanick [Sat, 16 Nov 2013 02:01:08 +0000 (18:01 -0800)]
libdrm: bump to 2.4.48

10 years agointel: Add support for GPU reset status query ioctl
Ian Romanick [Fri, 15 Nov 2013 18:24:43 +0000 (10:24 -0800)]
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>
10 years agoradeon: add hawaii pci ids
Alex Deucher [Tue, 24 Sep 2013 15:30:19 +0000 (11:30 -0400)]
radeon: add hawaii pci ids

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
10 years agoradeon: add hawaii chip family
Alex Deucher [Tue, 24 Sep 2013 15:27:11 +0000 (11:27 -0400)]
radeon: add hawaii chip family

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
10 years agoRevert "intel: Add support for GPU reset status query ioctl"
Dave Airlie [Fri, 8 Nov 2013 06:40:18 +0000 (16:40 +1000)]
Revert "intel: Add support for GPU reset status query ioctl"

This reverts commit 6335e1d28c422050024bcf4100c4fb3a5bac2afb.

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.

10 years agointel: Add support for GPU reset status query ioctl
Ian Romanick [Mon, 10 Sep 2012 11:15:02 +0000 (14:15 +0300)]
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>
10 years agointel/bdw: Update MI_BATCH_BUFFER_START for aub dumps
Damien Lespiau [Fri, 15 Feb 2013 16:44:05 +0000 (16:44 +0000)]
intel/bdw: Update MI_BATCH_BUFFER_START for aub dumps

The command now takes a 48bits address and is thus 1 dword longer.

v2 (Ben): commit message: s/byte/dword (Eric)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agointel/bdw/aub: Update AUB trace block writes for 48-bit addressing.
Kenneth Graunke [Fri, 15 Feb 2013 17:29:46 +0000 (09:29 -0800)]
intel/bdw/aub: Update AUB trace block writes for 48-bit addressing.

Since our aub file dumping's GTT handling is totally fake, we always put
everything in the low 4GB anyway and shouldn't ever need to set
AddressHigh to anything other than 0.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
[ben: slight commit message change]
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agointel/bdw: Add gen8 to the decode init
Damien Lespiau [Wed, 13 Feb 2013 16:09:34 +0000 (16:09 +0000)]
intel/bdw: Add gen8 to the decode init

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agointel/bdw: Handle gen8 bufmgr_init
Ben Widawsky [Wed, 13 Feb 2013 16:09:33 +0000 (16:09 +0000)]
intel/bdw: Handle gen8 bufmgr_init

[bwidawsk: Added Damien's SOB]
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agointel/bdw: Add broadwell chipset IDs
Ben Widawsky [Tue, 4 Dec 2012 21:56:14 +0000 (13:56 -0800)]
intel/bdw: Add broadwell chipset IDs

v2: Rename s/<SECRET>/IRIS/

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agonouveau: prevent undefined behavior in nouveau_pushbuf_reloc with gcc-4.8
Maarten Lankhorst [Thu, 7 Nov 2013 12:30:19 +0000 (13:30 +0100)]
nouveau: prevent undefined behavior in nouveau_pushbuf_reloc with gcc-4.8

Reported-by: ronald645@gmail.com
Bisected-by (gcc): Andreas Radke <a.radke@arcor.de>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71116
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
10 years agoAdd DRM_MODE_PAGE_FLIP_ASYNC define
Keith Packard [Sun, 21 Jul 2013 21:24:35 +0000 (14:24 -0700)]
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>
10 years agointel: Add MI_LOAD_REGISTER_MEM to intel_decode.c.
Kenneth Graunke [Wed, 30 Oct 2013 03:41:16 +0000 (20:41 -0700)]
intel: Add MI_LOAD_REGISTER_MEM to intel_decode.c.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com>
10 years agointel: Add the Gen6+ version of MI_REPORT_PERF_COUNT to intel_decode.c.
Kenneth Graunke [Wed, 30 Oct 2013 02:30:45 +0000 (19:30 -0700)]
intel: Add the Gen6+ version of MI_REPORT_PERF_COUNT to intel_decode.c.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com>
10 years agolibdrm: bump to 2.4.47 2.4.47 libdrm-2.4.47
Ben Widawsky [Fri, 11 Oct 2013 16:47:45 +0000 (09:47 -0700)]
libdrm: bump to 2.4.47

10 years agointel: Set bo size from lseek if kernel supports it
Kristian Høgsberg [Thu, 10 Oct 2013 21:40:58 +0000 (14:40 -0700)]
intel: Set bo size from lseek if kernel supports it

The various create and open functions set the buffer size, but
drm_intel_bo_gem_create_from_prime() is an exception.  In the 3.12 kernel
we can now use lseek on the prime fd to determine the size of the bo.
Use that and override the userprovided size.  If the kernel doesn't
support this, we get an error and fall back to the user provided size.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
10 years agodrm: Introduce a drmSetClientCap() wrapper
Damien Lespiau [Tue, 3 Sep 2013 14:34:41 +0000 (15:34 +0100)]
drm: Introduce a drmSetClientCap() wrapper

That wraps around the new DRM_SET_CLIENT_CAP ioctl.

v2: SET_CAP -> SET_CLIENT_CAP renaming

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agodrm: Sync the DRM_SET_CLIENT_CAP ioctl definition
Damien Lespiau [Tue, 3 Sep 2013 14:31:49 +0000 (15:31 +0100)]
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>
10 years agodrm: Synchronize the stereo 3D mode flags from the kernel headers
Damien Lespiau [Fri, 23 Aug 2013 14:57:40 +0000 (15:57 +0100)]
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>