119 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
969be9e43e drop obsolete #ifdef HAVE_CONFIG_H
the config.h file is always present

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:40:22 +01:00
Enrico Weigelt, metux IT consult
fc8fd35b86 test: drop dead code
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-24 15:08:15 +02:00
Enrico Weigelt, metux IT consult
5b60b8c27b Define __container_of only if not defined yet.
Silence warnings.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-05-27 11:44:19 +02:00
Ville Syrjälä
fc07603ee0 Fix transposed calloc() arguments
gcc-14 complains:
../src/legacy/i810/i810_dri.c:281:48: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
...

Fix them all up via cocci:
@@
expression E1, E2;
type T;
@@
(
- calloc(sizeof(T), E2)
+ calloc(E2, sizeof(T))
|
- calloc(sizeof(E1), E2)
+ calloc(E2, sizeof(E1))
)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2025-02-10 19:53:46 +02:00
Liwei Song
8c2c0a080f Sync i915_pciids upto 8717c6b7414f
Import the kernel's i915_pciids.h, up to:

commit 8717c6b7414ffb890672276dccc284c23078ac0e
Author: Lee Shawn C <shawn.c.lee@intel.com>
Date:   Tue Dec 10 23:04:15 2019 +0800

    drm/i915/cml: Separate U series pci id from origianl list.

Signed-off-by: Liwei Song <liwei.song@windriver.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2020-04-21 12:28:48 +01:00
Chris Wilson
e9cd8c211d pciids: Update for missing Skylake IDs
Sync with kernel commit ca7a45ba6fb9e7ceca56d10b91db29c2f3451a2e
Author: Michał Winiarski <michal.winiarski@intel.com>
Date:   Mon Feb 27 12:22:56 2017 +0100

    drm/i915/skl: Add missing SKL ID

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-27 20:43:06 +00:00
Chris Wilson
d9a32dc657 sna/dri2: Assert signal is unset before setting
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-10-04 12:55:07 +01:00
Chris Wilson
8f33f80100 test/present: Busy spin on the idle fence
Avoid the unix socket + libxcb to maximise the throughput.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-23 12:14:04 +01:00
Chris Wilson
0ffae5601b test/present: Look at scaling to many tiny windows
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-22 11:23:36 +01:00
Chris Wilson
8d6c8191e5 test/present: Stress multiple threads sending present requests
At the kernel level, threads and processes are identical - they each get
a fair share of CPU time. From this we can surmise the cause of any
variation between threads and processes. If the threads are balanced
(each thread completing the same number of requests), but the processes
have unbalanced numbers, we know that X is not as fair.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-20 14:07:19 +01:00
Chris Wilson
47cd7fdd0b test: Exercise XVidMode switching
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-04 12:34:37 +01:00
Chris Wilson
ebe86fdaa9 test/dri2-race: Don't leak the Display after detecting the race
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-30 14:44:55 +01:00
Chris Wilson
c186d4dda3 sna/present: Restrict vblank.sequence range to 31bits
The kernel checks for past vblanks using an int32_t comparison, so we
can only program up to 31bits into the future (and similarly programing
a timer that large would also overflow).

References: https://bugs.freedesktop.org/show_bug.cgi?id=94685
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-24 18:30:50 +00:00
Chris Wilson
68913715a2 test: Look at Present scaling with number of cpus
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-16 14:18:56 +00:00
Chris Wilson
cd864c0055 tests: Anticipate Present reporting too early
Given Present bugs, any completion event may be sent too early and
out-of-order. Make sure we drain all outstanding events before
continuing on to the next test.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-16 14:18:56 +00:00
Chris Wilson
e042b5d825 tests: Add DRI2 race against window resize + Composite redirection
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-16 09:47:24 +00:00
Chris Wilson
a0bf3c1f48 test/present: Catch FPE when notifies are broken
If the Xserver reports 10 frames passed instantaneously, flag an error
rather than divide by zero.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-15 21:30:49 +00:00
Chris Wilson
b2cd809fe2 test/dri2-race: Tweak runtimes
When we specify a divider we are looking for slightly different races
that are in theory not so timing dependent (since we are using vrefresh
windows). However, since they each take some multiple of vblanks to
complete, they are much slower. We should be able to reduce the number
of iterations without losing detection capability.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-13 08:49:21 +00:00
Chris Wilson
de7407d207 test/dri2-race: Add a set of races against Client death
Try terminating the client using XKillClient and seeing if we can find
any races with Client shutdown.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-10 11:56:08 +00:00
Chris Wilson
3aab368412 test/dri2-race: Use loops for iterating over divisor tests
Expand the test cases slightly to check high dividers everywhere.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-10 10:50:04 +00:00
Chris Wilson
1c95b7e811 test/dri2-test: Add WaitMSC accuracy tests
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-03 09:58:05 +00:00
Chris Wilson
65e6bae3ac test: Add present-race
A simple demonstration of what may go wrong when a Window is destroyed
by another client such as the window-manager.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-03 09:58:04 +00:00
Chris Wilson
84e824873b test/dri2-race: Capture race between window-manger and clients
If the window manager closes the Window before the client disconnects,
we can end up with a blocked client as dri2 does not call AttendClient()
in its DRI2DrawableGone.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-02 17:19:48 +00:00
Chris Wilson
66e16d97ee test: Exercise copyplane
Reported-by: Omar Sandoval
References: https://bugs.freedesktop.org/show_bug.cgi?id=91499
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-29 09:45:47 +01:00
Chris Wilson
324ba96520 tests/render-trapezoid: Add edge tests
Check fidelity of edge rendering, just a variant of render-triangle

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-19 10:45:37 +01:00
Chris Wilson
3852977f14 test: Add a fidelity test for triangle edge rendering
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-18 13:14:42 +01:00
Chris Wilson
d4c82a16bc test: Remove the blit through a temporary Pixmap
Originally this was inplace so that we wouldn't simply migrate the
target away from the GPU whenever we inspected results. That is no
longer a problem and so we can speed up the tests by skipping the
temporary.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-18 09:16:12 +01:00
Chris Wilson
b10ef9cf5c sna/glyphs: Improve handling of low bitdepth mask format conversions
We shouldn't just discard the mask if the user requests that we render
the glyphs through a low bitdepth mask - and in doing so we should also
be careful not to improve the bitdepth of that mask (since we don't take
into account the extra quantisation desired).

