android-sdk/libdrm.git
5 years agoAdd new DRM_MODE_CONNECTOR and _ENCODER defines master
Adam Cheney [Tue, 16 Dec 2014 17:22:38 +0000 (12:22 -0500)]
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>
6 years agodrm: Initialize or valgrind-clear modesetting ioctl arguments.
Eric Anholt [Sat, 15 Nov 2014 06:12:47 +0000 (00:12 -0600)]
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>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: srinivas pulukuru <srinivas.pulukuru@ti.com>
6 years agolibdrm/mode: Update the encoder and connector defines
Thomas Hellstrom [Sat, 15 Nov 2014 06:11:10 +0000 (00:11 -0600)]
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>
Signed-off-by: srinivas pulukuru <srinivas.pulukuru@ti.com>
6 years agodrm: Introduce a drmSetClientCap() wrapper
Damien Lespiau [Sat, 15 Nov 2014 06:09:24 +0000 (00:09 -0600)]
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>
Signed-off-by: srinivas pulukuru <srinivas.pulukuru@ti.com>
6 years agodrm: Sync the DRM_SET_CLIENT_CAP ioctl definition
srinivas pulukuru [Fri, 30 Jan 2015 05:38:13 +0000 (23:38 -0600)]
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>
Signed-off-by: srinivas pulukuru <srinivas.pulukuru@ti.com>
6 years agodrm: Synchronize the stereo 3D mode flags from the kernel headers
Damien Lespiau [Sat, 15 Nov 2014 06:02:46 +0000 (00:02 -0600)]
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>
Signed-off-by: srinivas pulukuru <srinivas.pulukuru@ti.com>
6 years agolibdrm: Make some drm headers compatible with gcc -std=c89 -pedantic
Daniel Kurtz [Sat, 15 Nov 2014 05:59:58 +0000 (23:59 -0600)]
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>
Signed-off-by: srinivas pulukuru <srinivas.pulukuru@ti.com>
6 years agolibdrm: add missing DRM_CAP_TIMESTAMP_MONOTONIC
Imre Deak [Sat, 15 Nov 2014 05:58:21 +0000 (23:58 -0600)]
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>
Signed-off-by: srinivas pulukuru <srinivas.pulukuru@ti.com>
6 years agodrm: add hotspot cursor interface support.
Dave Airlie [Sat, 15 Nov 2014 05:56:35 +0000 (23:56 -0600)]
drm: add hotspot cursor interface support.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: srinivas pulukuru <srinivas.pulukuru@ti.com>
6 years agokms: Return a negative error code in kms_bo_create()
Laurent Pinchart [Sat, 15 Nov 2014 05:53:40 +0000 (23:53 -0600)]
kms: Return a negative error code in kms_bo_create()

The function returns returns 0 on success or a negative value in case of an
error, except when given invalid attributes in which case it returns the
positive EINVAL value. Replace that with -EINVAL to allow the caller to detect
errors with a < 0 check.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jakob Bornecrantz <wallbraker@gmail.com>
Signed-off-by: srinivas pulukuru <srinivas.pulukuru@ti.com>
6 years agodrm: Fix error message in drmWaitVBlank
Daniel Kurtz [Sat, 15 Nov 2014 05:51:18 +0000 (23:51 -0600)]
drm: Fix error message in drmWaitVBlank

If clock_gettime did fail, it would return -1 and set errno.
What we really want to strerror() is the errno.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: srinivas pulukuru <srinivas.pulukuru@ti.com>
6 years agomodetest: add support for modetest
srinivas pulukuru [Sat, 15 Nov 2014 05:35:52 +0000 (23:35 -0600)]
modetest: add support for modetest

added support for scaling, window coordinates,
refresh rate for mode setting
Added other options such as
Query options:
        -c      list connectors
        -e      list encoders
        -f      list framebuffers
        -p      list CRTCs and planes (pipes)

