profile/extras/intel-gpu-tools.git
11 years agooverlay: Read frequency from perf
Chris Wilson [Tue, 27 Aug 2013 11:24:18 +0000 (12:24 +0100)]
overlay: Read frequency from perf

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Read power from perf_events
Chris Wilson [Tue, 27 Aug 2013 10:20:43 +0000 (11:20 +0100)]
overlay: Read power from perf_events

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Align the process names in the memory table
Chris Wilson [Mon, 26 Aug 2013 22:32:07 +0000 (23:32 +0100)]
overlay: Align the process names in the memory table

And use a shade of gray to distinguish from the total instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agolib/drmtest: restore in_fixture assert
Daniel Vetter [Mon, 26 Aug 2013 19:16:37 +0000 (21:16 +0200)]
lib/drmtest: restore in_fixture assert

I didn't really want to revert those, too ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoRevert "tests/gem_concurrent_blit: Fix segmentation fault"
Daniel Vetter [Mon, 26 Aug 2013 18:41:00 +0000 (20:41 +0200)]
Revert "tests/gem_concurrent_blit: Fix segmentation fault"

This reverts commit 912a7d855600aadb937517ec5bab26bfd9b8953d.

Now fixed for real!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib/drmtest: don't complete fixtures with a longjmp
Daniel Vetter [Mon, 26 Aug 2013 18:52:14 +0000 (20:52 +0200)]
lib/drmtest: don't complete fixtures with a longjmp

Longjmp creates havoc with stack variables of the current stackframe.
And since fixtures should be used to set up such variables creating
havoc isn't a great idea. With this I can revert a bunch of
bogus patches I've done to paper over this by moving stack variables
to be global.

The same issue is actually a feature for subtest blocks since subtests
should be independant anyway.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_mmap_gtt: Add testcase for the vma access manager
Daniel Vetter [Mon, 26 Aug 2013 17:43:59 +0000 (19:43 +0200)]
tests/gem_mmap_gtt: Add testcase for the vma access manager

Currently fails since the patches aren't merged yet.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_mmap: Convert to subtests
Daniel Vetter [Mon, 26 Aug 2013 08:26:00 +0000 (10:26 +0200)]
tests/gem_mmap: Convert to subtests

I wanted to write a testcase for gtt mmap access restriction checking
and only noticed after conversion to subtests that this here is for
cpu mmaps ;-)

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/kms_setmode: don't save/restore vt graphics for dry-run
Imre Deak [Mon, 26 Aug 2013 14:15:46 +0000 (17:15 +0300)]
tests/kms_setmode: don't save/restore vt graphics for dry-run

Signed-off-by: Imre Deak <imre.deak@intel.com>
11 years agolib/drmtest: fix handling of -h --help argument parsing
Imre Deak [Mon, 26 Aug 2013 14:02:49 +0000 (17:02 +0300)]
lib/drmtest: fix handling of -h --help argument parsing

So far we handled -h or --help arguments properly only if the test
called igt_subtest_init_parse_opts(). Fix this for igt_subtest_init()
callers too. Make sure we still don't exit for any other
unknown options, which the caller may parse with a second getopt scan.

Signed-off-by: Imre Deak <imre.deak@intel.com>
11 years agooverlay: Trim the padding slightly
Chris Wilson [Mon, 26 Aug 2013 13:45:26 +0000 (14:45 +0100)]
overlay: Trim the padding slightly

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Count number of semaphores used by each process
Chris Wilson [Mon, 26 Aug 2013 13:11:27 +0000 (14:11 +0100)]
overlay: Count number of semaphores used by each process

This required me to contract the per-process information considerably,
hopefully readability is not sacrificed too much.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Allow simple positioning and resizing
Chris Wilson [Sun, 25 Aug 2013 22:37:58 +0000 (23:37 +0100)]
overlay: Allow simple positioning and resizing

