1873 Commits

Author SHA1 Message Date
Chris Wilson
2035119201 lib: Downgrade error for failing to determine swap interface to a warning
If we can't detect how much swap is available, presume none.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-28 09:29:11 +00:00
Jesse Barnes
1e74007b4c testdisplay: remove unnecessary passing of width, height, stride, depth
These are globals, no need to shadow them everywhere.
2012-02-27 12:50:50 -08:00
Jesse Barnes
ea4163395e testdisplay: remove plane test support
This is better done in intel_sprite_on and was broken anyway.
2012-02-27 12:46:11 -08:00
Daniel Vetter
488daaa40b demos/intel_sprite_on: build warning fixes
... from Armin Reese.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-22 10:59:20 +01:00
Daniel Vetter
ace4a6e0e9 tests/gem_ringfill: shut up the compiler
Double-include ftl and local variable shadowing. While fixing the
later I've noticed that we mix up width and height in the blt copy
function.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-22 10:50:52 +01:00
Chris Wilson
fa6c2757fe tests/gem_ringfill: Exercise all rings
On SandyBridge, the BLT commands were split from the RENDER commands as
well as the BSD split inherited from Ironlake. So we need to make sure
we do exercise each ring, and in order to do so we also need to make
sure each batch takes longer to execute than it takes for us to
submit it.

v2: Exercise each ring sequentially.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 10:48:03 +01:00
Eric Anholt
5cf5558682 gem_ringfill: Make this actually test that all the batches executed.
I was looking into some strange behavior in Mesa that looks like
batches maybe being skipped, but this test didn't catch it.
2012-02-22 10:45:53 +01:00
Eric Anholt
732547793f intel_reg_dumper: Add dumping of GPU turbo regs.
I was interested in finding why my IVB system is not getting GPU turbo
after suspend/resume.  The piece that looks weird to me is that
INTERRUPT_THRESHOLD is sitting at 0, whereas pre-suspend it's
0x12000000.
2012-02-22 10:45:01 +01:00
Eric Anholt
6624325f13 reg_dumper: Refactor duplicated reg-dumping code. 2012-02-22 10:44:42 +01:00
Eric Anholt
3e0bd266d2 instdone: Fix fallthroughs to invalid instdone bits on newer hardware. 2012-02-22 10:43:19 +01:00
Eric Anholt
4fc909fd48 instdone: Add support for one of the IVB instdone regs.
[danvet: added GAM and GAFM bits.]
2012-02-22 10:43:06 +01:00
Daniel Vetter
8bedcae848 tests/intel_reg_dumper: s/pipe/disp_pipe/ to shut off the compiler
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-16 12:26:23 +01:00
Paulo Zanoni
3b65f179f2 Add intel_panel_fitter tool
The tool allows you to change the panel fitter settings, so you can
change the size of the screen being displayed on your monitor without
changing the real pixel size of your desktop. The biggest use case for
this tool is to work around overscan done by TVs and some monitors in
interlaced mode.

v2: reviews by Ben, Chris and Rodrigo
 - don't install
 - use intel_register_access_init
 - check for maximum X and Y values
 - add a disclaimer saying this is not the real solution
 - print less when pf is disabled and option '-l' is used

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-16 00:01:34 +01:00
Paulo Zanoni
ecad594e02 reg_dumper: change and fix behavior when using dump files
Before this patch, handling dump files was wrong:
- when HAS_PCH_SPLIT was specified, intel_reg_dumper segfaulted inside
  intel_check_pch()
- the "devid" variable was used but not set
- there was no way to specify the device id of the machine used to
  generate the dump file

This patch fixes this behavior with the following changes:
- the HAS_PCH_SPLIT variable is gone
- there is now a '-d' argument that can be used to specify the device id
  used to interpret the results