Test options:
        -P <crtc_id>:<w>x<h>[+<x>+<y>][*<scale>][@<format>]     set a plane
        -s <connector_id>[,<connector_id>][@<crtc_id>]:<mode>[-<vrefresh>][@<format>]   set a mode
        -v test vsynced page flipping
        -w <obj_id>:<prop_name>:<value> set property

Generic options:
        -d      drop master after mode set
        -M module       use the given driver
        -D device       use the given device

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: srinivas pulukuru <srinivas.pulukuru@ti.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
6 years agoomap: Add DRM_RDWR flag to dmabuf export
Hemant Hariyani [Thu, 4 Dec 2014 06:27:35 +0000 (00:27 -0600)]
omap: Add DRM_RDWR flag to dmabuf export

Allows mmap on dmabuf fd with MAP_SHARED and PROT_WRITE.

Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
6 years agolibdrm: Add define for DRM_RDWR
Hemant Hariyani [Thu, 4 Dec 2014 00:14:20 +0000 (18:14 -0600)]
libdrm: Add define for DRM_RDWR

mmap requires O_RDWR to be set if MAP_SHARED is requested
with PROT_WRITE. Adding DRM_RDWR (defined as O_RDWR) as a
valid flag that can be passed to DRM_IOCTL_PRIME_HANDLE_TO_FD
for buffers that need required mapping.

Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
6 years agoOMAPKMSLIB: Fixed the KMS Lib alloc/free/map
Tony Zlatinski [Wed, 19 Sep 2012 05:26:29 +0000 (00:26 -0500)]
OMAPKMSLIB: Fixed the KMS Lib alloc/free/map

6 years agoDRMKMS: fix the makefile to omapdrm
Tony Zlatinski [Tue, 21 Aug 2012 06:54:54 +0000 (01:54 -0500)]
DRMKMS: fix the makefile to omapdrm

6 years agoDRM-KMS: Android support of libdrm
Tony Zlatinski [Sat, 18 Aug 2012 03:59:22 +0000 (22:59 -0500)]
DRM-KMS: Android support of libdrm

7 years agoDEBIAN: debianization
Nikhil Devshatwar [Tue, 21 May 2013 06:55:36 +0000 (12:25 +0530)]
DEBIAN: debianization

7 years agoAdd omapdrm module to kmstest and vbltest
Vincent Stehlé [Thu, 10 May 2012 08:24:40 +0000 (10:24 +0200)]
Add omapdrm module to kmstest and vbltest

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
7 years agogitignore
Vincent Stehlé [Wed, 18 Apr 2012 07:29:48 +0000 (09:29 +0200)]
gitignore

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
7 years agointel: add more VLV PCI IDs
Jesse Barnes [Sat, 2 Feb 2013 10:10:24 +0000 (11:10 +0100)]
intel: add more VLV PCI IDs

7 years agoman: Fix typo and use $() for make expressions
Thierry Reding [Fri, 18 Jan 2013 12:22:01 +0000 (13:22 +0100)]
man: Fix typo and use $() for make expressions

Due to the typo, none of the .xml files would end up in the release
tarball and cause make distcheck as well as builds from the tarball to
fail.

Using $() isn't strictly necessary but other variables and expressions
use that variant already so it makes the usage consistent.

Reviewed-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
7 years agoradeon: Fix 1D tiling layout on SI.
Michel Dänzer [Thu, 17 Jan 2013 18:03:42 +0000 (19:03 +0100)]
radeon: Fix 1D tiling layout on SI.

Very similar to Evergreen, but slightly different rules for tile / slice
alignment. Fortunately, these map quite naturally onto the previous fixes for
linear aligned layout on SI.

2D tiling still needs more work here and possibly in the kernel.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
7 years agoman: fix manpage build instructions
David Herrmann [Wed, 16 Jan 2013 18:35:25 +0000 (19:35 +0100)]
man: fix manpage build instructions