Using window.size=<width>x<height> or window.size=<scale>% in
the config file, or --size=<scale>% or --size=<width>x<height>

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Monitor interrupts
Chris Wilson [Sun, 25 Aug 2013 19:13:31 +0000 (20:13 +0100)]
overlay: Monitor interrupts

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Detach from terminal
Chris Wilson [Sun, 25 Aug 2013 14:17:39 +0000 (15:17 +0100)]
overlay: Detach from terminal

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Add a raw kms output
Chris Wilson [Sun, 25 Aug 2013 12:15:55 +0000 (13:15 +0100)]
overlay: Add a raw kms output

For when you don't have any display server, use brute force.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Draw the cpu busy line on top of the waits
Chris Wilson [Sat, 24 Aug 2013 11:59:31 +0000 (12:59 +0100)]
overlay: Draw the cpu busy line on top of the waits

By drawing it behind the waits, it is obscured by the translucent waits.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: simplify types for object counts for 32/64bit porting
Chris Wilson [Sat, 24 Aug 2013 11:37:59 +0000 (12:37 +0100)]
overlay: simplify types for object counts for 32/64bit porting

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Expose sampling period/frequency as a user parameter
Chris Wilson [Sat, 24 Aug 2013 09:00:36 +0000 (10:00 +0100)]
overlay: Expose sampling period/frequency as a user parameter

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/gem_evict_*: Add interruptible modes
Daniel Vetter [Fri, 23 Aug 2013 20:32:29 +0000 (22:32 +0200)]
tests/gem_evict_*: Add interruptible modes

Also I've stumbled over igt_fixture again. Somehow gcc loves to wreak
havoc with stack variables set up in igt_fixtures ... Duct-tape in the
form of moving fd out to global scope applied.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agooverlay: Fix power reading from debugfs
Chris Wilson [Fri, 23 Aug 2013 15:02:42 +0000 (16:02 +0100)]
overlay: Fix power reading from debugfs

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Distinguish the root debugfs path and our dri node
Chris Wilson [Fri, 23 Aug 2013 14:59:06 +0000 (15:59 +0100)]
overlay: Distinguish the root debugfs path and our dri node

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Search for right debugfs path
Chris Wilson [Fri, 23 Aug 2013 14:51:21 +0000 (15:51 +0100)]
overlay: Search for right debugfs path

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/sysfs_rps: Fix igt_require conversion
Daniel Vetter [Fri, 23 Aug 2013 07:30:47 +0000 (09:30 +0200)]
tests/sysfs_rps: Fix igt_require conversion

Another fumble caught by QA.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68461
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agooverlay: Replace debug ticker with hostname
Chris Wilson [Thu, 22 Aug 2013 21:50:05 +0000 (22:50 +0100)]
overlay: Replace debug ticker with hostname

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Close DRI2 device after authentication failure
Chris Wilson [Thu, 22 Aug 2013 19:42:58 +0000 (20:42 +0100)]
overlay: Close DRI2 device after authentication failure

So that we don't leave a master fd open when operating remotely.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Double buffer the x11 window
Chris Wilson [Thu, 22 Aug 2013 18:20:01 +0000 (19:20 +0100)]
overlay: Double buffer the x11 window

For pleasant remote transport.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Make the config parser more lenient
Chris Wilson [Thu, 22 Aug 2013 18:19:03 +0000 (19:19 +0100)]
overlay: Make the config parser more lenient

Allow a dot-notation outside of the [ini] style to make commandline
parameters easier to add.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/pc8: don't work around the eDP I2C bug
Paulo Zanoni [Thu, 22 Aug 2013 14:53:09 +0000 (11:53 -0300)]
tests/pc8: don't work around the eDP I2C bug

On the current Kernels, i2c operations on disabled eDP panels don't
work because we don't enable the panel before doing the i2c
transactions. Whenever we try these transactions we print an error
message on dmesg and fail. The current test suite was trying to work
around this problem: we count how many eDP outputs we have and add
them to the final result.

Daniel asked me to not work around the bug, so now the i2c test will
fail until we actually fix the Kernel bug (or stop using eDP panels).

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
11 years agotests/pc8: fix function return value
Paulo Zanoni [Thu, 22 Aug 2013 14:50:05 +0000 (11:50 -0300)]
tests/pc8: fix function return value

