3528 Commits

Author SHA1 Message Date
Ville Syrjälä
e5e7a53071 lib: Add i854 PCI ID
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
978881801e tools/intel_iosf_sb_read: Support different register strides
Some IOSF SB units ogranize their registers in a pecualiar way. Even
though the registers are 32 bits wide, the register offsets only
increment by one when going from one register to the next. Correctly
deal with this when dumping several consecutive registers.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
bd692becf7 tools/intel_iosf_sb_read: Add -c command line option like intel_reg_read
Add a command line option '-c <count>' that can be used to read set of
consecutive registers without having to specify the offset for each of
them.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
dcb3edf2a9 tools/intel_iosf_sb_*: Support reading/writing multiple registers at once
Allow the user to specify a list of registers to read, and register/value
pairs to write.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
0461e8cf43 tools/intel_iosf_sb_*: Use getopt() to parse the options
I want to add some command line options so switch to getopt() to make
that easier.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
38e3c58cba tools/intel_iosf_sb_*: Replace if ladder with an array and bsearch()
Replace the silly strcasecmp() if ladder with and array that maps the
unit names to port numbers. And keep the thing sorted so we can do
the lookup with bsearch() for extra speed :)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
29ebc68313 tools: Remove intel_dpio_{read,write} tools
intel_dpio_{read,write} as redundant as intel_iosf_sb_{read,write}
handle the same task.

The difference between the tools was the opcode used to read/write the
registers, but with DPIO both opcodes work just fine, so there's no need
for both sets of tools.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
0129b02c7b toos/intel_iosf_sb_*: Fix DPIO IOSF SB port number
The correct port is 0x12, not 0x13 which is actually GPIO_NC.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
ac28ecefe0 lib: Allow 32bit addresses for IOSF-SB registers
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
0a3ef582da lib: Change IOSF SB devfn to 0.0
The devfn field in the IOSF SB messages is only relevant when there's a
real PCI bus or some other multifunction device behind a single port.
Otherwise the port number itself is enough to uniquely identify the
target. In fact some IOSF SB targets reject the access when devfn is not
0.0 (eg. GPIO_NC on BYT).

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Damien Lespiau
06a9c35664 quick_dump/skl: Add power well registers
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-24 11:58:57 +00:00
Jesse Barnes
392e8ee75f tests/pm_rps: add test descriptions
Document a copule of the subtests with their purpose, methods, and
expected results.

Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-03-23 12:50:48 -07:00
Daniel Vetter
1765838e34 tests/gem_tiled_swapping: Fix up L-shaped testing
I've fumbled this, resulting in this this skipping everywhere.
Unfortunately no QA test report for this regression ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-03-23 11:02:28 +01:00
Daniel Vetter
a5934091b8 tests/gem_exec_lut_handle
Reduce default number of repeats a lot. High repeat count is only
useful for microbenchmarking, not that much for regression testing.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87131
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23 11:02:28 +01:00
Daniel Vetter
a5c6b8df8b tests/kms_cursor_crc: Add dpms and suspend tests
There was some confusion about whether we restore cursors correctly
after dpms and suspend/resume. Apparently we still do!

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23 11:02:28 +01:00
Daniel Vetter
d297e58529 lib: Only warn about suspicious CRCs
It is theoretically possible to hit these in the wild, so only warn
about them. Dropping the test is probably too much since these caught
some real bugs in the past.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23 11:02:28 +01:00
Daniel Vetter
562bbe12f6 tests: Remove usage of igt_crc_equal and _non_null
Tests should positively check for crc matches, not for mismatches.
Enforce this by only exposing and igt_assert function for comparing
crcs.

For the few tests which didn't just do this as consistency checks but
to do functional tests add FIXME comments that some reference crc
values are missing.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23 11:02:28 +01:00
Daniel Vetter
e588f6dfa6 lib/debugfs: Add igt_assert_crc_equal
Because of hash collisions tests should only ever compare crc
checksums for equality. Checking for inequality can result in random
failures.

To ensure this only expose and igt_assert function and use that.
Follow-up patches will rework the code for tests which don't follow
this requirement and try to compare for CRC inequality.

v2: Rebase on top of Matt's kms_plane changes.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23 11:02:28 +01:00
Daniel Vetter
4fec18e5e0 lib/core: add interactive debug point to igt_fail
Useful for inspecting the screen state in kms tests when they fail.

