956 Commits

Author SHA1 Message Date
Daniel Vetter
cdad308a4b tests/flip_test: don't complain about timestamps in the future
those can happen due to the scanline vblank timestamp adjuster ...
2012-10-02 16:09:00 +02:00
Daniel Vetter
4c7fc65cb6 tests/flip_test: actually try to check what I want to check
/me sucks
2012-10-02 15:59:58 +02:00
Daniel Vetter
6b034a6fd6 tests/flip_test: check whether timestamp isn't in the past
This is mostly useful for when we add support for other clock sources,
e.g. clock_monotic, to check whether the kernel picked the right
clock.
2012-10-02 15:42:34 +02:00
Daniel Vetter
73af035c59 tests/flip_test: check whether the pageflip event took too long
We're suspecting that something is fishy with the event deliver/vblank
timestamp handling on gmch platforms. Unfortunately, this isn't it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-02 15:37:24 +02:00
Chris Wilson
f509d40fa9 flip_test: count the number of flips and check we don't drop any
In the basic case of just flipping between two buffers with no
additional work, we should neve drop a frame.
2012-10-02 13:31:33 +01:00
Daniel Vetter
93ea0182c4 tests/flip_test: re-enable disabled testcases
oops
2012-10-02 11:50:20 +02:00
Daniel Vetter
4701dacbc5 tests/flip_test: new testcase with a busy load before the flip
I've hoped that this would be good enough to hang pch platforms, but
it looks like those just complete the flip immediately on disabled pipes.
2012-10-02 10:33:13 +02:00
Daniel Vetter
3d4ebe9be3 fixup .gitignore for newly add sysfs_rps test 2012-10-02 10:32:25 +02:00
Daniel Vetter
df7edaab90 lib: helper to convert gem_hanlde to drm_intel_bo 2012-10-02 10:32:10 +02:00
Daniel Vetter
9d1a3587ac drmtest: use do_or_die 2012-10-01 11:34:10 +02:00
Chris Wilson
a65087a26e tests/flip_test: Revamp to demonstrate race with modeset/dpms and pageflips
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-28 13:02:46 +01:00
Damien Lespiau
4650505d7e intel_infoframes: Dump HDMI vendor infoframes
Those infoframes are programmed when using stereo 3D modes.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-27 08:43:48 +02:00
Yi Sun
53895acbe2 Add option -o <number>, which can test only one specified mode.
Each mode line has a number just like '[i]'. So we can only test the specified mode with giving the number of mode to '-o' parameter.

Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-26 14:46:02 +02:00
Chris Wilson
d00f72a01b tests/module_reload: Silence warnings when unloaded shared modules
So long as we spit out critical errors during i915 reload, or detect any
oops the test will do its job.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55040
2012-09-18 14:06:14 +01:00
Ben Widawsky
0cedccc844 sysfs rps test added
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-09-14 12:39:20 -07:00
Chris Wilson
397cd4acd1 gem_gtt_speed: Add a test that caches the mmapping across iterations
Repeat the memset streaming performance test on the same mapping so that
we can factor out the overhead of establishing the GTT/CPU mmaps.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13 15:05:34 +01:00
Chris Wilson
f256ada3b6 gem_gtt_speed: Use a memset() to test streaming performance
This make the reasonable assumption that the libc code for memset() can
saturate the memory bandwidth -- at any rate it should do better than
the copy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13 14:59:09 +01:00
Ben Widawsky
efd68f9d64 intel_sprite_on: plane needs 16.16 width and height
This only ever worked because we used to have a bug in our driver which
was fixed months ago by:

commit b4db1e35ac59c144965f517bc575a0d75b60b03f
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Tue Mar 20 10:59:09 2012 -0700

    drm/i915: treat src w & h as fixed point in sprite handling code

Reported-by: Armin Reese <armin.c.reese@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-09-12 17:49:45 -07:00
Ben Widawsky
93e5b4477f intel_sprite_on: coding style fixes
It was driving me nuts...

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-09-12 17:41:00 -07:00
Ben Widawsky
5b5a7a806f intel_sprite_on: Idententation + Copyright fix
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-09-08 13:42:05 -07:00
Damien Lespiau
209ab470f2 tools: Update gitignore with intel_dpio_{read, write}
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-07 14:13:52 +02:00
Damien Lespiau
c8b93b8b77 intel_reg_dumper: Add more information when dumping single registers
Now that we can dump registers giving a partial name, adding more
information about the dumped registers seems useful.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-04 13:55:10 +02:00
Damien Lespiau
62a026eac5 intel_reg_dumper: Allow partial register names on the command line
Let people give just a part of the register name. Handy when not
remembering the exact name or if the register is defined with a
different name than the one in the spec being looked at.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-04 13:55:10 +02:00
Damien Lespiau
763d22cbf8 intel_reg_dumper: Also decode registers given by address
One can now give an address instead of a register name to decode a
single register.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-04 13:55:10 +02:00
Damien Lespiau
2fd80079c0 intel_reg_dumper: Add a single register decode mode
From time to time, one would like to decode a register value that have
been captured at a certain point in time (and say printed out with a
printk). intel_reg_dumper has all the knowledge to do that and this
patch adds a way to ask it to decode a value.

Example usage:

$ ./tools/intel_reg_dumper PCH_PP_CONTROL 0xabcd0002
       PCH_PP_CONTROL: 0xabcd0002 (blacklight disabled, power...

v2: friendlier invocation (Chris Wilson)
v3: remove unecessary casts and use strcasecmp (Jani Nikula)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-04 13:55:10 +02:00
Ben Widawsky
bc62567b77 clang: Fix static analysis warnings from clang
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-30 14:20:52 -07:00
Ben Widawsky
54ed938d39 clang: Fix warnings found through clang.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-30 14:19:10 -07:00
Chris Wilson
ac23daaa51 tests/gem_cacheing: Exercise snoop coherency
This is based on tests/gem_partial_pwrite_pread which aims to detect
incoherency between CPU reads and writes to a bo whilst using it as a
source and target for GPU writes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-27 09:42:34 +01:00
Chris Wilson
51baabb562 Add bare-metal interface to adjust cacheing (i.e. snoop status) of a bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-27 09:39:45 +01:00
Daniel Vetter
dd5f40f50c bump to 1.3 release 2012-08-27 09:37:01 +02:00
Chris Wilson
7a02aa4cbf mmio: Limit the uc- mapping to only map the registers
In the future, we may like to enable wc mapping of at least the GATT,
and so causing a conflict if we attempt to map the entire bar as uc-
here. Obviously we need a better fallback plan, but for the moment only
attempt to map the portion of the pci space that we use for register
access.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-27 09:34:33 +02:00
Chris Wilson
a4783f9485 intel_gtt: Harden against changes to kernel mappings of the GTT
Rather than use the common mmio segment which will be in future
restricted to just the registers and so exclude the GTT portion on all
architectures, explicitly mmap the GTT ourselves. Repeat this mmapping
with a couple of flags until we matching the existing kernel mapping.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-27 09:34:30 +02:00
Daniel Vetter
3d148e164d s/NO_PID/NOP_ID
Alan typo'ed it, I've failed to notice :(
2012-08-25 00:01:27 +02:00
Alan Coopersmith
1b5fd314fd Add --disable-nouveau option for platforms without nouveau support
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-24 23:20:32 +02:00
Alan Coopersmith
4cdfa8e9b7 flip_test: add cast to pacify Solaris Studio compiler
Fixes build error:
"flip_test.c", line 180: improper pointer/integer combination: op "="

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-24 23:20:27 +02:00
Alan Coopersmith
6b3e6f28d2 Rename NOPID to NO_PID to avoid conflict with Solaris NOPID
Solaris <sys/types.h> already has #define NOPID (pid_t)(-1)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-24 23:20:22 +02:00
Alan Coopersmith
99fdba921e Fall back to CLOCK_MONOTONIC on systems without CLOCK_MONOTONIC_RAW
Solaris has not yet adopted this Linux extension

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-24 23:20:14 +02:00
Daniel Vetter
e40146878e Revert "tests: disable nouveau if unavailable"
This reverts commit dd8325323bfcca1f742e864ca7d87101a0d59936.

I like the patch from Alan Coopersmith with an explicit disable
option better.
2012-08-24 23:18:48 +02:00
Maarten Lankhorst
dd8325323b tests: disable nouveau if unavailable 2012-08-24 22:55:20 +02:00
Maarten Lankhorst
425940be1d tests/prime_nv_test: add missing call for test8 2012-08-24 22:50:42 +02:00
Maarten Lankhorst
c5b7ebc1cc tests/prime_nv_pcopy: kill debug code that's not upstream 2012-08-24 22:50:42 +02:00
Daniel Vetter
94ec3f926c tests/prime_nv: don't enable buffer reuse
We share these suckers, hence the fd-local libdrn instance does not
have full control over the lifecycle of the object. Prevents the tests
from blowing up with

[drm:i915_gem_mmap_gtt] *ERROR* Attempting to mmap a purgeable buffer

and similar things.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-24 15:45:09 +02:00
Ben Widawsky
d400551144 Converted a display debug script for use by designers
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-23 11:38:20 -07:00
Ben Widawsky
ea944a9faf intel_reg_read: use strtol instead of atoi
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-23 11:32:57 -07:00
Ben Widawsky
baf026d692 intel_reg_read: support -c option to read multiple dwords
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-23 11:29:43 -07:00
Vijay Purushothaman
4fc76adf31 tools: Added intel_dpio_read and intel_dpio_write
In Valleyview the DPLL and lane control registers are accessible only
through side band fabric called DPIO. Added two tools to read and write
registers residing in this space.

v2: Moved the core read/write functions to lib/intel_dpio.c based on
Ben's feedback

Signed-off-by: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-21 09:30:29 +02:00
Daniel Vetter
082826de6c tests: add gem_gtt_cpu_tlb
This catches tlb invalidation issues on my snb mobile gt2+
2012-08-15 10:26:48 +02:00
Wang Xingchao
c407722048 intel_audio_dump: add Haswell audio dump support
Add Haswell audio registers definition and dump support.

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-15 11:08:43 +02:00
Wang Xingchao
f9a2481e71 intel_audio_dump: fix wrong port definition
there're three Ports B/C/D used for selection by each transcoder A/B/C.

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-15 11:08:39 +02:00
Maarten Lankhorst
1f523bd8d1 Fixup previous commit
ENODEV not being defined and return code wrong
2012-08-14 18:52:23 +02:00