Looks like I forgot to push this chunk... The test was passing in
cases where you only have eDP monitors due to the fact that we
consider i2c won't work on eDP monitors.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
11 years agooverlay: Rudiments of config files and option parsing
Chris Wilson [Thu, 22 Aug 2013 14:07:48 +0000 (15:07 +0100)]
overlay: Rudiments of config files and option parsing

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Fill the blank charts with error messages
Chris Wilson [Thu, 22 Aug 2013 10:59:58 +0000 (10:59 +0000)]
overlay: Fill the blank charts with error messages

Instead of showing nothing, show a "space left intentionally blank"
message.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Remove busy estimation
Chris Wilson [Thu, 22 Aug 2013 00:30:02 +0000 (01:30 +0100)]
overlay: Remove busy estimation

Too inaccurate to be useful.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.
Rodrigo Vivi [Wed, 21 Aug 2013 18:13:13 +0000 (15:13 -0300)]
tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded.

v2: Don't add to kernel tests.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agooverlay: Fix underflow for clamping initial values
Chris Wilson [Wed, 21 Aug 2013 12:49:45 +0000 (13:49 +0100)]
overlay: Fix underflow for clamping initial values

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: i915 pmu doesn't require a specific frequency
Chris Wilson [Wed, 21 Aug 2013 12:44:44 +0000 (13:44 +0100)]
overlay: i915 pmu doesn't require a specific frequency

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Put a faint outline around each chart
Chris Wilson [Wed, 21 Aug 2013 12:36:29 +0000 (13:36 +0100)]
overlay: Put a faint outline around each chart

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Fade the graphs behind the text
Chris Wilson [Wed, 21 Aug 2013 10:06:51 +0000 (11:06 +0100)]
overlay: Fade the graphs behind the text

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests: Add gem_evict_alignment
Chris Wilson [Wed, 21 Aug 2013 08:24:59 +0000 (09:24 +0100)]
tests: Add gem_evict_alignment

Clone gem_evict_everything and use it to exercise the misalignment
paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agolib/drmtest: fix logic fumble in gem_context_create
Daniel Vetter [Wed, 21 Aug 2013 08:22:13 +0000 (10:22 +0200)]
lib/drmtest: fix logic fumble in gem_context_create

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68363
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agooverlay: Fix old mmio gpu busyness probing
Chris Wilson [Wed, 21 Aug 2013 08:16:25 +0000 (09:16 +0100)]
overlay: Fix old mmio gpu busyness probing

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Fix sampling of i915 perf event
Chris Wilson [Tue, 20 Aug 2013 22:19:45 +0000 (23:19 +0100)]
overlay: Fix sampling of i915 perf event

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Fix display of rc6 states
Chris Wilson [Tue, 20 Aug 2013 20:58:22 +0000 (21:58 +0100)]
overlay: Fix display of rc6 states

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Add copyright statements
Chris Wilson [Tue, 20 Aug 2013 20:39:27 +0000 (21:39 +0100)]
overlay: Add copyright statements

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Use the new i915 PMU to query GPU busyness
Chris Wilson [Tue, 20 Aug 2013 18:11:44 +0000 (19:11 +0100)]
overlay: Use the new i915 PMU to query GPU busyness

And so avoid having to hold forcewake indefinitely.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Take a snapshot on SIGUSR1
Chris Wilson [Tue, 20 Aug 2013 18:24:33 +0000 (19:24 +0100)]
overlay: Take a snapshot on SIGUSR1

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/pc8: Update to latest igt infrastructure
Daniel Vetter [Tue, 20 Aug 2013 20:03:30 +0000 (22:03 +0200)]
tests/pc8: Update to latest igt infrastructure

- Use igt_require for magic SKIP results while still printing results
  for all subtests.