Also move the screen clearing in kms_cursor_crc to the bottom.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23 11:02:28 +01:00
Chris Wilson
e7d26df419 igt/kms_vblank: Simple harness for measuring speed of drmWaitVBlank
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-19 15:33:51 +00:00
Chris Wilson
a72d405629 igt/gem_concurrent_blit: Test copying over itself
Suggested by Lionel Landwerlin as a means to emulate video decode
workloads.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-19 10:14:34 +00:00
Chris Wilson
ea4aa70f3c igt/gem_wait: When waiting for infinity, an infinity remains
Incorrect testing of out parameters leads to bug noise...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89494#c4
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-19 08:37:51 +00:00
Chris Wilson
1d0aa69f55 igt/gem_exec_nop: Enlighten the failure error message
References: https://bugs.freedesktop.org/show_bug.cgi?id=89633
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-18 08:47:13 +00:00
Chris Wilson
484c1a6f1c igt/gem_read_read_speed: Speed up batch submission
Create the RCS and BCS batches once and reuse them to avoid the
rewriting and relocation overhead on every submission - the goal is to
focus on the interring synchronisation overhead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-18 08:37:33 +00:00
Chris Wilson
d3e9316b44 lib/batch: Fix range checks for blits
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-18 08:37:33 +00:00
Chris Wilson
233808a58d lib/batch: Trivial compile fix for 32-bit builds
intel_batchbuffer.c: In function 'fill_object':
intel_batchbuffer.c:589:20: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  obj->relocs_ptr = (uint64_t)relocs;
                    ^
intel_batchbuffer.c: In function 'exec_blit':
intel_batchbuffer.c:598:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  exec.buffers_ptr = (uint64_t)objs;

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-18 08:37:33 +00:00
Chris Wilson
a172676488 igt/gem_concurrent_blt: Test overwrite source used for read-read optimisation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-17 09:43:52 +00:00
Chris Wilson
35b0ac99fc igt/gem_concurrent_blit: Exercise concurrent reads
Since we are considering implementing read-read optimisations for mixed
engine workloads, make sure that we at least have a few tests that check
for coherency when doing so.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-17 09:43:52 +00:00
Chris Wilson
99b5ee8aaa igt/gem_concurrent_blit: Move buffer allocation after requires
The choice is to either move the igt_require from the buffer allocation
(and allow the allocation to fail) inside the igt_fixture, or move the
buffer allocation to the subtest. Moving it to the subtest has the
advantage of ensuring that every test has the same initial state (no
chance of leaking state across tests) and speeding up running a single
subtest.

Note this is necessary in order to run igt/gem_concurrent_blit on older
kernels, otherwise the requirement for mmap(wc) causes us to skip the
majority of tests.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-17 09:43:52 +00:00
Chris Wilson
ed7e33451e igt: Add benchmark for read-read optimisation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-17 09:43:52 +00:00
Daniel Vetter
505645c2ab tests: Rename core_getparams to drv_getparams
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-13 17:59:22 +01:00
Jeff McGee
ae339f0977 tests/core_getparams: Create new test core_getparams
New test core_getparams consists of 2 subtests, each one testing
the ability of userspace to query the correct value of a GT config
attribute: subslice total or EU total. drm/i915 implementation of
these queries is required for Cherryview and Gen9+ devices (non-
simulated).

v2: Duplicate small amount of new libdrm functionality to avoid
    bumping libdrm version requirement (Daniel). Convert some
    igt_asserts to the appropriate comparison variants. Add a
    test description.
v3: Actually use the LOCAL GETPARAM defines. Otherwise can't build
    against older libdrm as intended by v2.

For: VIZ-4636
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-03-13 17:31:45 +01:00
Daniel Vetter
7655606532 NEWS: Post-release bump
Let's prep for more cool stuff!

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-13 09:37:49 +01:00
Thomas Wood
e3e659163f Update version to 1.10 and add the release date
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-12 17:06:54 +00:00
Thomas Wood
3b8e121552 lib: small documentation fixes
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-12 17:05:18 +00:00
Thomas Wood
595575b9cb Remove old entries from .gitignore files
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-12 16:32:17 +00:00
Thomas Wood
a6c40c7665 lib: move igt_interactive_debug into igt_core.c
igt_interactive_debug should be defined in igt_core.c, rather than the
header, to avoid it being defined more than once.