Testcase: render-glyphs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-05-18 09:05:30 +01:00
Chris Wilson
65cc48757e test/present: Do a double flip to test tiling changes
Since the first flip may require a fixup, we will only really know with
the second flip whether we can start a flip chain with different tiling.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-21 15:06:18 +01:00
Chris Wilson
75037efcd7 test/dri3: Add an explicit DRI3 extension check first
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-20 15:00:47 +01:00
Chris Wilson
7eaf593640 sna/present: Reuse last cached swap msc/ust during a flip chain
Querying the known swap values is much slower than not!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-18 12:37:42 +01:00
Chris Wilson
c47fd1dcad test/present: Synchronize MSC notifiy modulus test to the vblank
As the test presumes we can queue all the modulus queries within the
same vblank, we can improve matters by synchronizing to the next vblank
first.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-06 14:02:41 +01:00
Chris Wilson
a00ed98131 test/present-speed: Disable idle event reporting for no-copy overhead test
Reduce the overheads in the server for better measurements.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-06 11:39:49 +01:00
Chris Wilson
d348f897c8 test/present: Expland MSC accuracy test
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 21:33:40 +01:00
Chris Wilson
6de85a1e60 test/present: Include composite redirected windows in the test matrix
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 21:13:38 +01:00
Chris Wilson
990ca393fd test/present-speed: Reneable normal testing
Oops, debug leftover.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 17:13:54 +01:00
Chris Wilson
f4588b64e2 test/present-speed: Export the pixmap over DRI3
Improve the DRI3 simulation by exporting the Pixmap to force DRI3
syncflushes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 17:03:02 +01:00
Chris Wilson
af2da32574 test/present-speed: More measurement for different swap methods
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 10:52:21 +01:00
Chris Wilson
fd12095f89 test/present: Also test swaps on windows (as well as full screen flips)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-05 10:52:21 +01:00
Chris Wilson
61da72c076 test/present-speed: More buffers required to hit maximal framerates
5 buffers are required for swap elision, plus an extra or two for IPC
scheduling jitter.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-04 19:38:49 +01:00
Chris Wilson
459efa036e test/dri2: Reset swap-interval after testing async swapping
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-02 22:50:54 +01:00
Chris Wilson
3c3f7d7df4 test/dri2: Check vblank waits
Make sure that waiting 60 times for a vblank, 60 msc pass

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-02 22:50:19 +01:00
Chris Wilson
0814dc41c3 test/present-speed: Include a measure for fence signalling overhead
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-02 15:13:43 +01:00
Chris Wilson
019402f8ca test: Test tiling across DRI3/Present
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-24 17:27:15 +00:00
Chris Wilson
9e39bea9d3 tests: Add basic present benchmark
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-20 14:40:09 +00:00
Chris Wilson
1877c8f508 test/present: Compact flip queue checks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-16 12:00:20 +00:00
Chris Wilson
b9eeb9dd84 test/present: Tighten MSC modulus computation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-16 09:45:17 +00:00
Chris Wilson
3382bd78d9 test/present: Test notifier accuracy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-15 19:21:01 +00:00
Chris Wilson
35ab0afd04 test/present: Automatically disable DPMS
DPMS plays havoc with Present timings, make sure the screen doesn't turn
off.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-12 21:10:25 +00:00
Chris Wilson
9eb0ab15b1 test/present: Look for MSC wraparound
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-12 17:10:13 +00:00