- Wrap setup/teardown code outside of subtests with igt_fixture. This
  will ensure that the so wrapped code isn't run when an
  igt_require/igt_assert failed (and we're essentially just printing
  the SKIP/FAIL result for all subtests) or when just enumerating
  subtests.

- Use igt_exit. Otherwise SKIP/FAIL results of subtests won't be propagated
  correctly.

- igt_subtest checks should be run unconditionally to make sure we
  always enumerate the same set of subtests. A bit on the line here
  since this is a subtest hidden behind a runtime flag.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests: add pc8
Paulo Zanoni [Mon, 19 Aug 2013 16:20:02 +0000 (13:20 -0300)]
tests: add pc8

This test chekcs our code that enables Package C8+. The environment
requirements for this test are quite complicated:
  - The machine needs to be properly configured to reach PC8+ when
    possible, which means all the power management policies and device
    drivers must be properly configured.
  - You need at least one output connected.
  - You need the /dev/cpu/0/msr file available.
  - You need the /dev/i2c-* files available.

v2: - Many many changes due to the latest review comments and rebase.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agogitignore: Add a couple of recent binaries to .gitignore files
Damien Lespiau [Tue, 20 Aug 2013 17:56:54 +0000 (18:56 +0100)]
gitignore: Add a couple of recent binaries to .gitignore files

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoquick_dump: Use AM_V_GEN when generating the bindings
Damien Lespiau [Tue, 20 Aug 2013 17:55:16 +0000 (18:55 +0100)]
quick_dump: Use AM_V_GEN when generating the bindings

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agooverlay: Include gpu-perf.h for distribution
Damien Lespiau [Tue, 20 Aug 2013 17:52:53 +0000 (18:52 +0100)]
overlay: Include gpu-perf.h for distribution

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoassembler: Disable the declare test
Damien Lespiau [Tue, 20 Aug 2013 17:25:52 +0000 (18:25 +0100)]
assembler: Disable the declare test

It's not hitting a valid assertion that it tries to write an instruction
without a defined execution size (because the "default" exec_size never
end up being set).

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoassembler: Disable tests that where already failing in the gen4asm repo
Damien Lespiau [Tue, 20 Aug 2013 17:22:45 +0000 (18:22 +0100)]
assembler: Disable tests that where already failing in the gen4asm repo

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoassembler: Ignore make check output
Damien Lespiau [Tue, 20 Aug 2013 17:12:49 +0000 (18:12 +0100)]
assembler: Ignore make check output

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoassembler: Fix the path of intel-gen4asm
Damien Lespiau [Tue, 20 Aug 2013 17:02:37 +0000 (18:02 +0100)]
assembler: Fix the path of intel-gen4asm

With the move to intel-gpu-tools, we need to update that as well.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agoassembler: Revert "Fix missing environment variables problem in test/run-test.sh"
Damien Lespiau [Tue, 20 Aug 2013 16:58:48 +0000 (17:58 +0100)]
assembler: Revert "Fix missing environment variables problem in test/run-test.sh"

Same as:

  commit 497814f2f2828efdc5bdd787ebc490d5083f61b8
  Author: Damien Lespiau <damien.lespiau@intel.com>
  Date:   Tue Aug 20 14:52:05 2013 +0100

      assembler: Revert "Automatically run all test cases."

make check will define srcdir and buildir variables for us.

This reverts commit 1c009349bc894bd195b5522540536898b0bee574.

11 years agoassembler: Revert "Automatically run all test cases."
Damien Lespiau [Tue, 20 Aug 2013 13:52:05 +0000 (14:52 +0100)]
assembler: Revert "Automatically run all test cases."

The tests where supposed to be run through make check, not running the
"run-test.sh" standalone. So revert that patch to have make check work
as intended.

This reverts commit 6983eebf47f37def8f2315d5af1800b81644f240.

11 years agoassembler: Tune the error message for invalid send on gen6+
Damien Lespiau [Tue, 20 Aug 2013 13:25:52 +0000 (14:25 +0100)]
assembler: Tune the error message for invalid send on gen6+

