Commit Graph

5228 Commits (ce62b8e0596b4805cb7e09a4a4e66de5c7b11cf3)

Author SHA1 Message Date
Marek Olšák 58545722d0 radeon: fix allocation of MSAA surfaces on r600-r700
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
2012-08-24 16:51:14 +02:00
Víctor Manuel Jáquez Leal f215d65137 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>
2012-08-23 14:21:01 -05:00
Dave Airlie 3163cfe4db radeon: add prime import/export support
this adds radeon version of the prime import/export support.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-08-14 11:04:56 +10:00
Kenneth Graunke a9412fa9de 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>
2012-08-12 20:13:50 -07:00
Tobias Klausmann 6fa2b29d22 tests/modetest: Add a forgotten return, needed for opensuse buildservice
Signed-off-by: Marek Olšák <maraeo@gmail.com>
2012-08-12 00:00:43 +02:00
Marek Olšák d1de6831b9 configure: bump version for 2.4.38 release 2012-08-11 20:06:23 +02:00
Marek Olšák 10481fec55 tests/modetest: fix distcheck 2012-08-11 20:02:03 +02:00
Eric Anholt 2607dad20b intel: Add a function for the new register read ioctl.
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-10 09:48:07 -07:00
Eric Anholt 934ea3b321 intel: Import updated i915_drm.h.
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-10 09:48:05 -07:00
Eric Anholt 71ebcf4ea3 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>
2012-08-10 09:48:02 -07:00
Marek Olšák 128803a107 radeon: tweak TILE_SPLIT for MSAA surfaces
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
2012-08-09 22:35:07 +02:00
Marek Olšák e14aedce64 radeon: force 2D tiling for MSAA surfaces
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
2012-08-09 22:33:00 +02:00
Marek Olšák 2337295573 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>
2012-08-09 16:37:20 +02:00
Marek Olšák ad66c17209 radeon: simplify ZS buffer checking on r600
Setting those flags has no effect anywhere else.

Reviewed-by: Christian König <christian.koenig@amd.com>
2012-08-09 16:37:20 +02:00
Paulo Zanoni 93fef04b1e intel: add more Haswell PCI IDs
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2012-08-08 15:38:12 -03:00
Chris Wilson 9a2b57d229 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>
2012-08-08 19:24:11 +01:00
Alex Deucher 9f823ca236 radeon: add some new SI pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-06 10:34:59 -04:00
Alex Deucher dd944a0081 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>
2012-08-06 10:33:56 -04:00
Eric Anholt 7e3f08b463 intel: Quiet valgrind warnings in context creation. 2012-08-02 11:20:17 -07:00
Damien Lespiau c10b08d959 intel: Remove two unused variables
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-08-02 11:20:06 -07:00
Rob Clark ebd7904877 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>
2012-07-23 11:35:06 -05:00
Laurent Pinchart db004badef 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>
2012-07-20 10:30:47 -05:00
Laurent Pinchart cc90ffa9b1 modetest: Make frame buffer format configurable on the command line
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-07-20 10:30:47 -05:00
Laurent Pinchart 0375222c71 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>
2012-07-20 10:30:47 -05:00
Laurent Pinchart edcef53685 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>
2012-07-20 10:30:47 -05:00
Laurent Pinchart 86402a2a0c 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>
2012-07-20 10:30:47 -05:00
Laurent Pinchart 8b6f3e32b8 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>
2012-07-20 10:30:47 -05:00
Laurent Pinchart a94ee62429 modetest: Add SMPTE test pattern
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2012-07-20 10:30:46 -05:00
Laurent Pinchart 3fdc1777ee 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>
2012-07-20 10:30:46 -05:00
Rob Clark faf26b689d 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>
2012-07-20 10:28:46 -05:00
Dave Airlie ff65de9666 intel: add prime interface for getting/setting a prime bo. (v4)
This adds interfaces for the X driver to use to create a
prime handle from a buffer, and create a bo from a handle.

v2: use Chris's suggested naming (well from at least for consistency)
v3: git commit --amend fail
v4: fix as per Chris's suggestions, group assignments, add get tiling

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-20 08:53:03 +10:00
Dave Airlie 13c06cde4e libdrm/nouveau: add prime handle->bo and bo->handle support.
This adds prime support to nouveau libdrm.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-19 13:05:57 +10:00
Dave Airlie cc0a14575d libdrm: add prime fd->handle and handle->fd interfaces
These are just basic ioctl wrappers around the prime ioctls,
along with the capability reporting.

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

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-07-16 02:39:12 +01:00
Rob Clark 22574aa887 omap: add refcnting and handle tracking
There can be scenarios, especially when re-importing an existing buffer,
where you end up with multiple 'struct omap_bo's wrapping a single GEM
object handle.  Which causes badness when the first of the evil-clones
is omap_bo_del()'d.

