summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2014-10-17lib: add common min and max macrosThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-17lib: various documentation fixesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-10tools/null_state_gen: Add GEN9 golden context batch buffer creationArmin Reese
Modifications to 'null_state_gen' so it can generate GEN9 golden context batch buffer source for SKL. v2: - rebased on top of gen8 changes (Mika) - fixed state base address command size (Mika) - base address size macro as pages (Mika) v3: - rebased on top of current master (Mika) - removed obsolete #includes (Mika) - added copyright (Mika) - render and component packing added (Mika) Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Armin Reese <armin.c.reese@intel.com> Cc: Volkin, Bradley D <bradley.d.volkin@intel.com> Reviewed-by: Volkin, Bradley D <bradley.d.volkin@intel.com> (v2) Signed-off-by: Armin Reese <armin.c.reese@intel.com> (v1) Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-10-09tools/null_state_gen: Add Gen8 golden stateMika Kuoppala
Previously we didn't have a clear understanding what is necessary for a pipeline state to be properly initialized. So we had to improvise and use a stripped out render copy. Now we have a more clear understanding so switch out render copy based frankenstate to state we can call golden state. v2: - export intel_batch_state_offset - add 3DSTATE_RASTER (Bradley Volkin) Cc: Volkin, Bradley D <bradley.d.volkin@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-10-02lib/Android.mk: add define of IGT_DATADIR for igt_fb.cTim Gore
Since the igt_create_stereo_fb function moved into igt_fb.c we need to add the definition of IGT_DATADIR in the Android makefile in order to build the cairo dependent tests. Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-01lib/igt_core.c: disable lowmemorykiller during testsTim Gore
Several IGT tests cycle through a lot of GEM memory and when running these tests on Android they tend to get killed by the lowmemorykiller. The lowmemorykiller really is not usefull in this context and is just preventing the test from doing its job. This commit adds a function to disable the lowmemorykiller by writing "9999" to its oom adj parameter, which means it will never "select" any process to kill. The normal linux oom killer is still there to protect the kernel. The low memory killer is disabled during the common init function and then re-enabled by the exit handler. To make this work for single tests the exit handler is now installed in the common init function also so that it is invoked for all tests. This is just a hack to get round the fact that the i915 driver uses the concept of purgeable memory which is not understood by the lowmemorykiller. If this ever gets fixed then this patch can be removed. Signed-off-by: Tim Gore <tim.gore@intel.com> [danvet: A bit of polish (coding style, static and rename check_igt_exit to common_exit_handler, drop the is_disabled check since we only call this once now).] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-30lib/aux: Print progress output at INFO levelDaniel Vetter
With the structured logging it makes more sense to tune this down a bit. Also, this way it is consistent with Thomas Wood's new activity indicator helper. Spotted while discussing Thomas' patch with him. v2: Thomas noticed that I've forgotten the fflush. Extract igt_interactive_info for both igt_progress and igt_print_activity. v3: Interactive output should go to stderr. Also extract the "is this a terminal" check. Cc: Thomas Wood <thomas.wood@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-30lib: add a function to indicate activityThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-30lib: ensure any buffers are flushed before forkThomas Wood
Flush any buffers before forking to prevent duplicated output. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-30doc: various spelling and typo fixesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-30tests/pm_rpm: factor out drm_open_any_masterImre Deak
Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-09-30lib/skl: Return the render copy and media fill functionsXiang, Haihao
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> [Ben: Reordered if tree] Signed-off-by: Ben Widawsky <benjamin.widawsky@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30mediafill/skl: Follow spec to configure media sampler DOP clock gating in ↵Zhao Yakui
PIPELINE_SELECTION Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30mediafill/skl: Follow spec to configure FORCE_MEDIA_AWAKE in PIPELINE_SELECTIONZhao Yakui
The FORCE_MEDIA_AWAKE bit is added for the PIPELINE_SELECTION command and some instructions requires that the media enginee is awake. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30mediafill/skl: Follow the spec to add pipeline_select maskZhao Yakui
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30mediafill/skl: follow the spec to update STATE_BASE_ADDRESS commandZhao Yakui
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30mediafill/skl: Start the gen9 media_fill from the gen8 versionZhao Yakui
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30rendercopy/skl: Set the URB VS start address to 4Xiang, Haihao
A value less than 4 might result in GPU hang on simulation Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30rendercopy/skl: Follow the spec to add the Pipeline selection maskZhao Yakui
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30rendercopy/skl: Emit 3DSTATE_WM_HZ_OPZhao Yakui
This is from that on BDW. Without it, the pixel pipeline can't work well. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30rendercopy/skl: Fix the 3DSTATE_DS instruction lengthZhao Yakui
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30rendercopy/skl: Fix the STATE_BASE_ADDRESS instruction lengthZhao Yakui
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30rendercopy/skl: Set Instruction Buffer size Modify Enable to 1Zhao Yakui
This is ported from that on BDW. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30rendercopy/skl: update instruction lengthZhao Yakui
This is ported from that on BDW. v2: Only bump the prefix when we need to program the instruction differently with the previous generations. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-09-30rendercopy/skl: Pass the context to rendercopy function on SKLZhao Yakui
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-09-30rendercopy/skl: Update 3DSTATE_SBEDamien Lespiau
SBE has now to be explicitely told which channels of which components are used by the pixel shader. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-09-30rendercopy/skl: Set the 3DSTATE_VF stateDamien Lespiau
This is to ensure the "Component Packing Enable" bit is set to 0. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-09-30rendercopy/skl: Start the gen9 rendercopy from the gen8 versionDamien Lespiau
v2 (Ben): Rebased on: commit ea11d103e0617e33bce6f11328521d15b13422b0 Author: Oscar Mateo <oscar.mateo@intel.com> Date: Tue Nov 12 11:50:35 2013 +0000 build: list all test/tool/lib source files in their own Makefile.sources v3: (Ben): Rebased on the doc/API rework. Probably needs review Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-09-30skl: initialize instdone bits for gen9Damien Lespiau
gen9 uses the same bits as gen8. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-09-30skl: Add gen9 to intel_gen()Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-09-30skl: Add SKL PCI idsDamien Lespiau
v2: Update to the latest PCI ids Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-09-29lib/igt_core: make single/simple tests use igt_exitTim Gore
Currently tests that use igt_simple_main will simply call "exit()" if they pass, making it difficult to ensure that any required cleanup is done. At present this is not an issue, but it will be when I submit a patch to turn off the lowmemorykiller for all tests. Signed-off-by: Tim Gore <tim.gore@intel.com> [danvet: Also update api docs.] Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-18lib: Add igt_plane_set_size()Ville Syrjälä
Allow tests to specify the plane size instead of assuming that the entire FB will be scanned out. To keep the current tests working without having to sprinkle igt_plane_set_size() calls all over the place, make igt_plane_set_fb() reset the plane size to the FB size. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-09-12lib: Try harder to drop-cachesChris Wilson
If at first we don't succeed, try again. (For as long as the errno says to at least!) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-09igt/gem_ppgtt: Create secondary contexts and mmChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-09test: Exercise full ppgtt switching between multiple fdChris Wilson
Load up both rings with lots of fighting between multiple contexts. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-08igt/gem_mmap_gtt: Check coherency between GTT and CPU mmappings with LLCChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-06aux: Squelch warning when emitting progress indicatorChris Wilson
commit 1649ef0d1f5c0e4f995a437bd24f1574a8b5100f Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Tue Aug 26 15:26:21 2014 +0200 lib/igt_* Use igt macros in igt libaries went a little too far here as the replacement macro was too clever. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-06core: Prettify igt_require_f outputChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-06lib/igt_fb: Ignore RGB888Chris Wilson
None of our display hardware supports the packed 24-bit format, so stop trying to use it and causing test failures. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78873&list_id=465068 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-06lib/igt_fb: Add debug output for creating fbChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-06core: Display subtest walltimeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-05lib: keep a list of modified connectors to resetThomas Wood
Avoid calling functions in igt_reset_connectors that are not safe to use in signal handlers by keeping a list of connectors that have been modified, instead of enumerating all connectors. v2: add space for a sentinel NULL value on forced_connectors and print a warning when the connector limit is reached (Chris Wilson) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83498 Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-05lib: don't force HDMI or DP connectors on HSW and BDWThomas Wood
Forcing HDMI or DP connectors on these platforms doesn't currently work, so fail early to allow the test to skip if required. v2: restrict to HSW and BDW (Daniel Vetter) Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-05lib/igt_fb: ensure igt_create_fb parameters are consistentThomas Wood
Make sure the parameters in the prototype and implementation of igt_create_fb match and are complete so that the documentation is correct. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-05lib: move create_stereo_fb from testdisplay to igt_fbThomas Wood
Move create_stereo_fb from testdisplay to igt_create_stereo_fb in igt_fb so that it can be used in other tests. v2: update for new igt_create_fb API add parameters for format and tiling remove some old debug code Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-05lib: add kmstest_edid_add_3dThomas Wood
kmstest_edid_add_3d adds an EDID extension block with 3D support to a copy of the specified EDID. v2: Avoid using an invalid CEC SPA (Clint Taylor) Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-05lib: Add MI_LOAD_REGISTER_IMMMika Kuoppala
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-09-05lib/gen6_render: fix GEN6_3DSTATE_VF_STATISTICS defineMika Kuoppala
We dont use this pre CTG and we will need it for gen8 golden state. Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-09-05lib/rendercopy: fix a typo in defineMika Kuoppala
No functional changes Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>