And be a bit more descriptive.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agointel_infoframes: Be future-proof about showing 3D_Ext_Data
Damien Lespiau [Tue, 20 Aug 2013 13:20:06 +0000 (14:20 +0100)]
intel_infoframes: Be future-proof about showing 3D_Ext_Data

As Ville noted, future 3D_Struct must also send 3D_Ext_Data in the
vendor infoframe.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agobuild: Fix the overlay build summary at the end of configure
Damien Lespiau [Tue, 20 Aug 2013 13:18:58 +0000 (14:18 +0100)]
build: Fix the overlay build summary at the end of configure

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agolib: Make igt_assert() abort under gdb
Chris Wilson [Tue, 20 Aug 2013 11:45:55 +0000 (12:45 +0100)]
lib: Make igt_assert() abort under gdb

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agogem_evict_everything: Fix the error code checking after drmIoctl
Chris Wilson [Tue, 20 Aug 2013 11:40:56 +0000 (12:40 +0100)]
gem_evict_everything: Fix the error code checking after drmIoctl

drmIoctl doesn't return the errno, so look it up after an error.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests: Add gem_evict_everything
Chris Wilson [Tue, 20 Aug 2013 10:53:22 +0000 (11:53 +0100)]
tests: Add gem_evict_everything

Exercise the eviction logic. This is just a naive test to ensure that we
can evict old buffers to accommodate new batches, and in the process
trigger the evict everything logic.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Sample power every second
Chris Wilson [Tue, 20 Aug 2013 10:09:11 +0000 (11:09 +0100)]
overlay: Sample power every second

Found the bug, but still only read the msr once every second - mainly as
an exercise in handling different sample rates.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: use rc6_enable to drop useless information
Chris Wilson [Tue, 20 Aug 2013 10:08:13 +0000 (11:08 +0100)]
overlay: use rc6_enable to drop useless information

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Fix counting fail
Chris Wilson [Tue, 20 Aug 2013 09:58:02 +0000 (10:58 +0100)]
overlay: Fix counting fail

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Add graph for GPU power consumption
Chris Wilson [Tue, 20 Aug 2013 09:04:23 +0000 (10:04 +0100)]
overlay: Add graph for GPU power consumption

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Add rc6 residency
Chris Wilson [Tue, 20 Aug 2013 08:27:34 +0000 (09:27 +0100)]
overlay: Add rc6 residency

Not much point at the moment since we use forcewake to continuously
probe the GPU busyness. But that will eventually change to a more
power-efficient in-kernel.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotests/gem_concurrent_blit: Fix segmentation fault
Daniel Vetter [Tue, 20 Aug 2013 04:39:43 +0000 (06:39 +0200)]
tests/gem_concurrent_blit: Fix segmentation fault

Apparently the simple changes introduced in

commit 78865847f9fae7e590960f9836f2ec8b611a190e
Author:     Daniel Vetter <daniel.vetter@ffwll.ch>
AuthorDate: Mon Aug 19 07:23:49 2013 +0200
Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Mon Aug 19 08:09:25 2013 +0200

    lib/drmtest: skip fixtures after an igt_skip

pushed the stack space requirement for run_modes over some magic limit
(I guess where the strack grow logic starts to fail, but I didn't
check). Fix this by moving the data into .bss.

Also add some asserts to check that fixtures aren't abused while at
it (i.e. the useful parts of my debug printf/assert craze).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68299
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agooverlay: Wrap the colour index around the rgba array
Chris Wilson [Mon, 19 Aug 2013 22:29:08 +0000 (23:29 +0100)]
overlay: Wrap the colour index around the rgba array

And stop assigning colours beyond the end of the array. Still needs a
better method for colour assignment, big list of good colours & ida?

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Add missing include "debugfs.h"
Chris Wilson [Mon, 19 Aug 2013 21:26:01 +0000 (22:26 +0100)]
overlay: Add missing include "debugfs.h"