This fixes all the out-of-tree build-failures with manpages and uses a
.man_fixup file to avoid overriding man-pages on every build.

Manpages are only built if xsltproc is found and the stylesheets are
available locally. You can disable building manpages with
--disable-manpages so the quite expensive xsltproc procedure can be
skipped.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
7 years agonouveau: use @PACKAGE_VERSION@ in libdrm_nouveau.pc
Maarten Lankhorst [Wed, 16 Jan 2013 13:29:14 +0000 (14:29 +0100)]
nouveau: use @PACKAGE_VERSION@ in libdrm_nouveau.pc

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
7 years agoomap: release lock also on error paths
Vincent Penquerc'h [Tue, 9 Oct 2012 13:48:34 +0000 (14:48 +0100)]
omap: release lock also on error paths

Signed-off-by: Rob Clark <rob@ti.com>
7 years agolibdrm 2.4.37 nouveau 1
Nikhil Devshatwar [Fri, 17 May 2013 09:51:30 +0000 (15:21 +0530)]
libdrm 2.4.37 nouveau 1

7 years agobuild against librt
Nikhil Devshatwar [Fri, 17 May 2013 09:51:30 +0000 (15:21 +0530)]
build against librt

7 years agodefault perms
Nikhil Devshatwar [Fri, 17 May 2013 09:51:29 +0000 (15:21 +0530)]
default perms

8 years agoconfigure.ac: bump version to 2.4.41 for release
Maarten Lankhorst [Wed, 16 Jan 2013 12:06:52 +0000 (13:06 +0100)]
configure.ac: bump version to 2.4.41 for release

8 years agonouveau: expose channel engine selection on kepler chipsets
Ben Skeggs [Fri, 23 Nov 2012 02:40:30 +0000 (12:40 +1000)]
nouveau: expose channel engine selection on kepler chipsets

v2: Take Maarten Lankhorst's suggestion of nesting the struct to prevent
    sizeof() issues due to padding on older revisions.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
8 years agolibdrm_nouveau.pc: don't include I${includedir}/nouveau
Marcin Slusarz [Sun, 16 Dec 2012 18:28:24 +0000 (19:28 +0100)]
libdrm_nouveau.pc: don't include I${includedir}/nouveau

Nouveau headers are installed in I${includedir}/libdrm.

8 years agointel: Remove the fence count contributions when clearing relocs
Chris Wilson [Fri, 11 Jan 2013 00:55:12 +0000 (00:55 +0000)]
intel: Remove the fence count contributions when clearing relocs

As we clear the relocs from the bo, we also need to clear the
contribution of the reloc_target_bo from the fence count. Otherwise they
are leaked and prevent any further relocations being added to the bo.

8 years agoman: disable man page building until David saves us all
Jesse Barnes [Thu, 10 Jan 2013 01:28:41 +0000 (17:28 -0800)]
man: disable man page building until David saves us all

I must have botched something in the push of the xml switchover, since I
now get errors when building the pages and aliases.  Just disable for
now.

8 years agoman: add drm-memory overview page
David Herrmann [Fri, 28 Sep 2012 21:44:22 +0000 (23:44 +0200)]
man: add drm-memory overview page

This adds an overview page that describes Dumb-Buffers, TTM and GEM. It
does not describe chipset-specific features. You should do that in the
driver-manpages.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
8 years agoman: add drm-kms overview page
David Herrmann [Fri, 28 Sep 2012 21:44:21 +0000 (23:44 +0200)]
man: add drm-kms overview page

This is an overview page for KMS. It is again targeted at novice users
that need redirection to the correct function man-pages.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
8 years agoman: add drm.7 overview page
David Herrmann [Fri, 28 Sep 2012 21:44:20 +0000 (23:44 +0200)]
man: add drm.7 overview page

The drm.xml file compiles to drm.7 and is meant as a global overview page
for libdrm. It is targeted to new users of libdrm and redirects to all
other main man-pages.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
8 years agoman: convert manpages to XML instead of plain troff
David Herrmann [Fri, 28 Sep 2012 21:44:19 +0000 (23:44 +0200)]
man: convert manpages to XML instead of plain troff