Reported-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-12 15:11:11 +00:00
Damien Lespiau
dde047fe2c lib/fb: Use PRIx64 for uint64_t in format string
Fix the following warning:

  igt_fb.c: In function 'igt_create_fb_with_bo_size':
  igt_fb.c:414:2: warning: format '%llx' expects argument of type
    'long long unsigned int', but argument 9 has type 'uint64_t' [-Wformat=]

  igt_debug("%s(width=%d, height=%d, format=0x%x [bpp=%d], tiling=%llx, size=%d\n",

introduced by commit:

  commit e36091d1c7010e825897dc4487f9985ab353973b
  Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
  Date:   Tue Mar 3 14:11:01 2015 +0000

      tiling: Convert framebuffer helpers to use fb modifiers

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12 14:33:36 +00:00
Tvrtko Ursulin
b1177831ab tests/kms_flip_tiling: Exercise Y tiling modes on Gen9+
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:24:27 +00:00
Damien Lespiau
7b8ba120b9 testdisplay/skl: Add command line options for Yb/Yf tiled fbs
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12 14:24:21 +00:00
Damien Lespiau
ff451a6d43 lib: Allow the creation of Ys/Yf tiled FBs
There's no fencing for those tiling layouts, so we create a linear bo
for cairo to play with, and when cairo is finished with it, we do a fast
copy blit to the fb BO with its final tiling.

v2: Move to correct domain after CPU is done with the object (-EINVAL). (Tvrtko Ursulin)
    Correct arguments passed in to framebuffer creation (segfault). (Tvrtko Ursulin)
    Pass zero stride to kernel as it expects for Yf&Ys. (Tvrtko Ursulin)

v3: Rebase for gem_mmap__cpu changes. (Tvrtko Ursulin)

v4: Rebase for addfb2.5. (Tvrtko Ursulin)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:24:18 +00:00
Tvrtko Ursulin
eb93c1b33e lib/igt_fb: Use new ADDFB2 extension for new tiling modes
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:24:11 +00:00
Tvrtko Ursulin
c7bac3c62a lib: Add support for new extension to the ADDFB2 ioctl.
New functionality accessesed via the __kms_addfb wrapper.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:24:05 +00:00
Tvrtko Ursulin
e36091d1c7 tiling: Convert framebuffer helpers to use fb modifiers
This converts the IGT API only, underneath legacy set_tiling is still used.

v2: One got away in kms_flip.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12 14:23:48 +00:00
Damien Lespiau
672e88acb7 lib: Provide a raw version of the gen9 fast copy blits
So we can use it with bare kernel types, without going through libdrm
bos.

v2: Don't forget the object handle. (Tvrtko)
    Correct surface pitch calculation. (Tvrtko)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:20:10 +00:00
Damien Lespiau
6533d113a9 lib: Split two helpers to build fast copy's dword0 and dword1
Again, these helpers will be useful for a raw version of the gen9 fast
copy.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12 14:20:08 +00:00
Damien Lespiau
130221b3b5 lib: Don't give a struct igt_buf * to fast_copy_pitch()
So we can use this function in a "raw" (ie without igt_buf) version.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12 14:19:57 +00:00
Damien Lespiau
cbd927cd35 lib/skl: Add gen9 specific igt_blitter_fast_copy()
v2: Adjust for BB handling changes. (Tvrtko Ursulin)
    Correct XY_FAST_COPY_DST_TILING_Yf. (Tvrtko Ursulin)

v3: New tiling modes are not defined in the kernel any more. (Tvrtko Ursulin)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:19:41 +00:00
Tvrtko Ursulin
0c15e068a5 tests/kms_addfb: Y tiled testcases
v2: Moved all init into fixtures.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:15:26 +00:00
Tvrtko Ursulin
0a087733d2 tests/kms_addfb: Add support for fb modifiers
Just a few basic tests to make sure fb modifiers can be used and
behave sanely when mixed with the old set_tiling API.

v2:
   * Review feedback from Daniel Vetter:
      1. Move cap detection into the subtest so skipping works.
      2. Added some gtkdoc comments.
      3. Two more test cases.
      4. Removed unused parts for now.

v3:
   * Removed two tests which do not make sense any more after the
     fb modifier rewrite.

v4:
   * Moved gtkdoc comments into .c file.
   * Moved all initialization into fixtures.
   * Rebased for fb modifier changes.

v5:
   * Added bad modifier subtest.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:14:27 +00:00