Later versions of gcc are apparently stricter.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Auatomatically mount debugfs
Chris Wilson [Mon, 19 Aug 2013 17:15:04 +0000 (18:15 +0100)]
overlay: Auatomatically mount debugfs

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agoquick_dump/bdw: use hex() to convert devid to hex string in error message
Mengdong Lin [Mon, 19 Aug 2013 00:36:03 +0000 (20:36 -0400)]
quick_dump/bdw: use hex() to convert devid to hex string in error message

This patch is to avoid the error on device auto-detection failure
"TypeError: Can't convert 'int' object to str implicitly".

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
11 years agotests: add kms_setmode
Imre Deak [Wed, 31 Jul 2013 08:59:38 +0000 (11:59 +0300)]
tests: add kms_setmode

Iterate through all valid/invalid crtc/connector combinations. At the
moment only clone configurations are tested as the single output cases
are tested already by testdisplay. Also from combinations where all
connectors are on the same crtc (clone-single-crtc) only those are
tested that are invalid, as I haven't found any machine that supports
these (have to be GT2 with dvo and vga output).

For configurations with one crtc per connector the FBs are per-crtc atm.

Signed-off-by: Imre Deak <imre.deak@intel.com>
11 years agolib: add subtest extra command line option handling
Imre Deak [Fri, 2 Aug 2013 23:10:11 +0000 (02:10 +0300)]
lib: add subtest extra command line option handling

At the moment any command line option handling done by tests will
interfere with the option handling of the subtest interface. To fix this
add a new version of the subtest_init function accepting optional short
and long command line options. Merge these together with the subtest
interface's own long options and handle both together in the same
getopt_long call.

Signed-off-by: Imre Deak <imre.deak@intel.com>
11 years agolib: handle SIGSEGV similarly to other error signals
Imre Deak [Fri, 2 Aug 2013 14:13:37 +0000 (17:13 +0300)]
lib: handle SIGSEGV similarly to other error signals

Signed-off-by: Imre Deak <imre.deak@intel.com>
11 years agolib: shorten DP/eDP connector names
Imre Deak [Fri, 2 Aug 2013 14:13:21 +0000 (17:13 +0300)]
lib: shorten DP/eDP connector names

Signed-off-by: Imre Deak <imre.deak@intel.com>
11 years agolib: export kmstest_get_connector_default_mode
Imre Deak [Thu, 1 Aug 2013 12:08:19 +0000 (15:08 +0300)]
lib: export kmstest_get_connector_default_mode

Signed-off-by: Imre Deak <imre.deak@intel.com>
11 years agolib/drmtest: igt_skip when drm_get_card fails
Daniel Vetter [Mon, 19 Aug 2013 09:09:25 +0000 (11:09 +0200)]
lib/drmtest: igt_skip when drm_get_card fails

Also add printf support to igt_skip to make sure there's always a
reason why we fail a testcase.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib/drmtest: extract gem_create_context
Daniel Vetter [Mon, 19 Aug 2013 08:55:28 +0000 (10:55 +0200)]
lib/drmtest: extract gem_create_context

libdrm requirements are now up to it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests: roll out igt_require some more
Daniel Vetter [Mon, 19 Aug 2013 08:47:53 +0000 (10:47 +0200)]
tests: roll out igt_require some more

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib/drmtest: rip out drm_open_any_master
Daniel Vetter [Mon, 19 Aug 2013 08:34:34 +0000 (10:34 +0200)]
lib/drmtest: rip out drm_open_any_master

It's unused. Also most of our tests failed to ask for the right type
of drm fd anyway. So it's imo better to just let them fall over when
they don't get master but want it, like they already do today.

This also allows us to garbage-collect the master parameter to
drm_get_card and associated code.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib/drmtest: Properly skip if no intel gfx supported
Daniel Vetter [Mon, 19 Aug 2013 05:57:03 +0000 (07:57 +0200)]
lib/drmtest: Properly skip if no intel gfx supported

