summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-02-01radeon: add surface allocator helper v10Jerome Glisse
The surface allocator is able to build complete miptree when allocating surface for r600/r700/evergreen/northern islands GPU family. It also compute bo size and alignment for render buffer, depth buffer and scanout buffer. v2 fix r6xx/r7xx 2D tiling width align computation v3 add tile split support and fix 1d texture alignment v4 rework to more properly support compressed format, split surface pixel size and surface element size in separate fields v5 support texture array (still issue on r6xx) v6 split surface value computation and mipmap tree building, rework eg and newer computation v7 add a check for tile split and 2d tiled v8 initialize mode value before testing it in all case, reenable 2D macro tile mode on r6xx for cubemap and array. Fix cubemap to force array size to the number of face. v9 fix handling of stencil buffer on evergreen v10 on evergreen depth buffer need to have enough room for a stencil buffer just after depth one Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-01intel: query for LLC supportEugeni Dodonov
This adds support for querying the kernel about the LLC support in the hardware. In case the ioctl fails, we assume that it is present on GEN6 and GEN7. v2: fix the return code checking Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-01-31intel: Fix build of Intel DRM on x86 systemsPaul Berry
Commit efd6e81e inadvertently broke the build by looking for "i?86" or "x86_64" in $host_os. The correct variable to check is $host_cpu. This was preventing libdrm_intel.so from being built. Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-01-30Don't build Intel DRM if $CHOST is not i?86-* or x86_64-*Jeremy Huddleston
This fixes a failure in 'make check' found by the tinderbox when trying to build this code on Linux/ppc. This code is only designed to run on Intel platforms, so don't even bother building it if we're not in that set. Found-by: Tinderbox Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-01- * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. * * Authors: * Eric Anholt <eric@anholt.net> * */ #include <fcntl.h> #include <sys/stat.h> #include "drmtest.h" /** Open the first DRM device we can find, searching up to 16 device nodes */ int drm_open_any(void) { char name[20]; int i, fd; for (i = 0; i < 16; i++) { sprintf(name, "/dev/dri/card%d", i); fd = open(name, O_RDWR); if (fd != -1) return fd; } abort(); } /** * Open the first DRM device we can find where we end up being the master. */ int drm_open_any_master(void) { char name[20]; int i, fd; for (i = 0; i < 16; i++) { drm_client_t client; int ret; sprintf(name, "/dev/dri/card%d", i); fd = open(name, O_RDWR); if (fd == -1) continue; /* Check that we're the only opener and authed. */ client.idx = 0; ret = ioctl(fd, DRM_IOCTL_GET_CLIENT, &client); assert (ret == 0); if (!client.auth) { close(fd); continue; } client.idx = 1; ret = ioctl(fd, DRM_IOCTL_GET_CLIENT, &client); if (ret != -1 || errno != EINVAL) { close(fd); continue; } return fd; } fprintf(stderr, "Couldn't find an un-controlled DRM device\n"); abort(); }
mmit/?id=a756fa384fdaaa0ae61075cb648554853a91bf22'>intel: Drop the code for counting parsing failures.Eric Anholt Nothing was consuming it. If something wants this in the future, would be done using the decode context anyway. 2012-01-27intel: Track the current packet location in the decode context.Eric Anholt This is the start of plumbing the context through the decode callchain instead of the current 4 arguments. 2012-01-27intel: Add a regression test for 2D decode, which I'm about to refactor.Eric Anholt 2012-01-09intel: add sprite ioctl defines and struct for i915 sprite codeJesse Barnes 2012-01-06configure: Bump version for 2.4.30Eric Anholt 2012-01-04intel: Update for new i915_drm.h defines.Eric Anholt 2012-01-04intel: Add regression tests for batch decode.Eric Anholt The .batch was generated using the dump-a-batch branch of git://people.freedesktop.org/~anholt/mesa using glxgears on gen7 hardware, using INTEL_DEVID_OVERRIDE for non-gen7 (this means that offsets in the buffers for non-gen7 are 0!). The .ref was generated by: ./test_decode tests/gen7-3d.batch -dump. The .sh exists because you can't supply arguments to tests using the simple automake tests driver. Something reasonable could be done using automake's parallel-tests driver (in fact, a previous version of the patch did that), but I was concerned that: 1) The parallel-tests driver is documented to be unstable -- they may change interfaces on us later. 2) The parallel-tests driver hides the output of tests in .log files scattered all over the tree, which was ugly and more painful to work with. v2: Actually add the batch files, add a .gitignore for the *-new.txt files added after failures, and fix failure mode for undetected chipset name. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1) 2012-01-04intel: Add a regression test program for intel_decode.c.Eric Anholt Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> 2012-01-04intel: Add an interface for setting the output file for decode.Eric Anholt Consumers often want to choose stdout vs stderr, and for testing I want to output to an open_memstream file. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> 2011-12-30intel/intel_decode.c: Remove #include "intel_decode.h".Johannes Obermayr Signed-off-by: Chad Versace <chad.versace@linux.intel.com> 2011-12-29intel: Disable unused decode_logic_op().Eric Anholt It was producing an unused code warning. I'm tempted to just remove it, since it's unused, but I *might* use it soon. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eugeni Dodonov <eugeni@dodonov.net> 2011-12-29intel: Turn on normal warnings for intel_decode.c build.Eric Anholt Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eugeni Dodonov <eugeni@dodonov.net> 2011-12-29intel: Remove c99ish variable declarations.Eric Anholt I'd rather be able to use c99 variable declarations (there's a lot of awful code layout due to being c90ish), but I'll leave that for later. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eugeni Dodonov <eugeni@dodonov.net> 2011-12-29intel: Fix printf format warnings for intel_decode.Eric Anholt There was plenty of dropped useful data, and some horribly mis-formatted data. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eugeni Dodonov <eugeni@dodonov.net> 2011-12-29intel: Add printflike warnings for instr_out.Eric Anholt Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eugeni Dodonov <eugeni@dodonov.net> 2011-12-29intel: Fix a ton of signed vs unsigned and const char *warningsEric Anholt We've got a different (better) set of warning flags in place in this tree. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eugeni Dodonov <eugeni@dodonov.net> 2011-12-29intel: Fix Wsigned-compare warnings (soon to be enabled).Eric Anholt Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eugeni Dodonov <eugeni@dodonov.net> 2011-12-29intel: Get intel_decode.c minimally building.Eric Anholt My plan is to use this drm_intel_dump_batchbuffer() interface for the current GPU tools, and the current Mesa batch dumping usage, while eventually building more interesting interfaces for other uses. Warnings are currently suppressed by using a helper lib with CFLAGS set manually, because the code is totally not ready for libdrm's warnings setup. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eugeni Dodonov <eugeni@dodonov.net> 2011-12-29intel: Minor style tweaks after Lindent.Eric Anholt Some comments weren't wrapped, and for some reason uint32_t *data got an extra space (while other instances of "type *identifier" didn't), and the indentation of the opcode-list structs got trashed. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eugeni Dodonov <eugeni@dodonov.net> 2011-12-29intel: Reformat intel_decode.c from intel-gpu-tools using Lindent.Eric Anholt We generally go for kernel style in this tree, and this 4-space indent stuff was bothering me. The new results have some ugly bits, but they're in places where we desperately want to be using helper functions anyway. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eugeni Dodonov <eugeni@dodonov.net> 2011-12-29intel: intel: Add IS_GEN[567] macros.Eric Anholt These will be used by intel_decode.c, and were taken from intel-gpu-tools. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eugeni Dodonov <eugeni@dodonov.net> 2011-12-29intel: Make intel_chipset handle devid directly.Eric Anholt This will make these macros reusable from intel_decode.c, which doesn't have a bufmgr_gem context, without faking the struct. We should generally only be using these macros from bufmgr_gem context setup anyway. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eugeni Dodonov <eugeni@dodonov.net> 2011-12-29intel: Import intel_decode.c from intel-gpu-tools.Eric Anholt This is from commit dd9a5b4f7fb07c78db4e7481bedca1b981030e3f. We've been sharing this file between that repo and Mesa, and it's time to build a real interface using it. I'm also hoping to apply some of its packet-walking logic for AUB dumping and batch validation purposes. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Eugeni Dodonov <eugeni@dodonov.net> 2011-12-18tests/gem_flink: Check for MASTER before proceedingChris Wilson gem_flink|gem_open are DRM_AUTH ioctl, and being lazy we do not establish ourselves as authenticated before testing the ioctls. So instead of aborting, skip the test unless we have root privileges (and so DRM_MASTER and the DRM_AUTH restriction no longer applies). A future test could assert that the flink fails without proper authentication. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43924 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> 2011-12-14intel: Reset vma list upon purgeChris Wilson During free we unconditionally delete the bo from the vma cache. This relies on the its list member being kept in a sane state. This fails after the object is purged, as the purge operation performs a pure deletion and doesn't reset the list member, leaving a pair of dangling pointers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> 2011-12-13libdrm: update drm headers from kernel, including new overlay ioctls & structsJesse Barnes Add structs and functions necessary for the new plane and fb handling code, including a new header, drm_fourcc.h, that includes the surface formats supported by various DRM drivers. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> 2011-12-13configure: Bump version for 2.4.29Chris Wilson Yet another release required for new API 2011-12-13intel: Remove the fresh assertions used to debug the vma cacheingChris Wilson Hopefully all the bugs in the callers have been found, so time to handle the failures "gracefully" again. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> 2011-12-13intel: Update map-count for an early error return during mappingChris Wilson Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> 2011-12-06intel: Evict cached VMA in order to make room for new mappingsChris Wilson As the max number of VMA mappings is a hard per-process limit, we need to include the number of currently active mappings when evicting in order to make room for a new mmap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> 2011-12-05intel: Add an interface to limit vma cachingChris Wilson There is a per-process limit on the number of vma that the process can keep open, so we cannot keep an unlimited cache of unused vma's (besides keeping track of all those vma in the kernel adds considerable overhead). However, in order to work around inefficiencies in the kernel it is beneficial to reuse the vma, so keep a MRU cache of vma. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>