- when a dump file is used but the '-d' argument is not provided, an
  Ironlake machine is assumed

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-16 00:01:30 +01:00
Paulo Zanoni
ad87b06fd6 reg_dumper: add interlaced information to TRANSCONF
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-16 00:01:28 +01:00
Paulo Zanoni
3310db08d8 reg_dumper: add interlaced and rotation information to PIPECONF
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-16 00:01:25 +01:00
Daniel Vetter
27d1cef2d3 tests: fixup storedw tests
We need to use _INSTRUCTION as the reloc domain because otherwise the
ppgtt pipe_control w/a for snb won't kick in and the test fails.

The storedw tests for blt and bsd are still disabled because the
corresponding patch to flag ppgtt support isn't merged upstream yet.
Without ppgtt these hang my snb here.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-15 17:50:57 +01:00
Daniel Vetter
1d16f7934d test/gem_tiled_pread_pwrite: add progress indicator
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-15 17:43:38 +01:00
Daniel Vetter
24c8d2f112 remove old .c files
Oopps, I've forgotten about this in

commit 9b32894937af27f9ba95ea572ac857d376fe9034
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sat Feb 11 16:52:26 2012 +0100

    prepend 'intel_' to installed programms

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-12 12:16:25 +01:00
Daniel Vetter
e1ddd1c8e0 lib/drmtest: fixup copy&paste printf format issue
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-11 16:57:05 +01:00
Daniel Vetter
9b32894937 prepend 'intel_' to installed programms
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-11 16:52:26 +01:00
Kenneth Graunke
6cfd16648d Remove pointless Android ifdefs for sys/fcntl.h.
On my system, sys/fcntl.h contains exactly one line:

   #include <fcntl.h>

So there's really no need to #ifdef it.  Also, intel_mmio.c already
included <fcntl.h>; there's no need to include it twice.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-11 11:48:02 +01:00
Sateesh Kavuri
b39a74ba4e Added support for Android
Added the Android.mk file as per Android make system. Also had to modify
 the headers with the proper location for fcntl.h as per the Android
 bionic headers location

Signed-off-by: Sateesh Kavuri <sateesh.kavuri@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-10 18:43:53 +01:00
Daniel Vetter
2065ca15fb Release 1.2 2012-02-09 22:39:50 +01:00
Daniel Vetter
06bfa3d387 lib/rendercopy: fixup make distcheck
And complete the gem_stress->rendercopy rename that I've forgotten
about.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-09 22:32:54 +01:00
Alan Coopersmith
042f40eda7 Fix program name in intel_bios_dumper.man SYNOPSIS
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-02-08 17:04:53 -08:00
Kenneth Graunke
90a6f75dd2 Update generation checks to provide basic support for Ivybridge.
There may be some updates required, but assuming Ivybridge is similar to
Sandybridge is a decent start; previously it fell through to the Gen2/3
case and nothing worked.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-08 21:35:56 +01:00
Daniel Vetter
6fe3884bc9 add sprite demo from Armin Reese
Also fixed up the copyright header a bit. No comments on the coding
styled used ;-)

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-08 16:49:15 +01:00
Alan Coopersmith
e61b917134 Move free(cmd) to after last use of cmd in intel_gpu_top
Error: Use after free (CWE 416)
   Use after free of pointer 'cmd' in call to fprintf
        at line 496 of tools/intel_gpu_top.c in function 'main'.
          Previously freed at line 491 with free.