drm/* kernel test nirvana!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib/drmtest: make igt_fail work outside of subtests
Daniel Vetter [Mon, 19 Aug 2013 05:28:42 +0000 (07:28 +0200)]
lib/drmtest: make igt_fail work outside of subtests

With the abortable fixtures we can now correctly fail all subsequent
sutbests if we hit upon an igt_assert outside of a subtest.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib/drmtest: skip fixtures after an igt_skip
Daniel Vetter [Mon, 19 Aug 2013 05:23:49 +0000 (07:23 +0200)]
lib/drmtest: skip fixtures after an igt_skip

This way we can just enclose all igt_skip/igt_require calls into
fixtures even when we have subtests, and still output correct SKIP
message for all of them. Wohoo, magic!

The only thing which doesn't work yet is enumerating failed subtests,
but I think that should work out on top of this.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agooverlay: Tweak label locations to include baseline offset.
Chris Wilson [Mon, 19 Aug 2013 07:20:15 +0000 (08:20 +0100)]
overlay: Tweak label locations to include baseline offset.

Still approximately, too lazy to query the metrics.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Add a X11 window backend
Chris Wilson [Sun, 18 Aug 2013 20:10:26 +0000 (21:10 +0100)]
overlay: Add a X11 window backend

Useful for remote hosts.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Tweak a couple of the fill colours to be slightly less horrid
Chris Wilson [Sun, 18 Aug 2013 18:20:24 +0000 (19:20 +0100)]
overlay: Tweak a couple of the fill colours to be slightly less horrid

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Don't smooth gpu freq
Chris Wilson [Sun, 18 Aug 2013 18:16:29 +0000 (19:16 +0100)]
overlay: Don't smooth gpu freq

This is supposed to be discrete jumps, so use straight lines to emphasis
this nature.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agotest/gem_dummy_reloc_loop: fix igt_require conversion
Daniel Vetter [Sun, 18 Aug 2013 17:58:28 +0000 (19:58 +0200)]
test/gem_dummy_reloc_loop: fix igt_require conversion

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68170
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agooverlay: Remove the double ':' from object comm names
Chris Wilson [Sun, 18 Aug 2013 17:54:04 +0000 (18:54 +0100)]
overlay: Remove the double ':' from object comm names

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Use a more compact 2x2 layout for the graphs
Chris Wilson [Sun, 18 Aug 2013 17:45:14 +0000 (18:45 +0100)]
overlay: Use a more compact 2x2 layout for the graphs

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Rearrange GUI state
Chris Wilson [Sun, 18 Aug 2013 17:40:03 +0000 (18:40 +0100)]
overlay: Rearrange GUI state

Planning a new layout...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Print min/max GPU frequencies.
Chris Wilson [Sun, 18 Aug 2013 17:27:47 +0000 (18:27 +0100)]
overlay: Print min/max GPU frequencies.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Convert gem objects to megabytes
Chris Wilson [Sun, 18 Aug 2013 17:24:43 +0000 (18:24 +0100)]
overlay: Convert gem objects to megabytes

Less confusing, I hope.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Parse gem objects
Chris Wilson [Sun, 18 Aug 2013 17:17:05 +0000 (18:17 +0100)]
overlay: Parse gem objects

Condense the information and begin graphing it. Remaining todo for
memory is to measure bind/evict flux, and perhaps clflush.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Add GPU frequency
Chris Wilson [Sun, 18 Aug 2013 15:42:25 +0000 (16:42 +0100)]
overlay: Add GPU frequency

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Include CPU usage in the overview chart
Chris Wilson [Sun, 18 Aug 2013 14:56:22 +0000 (15:56 +0100)]
overlay: Include CPU usage in the overview chart

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Count flips per plane
Chris Wilson [Sun, 18 Aug 2013 10:15:08 +0000 (11:15 +0100)]
overlay: Count flips per plane

Stop the misleading double-accounting of flips when we have multiple
displays active.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
11 years agooverlay: Improve the horizontal fit of the charts
Chris Wilson [Sat, 17 Aug 2013 22:50:21 +0000 (23:50 +0100)]
overlay: Improve the horizontal fit of the charts

Notably fix the fill boundary to not extend past the right hand side of
the chart.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>