If we want to use the manpages in external documentation other than normal
manpages, we should rather use XML. Furthermore, almost no-one knows troff
today, anyway, and XML allows others to easily add more pages without
having to learn troff.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
8 years agonouveau: disallow pushbuf BOs in multiple memory types
Ben Skeggs [Mon, 7 Jan 2013 03:07:13 +0000 (13:07 +1000)]
nouveau: disallow pushbuf BOs in multiple memory types

Under certain circumstances it's possible for libdrm to decide to move
a GART|VRAM pushbuf to be VRAM-only.  This causes the kernel to reject
the command submission on GF8 and up, due to a stricter policy where
buffers are only allowed to move to memory types that were specified
at creation time.

The simplest fix for this is to force the creation-time memory type for
the lifetime of the push buffer.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agolibkms: return -EINVAL on fstat error
Maxime Villard [Wed, 2 Jan 2013 15:57:07 +0000 (10:57 -0500)]
libkms: return -EINVAL on fstat error

On error fstat return -1, instead return -EINVAL to caller

Signed-off-by: Maxime Villard <rustyBSD@gmx.fr>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
8 years agolibkms: fix memory leak in error path
Maxime Villard [Wed, 2 Jan 2013 15:55:50 +0000 (10:55 -0500)]
libkms: fix memory leak in error path

Signed-off-by: Maxime Villard <rustyBSD@gmx.fr>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
8 years agodrm/radeon: track global bo name and always return the same
Jerome Glisse [Tue, 27 Nov 2012 18:59:11 +0000 (13:59 -0500)]
drm/radeon: track global bo name and always return the same