To do this, introduce reference counting and a hashtable to track the
handles per fd.

First, to avoid bo's slipping through the crack if multiple 'struct
omap_device's are created for one drm fd, a hashtable mapping drm
fd to omap_device, and the omap_device itself is reference counted.
Per omap_device, we keep a handle_table mapping GEM handle to omap_bo.
When buffers are imported from flink name or dmabuf fd, the handle
table is consulted, and if an omap_bo already exists, it's refcnt is
incremented and it is returned.  For good measure, to avoid the
handle_table being deleted before the omap_bo is freed, the omap_bo
holds a reference to the omap_device.

TODO: check the overhead of the hashtable.  If too much we could maybe
get away with only tracking exported and imported bo's in the table.

TODO: all the import/export flink/dmabuf operations are generic DRM
ioctls.  Really all this functionality could be handled by a generic
drm_bo and drm_device "base class" that could be extended by omap,
exynos, etc.  That would also allow more common userspace code by
avoiding artificial libdrm_omap dependencies.

Signed-off-by: Rob Clark <rob@ti.com>
2012-07-13 16:18:25 -05:00
Rob Clark 42f8a68e19 omap: add API to import bo's from dmabuf fd's
Signed-off-by: Rob Clark <rob@ti.com>
2012-07-13 16:16:46 -05:00
Rob Clark 8116a32df6 omap: clarify dmabuf file descriptor ownership
Signed-off-by: Rob Clark <rob@ti.com>
2012-07-13 16:16:46 -05:00
Kenneth Graunke 992e2afd59 intel: Change context create failure message to from fprintf to DBG().
Since there is no getparam for hardware context support, Mesa always
tries to obtain a context by calling drm_intel_gem_context_create and
NULL-checking the result.  On an older kernel without context support,
this caused libdrm to print an unwanted message to stderr:

DRM_IOCTL_I915_GEM_CONTEXT_CREATE failed: Invalid argument

In fact, this caused every Piglit test to fail with a "warn" status due
to the unrecognized error message.

Change the message to use DBG() rather than fprintf(), so people can
still get the debug message, but it won't spam normally.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2012-07-12 13:44:21 -07:00
Cooper Yuan 881e69f185 libdrm/exynos: padding gem_mmap structure to 64-bit aligned 2012-07-06 16:36:31 +02:00
Lauri Kasanen 8fad46b614 intel: Fix build failure in test_decode.c
Hi list

The recently released libdrm 2.4.37 does not compile the Intel part:

test_decode.c: In function 'compare_batch':
test_decode.c:107: error: implicit declaration of function 'open_memstream'

PS: Please CC me.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-07-03 09:54:41 -07:00
Ben Widawsky 1b1a4f0a77 configure: bump version for release
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-29 11:08:05 -07:00
Ben Widawsky f7210fa4ec intel/context: create/destroy implementation
Add relevant code to set up minimal state and call the appropriate
kernel IOCTLs.

This was missed in the previous cherry-picking for 2.3.36.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-29 11:05:47 -07:00
Kristian Høgsberg c0ed9b23ec modetest: Dump bit field names 2012-06-28 13:24:36 -04:00
Ben Widawsky a7805194b7 intel/decode: fix the reference file for
I mistakenly "fixed" a bad decode with

commit 7d0a1d5ebb
Author: Ben Widawsky <ben@bwidawsk.net>
Date:   Sun Jun 24 20:35:57 2012 -0700

    intel/decode: VERTEX_ELEMENT_STATE, 1 means valid

However the actual fix is just to update the reference file, and
include GEN7 in the decode.

Props to Eric Anholt for putting the test in distcheck, or else I
wouldn't have caught this.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-27 10:22:37 -07:00
Ben Widawsky df5cc69dab Revert "intel/decode: VERTEX_ELEMENT_STATE, 1 means valid"
This reverts commit 7d0a1d5ebb.

The actual fix
2012-06-27 10:21:42 -07:00
Ben Widawsky ee2be4fa7e intel: add decoding of MI_SET_CONTEXT
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-06-27 09:57:17 -07:00
Ben Widawsky 3ed38714bd intel/context: new execbuf interface for contexts
To support this we extract the common execbuf2 functionality to be
called with, or without contexts.

The context'd execbuf does not support some of the dri1 stuff.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-06-27 09:57:17 -07:00
Ben Widawsky b3b123dfb1 intel/context: Add drm_intel_context type
Add an opaque type representing a HW context.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-06-27 09:57:16 -07:00
Ben Widawsky a5b2946889 intel: updated header for contexts
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-By: Kenneth Graunke <kenneth@whitecape.org>
2012-06-27 09:57:16 -07:00
Ben Widawsky 7d0a1d5ebb intel/decode: VERTEX_ELEMENT_STATE, 1 means valid
The logic seemed to be inverse to me.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-27 09:58:35 -07:00