[ This bug was found by the Parfait 0.4.2 bug checking tool.
  For more information see http://labs.oracle.com/projects/parfait/ ]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-06 20:44:51 +01:00
Yi Sun
3d46ca8c4d tests/testdisplay.c: rewite function dump_connectors and dump_crtcs.
Replace the globe variable drm_fd with local variable passed from parameter.

Signed-off-by: Yi Sun <yi.sun@intel.com>
[danvet: fixup whitespace]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-06 20:38:49 +01:00
Yi Sun
4cceae74e3 tests/testdisplay.c: Fix the black screen issue while force mode.
Replace the 8 globe force mode variables with a struct drmModeInfo variable.
Next step, we could reduce the number of globe veriables, to be convenient to call the functions.

Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-06 20:36:45 +01:00
Daniel Vetter
36a40a5423 gem_partial_pwrite_pread: add progress indicator
Without optimized pread/pwrite this test takes forever.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-31 13:52:59 +01:00
Daniel Vetter
611e0cb333 intel_reg_dumper: add TRANS_VSYNCSHIFT
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-27 18:50:21 +01:00
Ben Widawsky
6b6b13906a intel_reg_write: use register access init/fini
This will do the proper forcewake stuff.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-01-25 21:06:25 -08:00
Ben Widawsky
6e3066c9c3 intel_reg_read: use register access init/fini
This will do the proper forcewake stuff.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-01-25 21:05:15 -08:00
Ben Widawsky
4c20525b7f mmio: refactor reg init/fini
Rearrange register access init and fini so that we properly accomodate
platforms without forcewake.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-01-25 21:04:16 -08:00
Ben Widawsky
802bd74c5f i-g-t: silence -Winline
In this case, the code already has a comment about the problem. We don't
need to flood the build with this less than useful message.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-01-25 21:01:55 -08:00
Chris Wilson
1ffe6b0ee8 intel_bios_reader: Sanitize input to ensure all data blocks are within bounds
Running intel_bios_reader upon itself causes the reader to crash and
burn. It obviously finds a VBT signature inside the binary, but then
does not rigorously check that all data blocks are valid before
dereferencing them.

Reported-by: Emanuel Bronshtein
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45205
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-25 10:16:21 +00:00
Daniel Vetter
93a65895bb drmtest: add progress indicator
Some test that trash the aperture necessarily need to take forever, so
add a little progress indicator to keep worried minds at peace.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 23:18:21 +01:00
Daniel Vetter
7492f97cde tests: add gem_cs_prefetch
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 23:03:12 +01:00
Daniel Vetter
ca10c7231d intel_error_decode: fixup glibc free warning
Usually some random stack garbage doesn't equal some other
random stack garbage, leading to the filename != path check
succeeding.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 21:41:17 +01:00
Alan Coopersmith
fbae138990 Add Solaris implementation of intel_get_total_swap_mb()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 11:38:10 +01:00
Alan Coopersmith
5c4e041dc8 Make benchmarks also link against libpciaccess
Fixes Solaris build error on build of intel_upload_blit_large:

Undefined			first referenced
 symbol  			    in file
pci_device_probe                    ../lib/.libs/libintel_tools.a(intel_pci.o)  (symbol belongs to implicit dependency libpciaccess.so.0)
pci_system_init                     ../lib/.libs/libintel_tools.a(intel_pci.o)  (symbol belongs to implicit dependency libpciaccess.so.0)
pci_device_find_by_slot             ../lib/.libs/libintel_tools.a(intel_pci.o)  (symbol belongs to implicit dependency libpciaccess.so.0)
ld: fatal: symbol referencing errors. No output written to intel_upload_blit_large

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 11:38:10 +01:00
Daniel Vetter
fa461203e6 testdisplay: make udev optional
Hopefully this makes Solaris happy.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 11:28:25 +01:00
Daniel Vetter
7f7cafe729 testdisplay: extract hotplug code
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 10:50:10 +01:00
Daniel Vetter
137f4d467e lib: forcewake is gen6+
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 09:37:51 +01:00
Daniel Vetter
8d4d8b00ed tests/gem_tiled_swapping: be more conservative with the swap requirements
Blew up and angered the OOM killer on one of my machines.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-23 17:18:53 +01:00
Daniel Vetter
98129fa2ff tests: add gem_tiled_swapping
Also add a drmtest_exchange_int helper, might come handy at other
places.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-22 22:28:46 +01:00
Daniel Vetter
fbfe374b28 lib: extract drmtest_permute_array
Lots of tests need to create havoc to LRUs in the kernel or otherwise
need to shuffle things around a bit. So make a small array permutation
function available.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-22 20:09:54 +01:00
Daniel Vetter
1a9fa8fd12 lib: add intel_get_total_swap_mb
Test that try to exercise the swap paths need to check whether swap is
available, otherwise they'll just oom.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-22 19:24:48 +01:00