To avoid kernel rejecting cs if we return different global name
for same bo keep track of global name and always return the same.
Seems to fix issue with suspend/resume failing and repeatly printing
following message :
[drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation -35!

There might still be way for a rogue program to trigger this issue.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
8 years agoradeon: add new SI pci id
Alex Deucher [Wed, 21 Nov 2012 23:45:14 +0000 (18:45 -0500)]
radeon: add new SI pci id

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
8 years agointel: Fix missing ETIME on BSD operating systems
David Shao [Sat, 10 Nov 2012 05:24:56 +0000 (00:24 -0500)]
intel: Fix missing ETIME on BSD operating systems

Originally posted to Free Desktop bug #52549 by David Shao.
Resolves Gentoo Bug #433403.
Commit message by Richard Yao.

Reviewed-by: Richard Yao <ryao@gentoo.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
References: https://bugs.freedesktop.org/show_bug.cgi?id=52549

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
8 years agoconfigure.ac: bump version to 2.4.40 for release
Marek Olšák [Tue, 6 Nov 2012 00:23:53 +0000 (01:23 +0100)]
configure.ac: bump version to 2.4.40 for release

8 years agofix make distcheck
Dave Airlie [Mon, 5 Nov 2012 22:21:42 +0000 (22:21 +0000)]
fix make distcheck

typo,

Reported-by: mareko on irc
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agoradeon: fix tile_split of 128-bit surface formats with 8x MSAA
Marek Olšák [Tue, 16 Oct 2012 00:08:02 +0000 (02:08 +0200)]
radeon: fix tile_split of 128-bit surface formats with 8x MSAA

The calculation led to the number 8192, which is too high.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoradeon: fix unused-function warning
Andreas Boll [Tue, 28 Aug 2012 10:49:45 +0000 (12:49 +0200)]
radeon: fix unused-function warning

radeon_cs_gem.c:333:13: warning: 'cs_gem_dump_bof' defined but
not used [-Wunused-function]

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoradeon: add some new SI pci ids
Alex Deucher [Tue, 16 Oct 2012 16:58:39 +0000 (12:58 -0400)]
radeon: add some new SI pci ids

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoinitialize width/height fields in drmModeCrtc
Rob Clark [Sun, 14 Oct 2012 21:55:32 +0000 (16:55 -0500)]
initialize width/height fields in drmModeCrtc

If we have valid timings, we can at least set width/height to
*something*, which is I think at least less confusing than always
seeing width/height of zero.  At least modeprint and modetest
seem to expect width/height to mean something.

Signed-off-by: Rob Clark <rob@ti.com>
8 years agoupdate gitignore
Rob Clark [Tue, 9 Oct 2012 14:48:56 +0000 (09:48 -0500)]
update gitignore

Signed-off-by: Rob Clark <rob@ti.com>
8 years agoomap: release lock also on error paths
Vincent Penquerc'h [Tue, 9 Oct 2012 13:48:34 +0000 (14:48 +0100)]
omap: release lock also on error paths

Signed-off-by: Rob Clark <rob@ti.com>
8 years agoconfigure.ac: Allow forcible disabling of Cairo support
Daniel Stone [Thu, 4 Oct 2012 01:21:57 +0000 (01:21 +0000)]
configure.ac: Allow forcible disabling of Cairo support

We don't want to build libdrm tests with Cairo support under Poky, since
they're never used and also cause a build loop from libdrm -> cairo ->
mesa-dri -> libdrm.

To avoid variance in build results, introduce a --disable-cairo-tests
switch.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agointel: Silence a trivial compiler warning
Chris Wilson [Sun, 7 Oct 2012 09:08:46 +0000 (10:08 +0100)]
intel: Silence a trivial compiler warning

intel_bufmgr_gem.c: In function 'drm_intel_bo_gem_export_to_prime':
intel_bufmgr_gem.c:2477:6: warning: unused variable 'ret' [-Wunused-variable]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agointel: Correct the word decoding for gen2 3DSTATE_LOAD_STATE_IMMEDIATE_1
Chris Wilson [Sun, 7 Oct 2012 09:07:23 +0000 (10:07 +0100)]
intel: Correct the word decoding for gen2 3DSTATE_LOAD_STATE_IMMEDIATE_1

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agointel: Fix "properly test for HAS_LLC"
Chris Wilson [Sun, 7 Oct 2012 09:05:19 +0000 (10:05 +0100)]
intel: Fix "properly test for HAS_LLC"

commit 92fd0ce4f659d7b0680543e9e5b96a3c7737a5f3
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Aug 31 11:16:53 2012 +0200

    intel: properly test for HAS_LLC

missed slightly and in effect had no effect on the outcome of checking
whether the kernel/chipset supported LLC.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
8 years agoradeon: fix stencil miptree allocation of combined ZS buffers on EG and SI
Marek Olšák [Sun, 30 Sep 2012 17:20:04 +0000 (19:20 +0200)]
radeon: fix stencil miptree allocation of combined ZS buffers on EG and SI

This allows texturing with depth-stencil buffers directly without the copy
to CB. The separate miptree description for stencil is added, because
the stencil mipmap offsets are not really depth offsets/4 (at least
for the texture units).

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoradeon: don't force stencil tile split to 0
Marek Olšák [Sun, 30 Sep 2012 17:19:13 +0000 (19:19 +0200)]
radeon: don't force stencil tile split to 0

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoradeon: don't take the stencil-specific codepath for buffers without stencil
Marek Olšák [Sat, 29 Sep 2012 13:10:33 +0000 (15:10 +0200)]
radeon: don't take the stencil-specific codepath for buffers without stencil

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agolibdrm: man page infrastructure and a few sample man pages
Jesse Barnes [Thu, 6 Sep 2012 23:16:50 +0000 (16:16 -0700)]
libdrm: man page infrastructure and a few sample man pages

8 years agointel: Mark bo's exported to prime as not reusable
Kristian Høgsberg [Fri, 14 Sep 2012 20:35:19 +0000 (16:35 -0400)]
intel: Mark bo's exported to prime as not reusable

It's the same situation as flink and we need take the same precautions.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
8 years agointel: add support for ValleyView
Jesse Barnes [Sun, 18 Mar 2012 21:51:18 +0000 (16:51 -0500)]
intel: add support for ValleyView

Just some PCI ID stuff to enable the right features.

8 years agolibkms: link against libdrm
Marcin Slusarz [Fri, 7 Sep 2012 22:49:38 +0000 (00:49 +0200)]
libkms: link against libdrm

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
8 years agoradeon: Sampling pitch for non-mipmaps seems padded to slice alignment on SI.
Michel Dänzer [Wed, 5 Sep 2012 16:44:45 +0000 (18:44 +0200)]
radeon: Sampling pitch for non-mipmaps seems padded to slice alignment on SI.

Another corner case that isn't well-explained yet.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agoradeon: Memory footprint of SI mipmap base level is padded to powers of two.
Michel Dänzer [Tue, 4 Sep 2012 16:53:55 +0000 (18:53 +0200)]
radeon: Memory footprint of SI mipmap base level is padded to powers of two.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agoradeon: Fix layout of linear aligned mipmaps on SI.
Michel Dänzer [Fri, 31 Aug 2012 17:29:33 +0000 (19:29 +0200)]
radeon: Fix layout of linear aligned mipmaps on SI.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agointel: properly test for HAS_LLC
Daniel Vetter [Fri, 31 Aug 2012 09:16:53 +0000 (11:16 +0200)]
intel: properly test for HAS_LLC

If the kernel supports the test, we need to check the param.
Copy&pasta from the above checks that only look at the return value.
Interesting how much one can get such a simple interface wrong.

Issue created in

commit 151cdcfe685ee280a4344dfc40e6087d74a5590f
Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
Date:   Tue Jan 17 15:20:19 2012 -0200

    intel: query for LLC support

Patch even claims to have fixed this in v2, but is actually unchanged
from v1.

Reported-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agovmwgfx: No longer experimental
Jakob Bornecrantz [Mon, 13 Aug 2012 11:35:07 +0000 (13:35 +0200)]
vmwgfx: No longer experimental

And hasn't been in a long while.

Reviewed-by: Zack Rusin <zackr@vmware.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
8 years agoconfigure: bump version for 2.4.39 release
Marek Olšák [Fri, 24 Aug 2012 15:03:13 +0000 (17:03 +0200)]
configure: bump version for 2.4.39 release

8 years agoradeon: align r600 msaa buffers to a multiple of macrotile size * num samples
Marek Olšák [Mon, 20 Aug 2012 15:15:15 +0000 (17:15 +0200)]
radeon: align r600 msaa buffers to a multiple of macrotile size * num samples

I am not sure whether this is needed, but better be safe than sorry.

8 years agoradeon: fix allocation of MSAA surfaces on r600-r700
Marek Olšák [Sun, 19 Aug 2012 01:54:34 +0000 (03:54 +0200)]
radeon: fix allocation of MSAA surfaces on r600-r700

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
8 years agoomap: include omap_drm.h independently
Víctor Manuel Jáquez Leal [Thu, 9 Aug 2012 11:34:54 +0000 (13:34 +0200)]
omap: include omap_drm.h independently

omap_drm.h uses data type defined in stdint.h, but that header was
not included.

omap_drm.h includes drm.h as a local file when it is part of the
compiler c flags.

This two issues are fixed. New code can include omap_drm.h alone.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Rob Clark <rob@ti.com>
8 years agoradeon: add prime import/export support
Dave Airlie [Tue, 12 Jun 2012 16:31:12 +0000 (17:31 +0100)]
radeon: add prime import/export support

this adds radeon version of the prime import/export support.

Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agointel: Use VG_CLEAR on the context destroy ioctl as well.
Kenneth Graunke [Sun, 12 Aug 2012 20:33:05 +0000 (13:33 -0700)]
intel: Use VG_CLEAR on the context destroy ioctl as well.

Otherwise pad appears uninitialized and valgrind grumbles.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
8 years agotests/modetest: Add a forgotten return, needed for opensuse buildservice
Tobias Klausmann [Sat, 11 Aug 2012 22:00:40 +0000 (00:00 +0200)]
tests/modetest: Add a forgotten return, needed for opensuse buildservice

Signed-off-by: Marek Olšák <maraeo@gmail.com>
8 years agoconfigure: bump version for 2.4.38 release
Marek Olšák [Sat, 11 Aug 2012 18:05:24 +0000 (20:05 +0200)]
configure: bump version for 2.4.38 release

8 years agotests/modetest: fix distcheck
Marek Olšák [Sat, 11 Aug 2012 18:02:03 +0000 (20:02 +0200)]
tests/modetest: fix distcheck

8 years agointel: Add a function for the new register read ioctl.
Eric Anholt [Wed, 1 Aug 2012 23:43:16 +0000 (16:43 -0700)]
intel: Add a function for the new register read ioctl.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
8 years agointel: Import updated i915_drm.h.
Eric Anholt [Wed, 1 Aug 2012 23:38:19 +0000 (16:38 -0700)]
intel: Import updated i915_drm.h.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
8 years agoDrop "-Wunsafe-loop-optimizations".
Eric Anholt [Thu, 2 Aug 2012 18:25:57 +0000 (11:25 -0700)]
Drop "-Wunsafe-loop-optimizations".

It warns about totally sensible things done in intel_decode.c.  I've
never seen this warn do anything useful, and apparently I was the one
to introduce it when I added the giant pile of warning flags back in
2008.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
8 years agoradeon: tweak TILE_SPLIT for MSAA surfaces
Marek Olšák [Tue, 7 Aug 2012 21:38:19 +0000 (23:38 +0200)]
radeon: tweak TILE_SPLIT for MSAA surfaces

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
8 years agoradeon: force 2D tiling for MSAA surfaces
Marek Olšák [Tue, 7 Aug 2012 20:50:39 +0000 (22:50 +0200)]
radeon: force 2D tiling for MSAA surfaces

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
8 years agoradeon: optimize allocation for depth w/o stencil and stencil w/o depth on EG
Marek Olšák [Sun, 29 Jul 2012 13:20:15 +0000 (15:20 +0200)]
radeon: optimize allocation for depth w/o stencil and stencil w/o depth on EG

If we don't need stencil, don't allocate it.
If we need only stencil (like PIPE_FORMAT_S8_UINT), don't allocate depth.

v2: actually do it correctly

Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agoradeon: simplify ZS buffer checking on r600
Marek Olšák [Sun, 29 Jul 2012 12:10:07 +0000 (14:10 +0200)]
radeon: simplify ZS buffer checking on r600

Setting those flags has no effect anywhere else.

Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agointel: add more Haswell PCI IDs
Paulo Zanoni [Mon, 6 Aug 2012 17:55:23 +0000 (14:55 -0300)]
intel: add more Haswell PCI IDs

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
8 years agointel: Bail gracefully if we encounter an unknown Intel device
Chris Wilson [Wed, 25 Jul 2012 15:28:59 +0000 (16:28 +0100)]
intel: Bail gracefully if we encounter an unknown Intel device

Otherwise we end up with X hitting a fail-loop as the embedded libGL
stacks asserts whilst initialising.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agoradeon: add some new SI pci ids
Alex Deucher [Mon, 6 Aug 2012 14:32:19 +0000 (10:32 -0400)]
radeon: add some new SI pci ids

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoradeon: add some missing evergreen pci ids
Alex Deucher [Mon, 6 Aug 2012 14:29:24 +0000 (10:29 -0400)]
radeon: add some missing evergreen pci ids

Noticed by: Harald van Dijk <fdo@gigawatt.nl>

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=53124

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agointel: Quiet valgrind warnings in context creation.
Eric Anholt [Wed, 18 Jul 2012 20:45:14 +0000 (13:45 -0700)]
intel: Quiet valgrind warnings in context creation.

8 years agointel: Remove two unused variables
Damien Lespiau [Thu, 26 Jul 2012 16:50:09 +0000 (17:50 +0100)]
intel: Remove two unused variables

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
8 years agomodetest: fix uninitialized fourcc
Rob Clark [Mon, 23 Jul 2012 16:35:06 +0000 (11:35 -0500)]
modetest: fix uninitialized fourcc

If color format for CRTC layer is not specified on commandline, then
c->fourcc is unintialized resulting in addfb call failing.

Signed-off-by: Rob Clark <rob@ti.com>
8 years agomodeset: Split buffer allocation to a separate file
Laurent Pinchart [Fri, 20 Jul 2012 14:37:00 +0000 (16:37 +0200)]
modeset: Split buffer allocation to a separate file

As the modeset test application is often referred to as an example of
the KMS API usage, move test pattern generation and buffer allocation to
a separate file to keep it simple and clear.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agomodetest: Make frame buffer format configurable on the command line
Laurent Pinchart [Fri, 20 Jul 2012 12:50:48 +0000 (14:50 +0200)]
modetest: Make frame buffer format configurable on the command line

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agomodetest: Move connector and plane parsing to separate functions
Laurent Pinchart [Fri, 20 Jul 2012 12:50:47 +0000 (14:50 +0200)]
modetest: Move connector and plane parsing to separate functions

This will make it easier to add additional parameters to the connector
and plane arguments.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agomodetest: Add test pattern support for missing RGB formats
Laurent Pinchart [Fri, 20 Jul 2012 12:50:46 +0000 (14:50 +0200)]
modetest: Add test pattern support for missing RGB formats

Implement tiles and SMPTE test pattern generation for the RGB565,
BGR888, RGB888, ARGB8888, BGRA8888 and BGRX8888 formats.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agomodetest: Add test pattern support for missing planar YUV formats
Laurent Pinchart [Fri, 20 Jul 2012 12:50:45 +0000 (14:50 +0200)]
modetest: Add test pattern support for missing planar YUV formats

Implement tiles and SMPTE test pattern generation for the NV12, NV21,
NV16 and NV61 formats.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agomodetest: Add test pattern support for missing packed YUV formats
Laurent Pinchart [Fri, 20 Jul 2012 12:50:44 +0000 (14:50 +0200)]
modetest: Add test pattern support for missing packed YUV formats

Implement tiles and SMPTE test pattern generation for the UYVY, VYUY and
YVYU formats.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agomodetest: Add SMPTE test pattern
Laurent Pinchart [Fri, 20 Jul 2012 12:50:42 +0000 (14:50 +0200)]
modetest: Add SMPTE test pattern

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agomodetest: Unify buffer allocation
Laurent Pinchart [Fri, 20 Jul 2012 12:50:41 +0000 (14:50 +0200)]
modetest: Unify buffer allocation

Merge the create_test_buffer() and create_grey_buffer() functions into a
single buffer allocation function that takes the pixel format and fill
pattern as parameters.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agointel: fix build error
Rob Clark [Fri, 20 Jul 2012 15:26:11 +0000 (10:26 -0500)]
intel: fix build error

  CCLD   test_decode
./.libs/libdrm_intel.so: undefined reference to `drmPrimeHandleToFD'
./.libs/libdrm_intel.so: undefined reference to `drmPrimeFDToHandle'
collect2: ld returned 1 exit status

From Adam Jackson's explaination:

  most distros have changed it so ld defaults to --no-copy-dt-needed-entries,
  so if you use something from libdrm you can't just assume libdrm_intel
  will bring it in for you, you have to be explicit

Signed-off-by: Rob Clark <rob@ti.com>