more i-g-t docs and api polish
cover more i-g-t docs and api polish
Hi all,
So this thing turned out to be fairly ugly overall, and I don't think it's worth the effort to polish the series through some giant rebasing. make distcheck still works so I don't think I've fumbled this too badly and will hence just push the patches as-is.
I'm still very much interested in feedback, I'll simply apply that as follow-up patches.
For those who want a peak at what the i-g-t docs look like now:
http://people.freedesktop.org/~danvet/igt/
Everything but the modeset helpers is now neatly documented, with some intro texts where useful. I think for the igt_display/kms libraries we first need to give the apis a bit more polish before documentation makes sense. There's still an awful lot of boilerplate going on in kms tests ...
Cheers, Daniel
Daniel Vetter (28):
lib: rename intel_pci.c to intel_chipset.c
lib: consolidate chipset helpers in intel_chipset.[hc] lib/intel_chipset: intel_ prefix for pch global lib/intel_chipset: api docs
lib: make rendercopy.h an internal header
lib: make media_fill.h an internal header lib/intel_batchbuffer: un-inline buf_height/width lib/intel_batchbuffer: igt_ namespace for the buffer structure lib/intel_batchbuffer: igt_ prefix for rendercopy/mediafill funcs lib/intel_batchbuffer: drop cpu_mapping from igt_buf lib/intel_batchbuffer: api documentation for render copy/media fill
lib: Move non-register things out of intel-gpu-tools.h tests|lib: remove assert.h includes
lib: add #include "foo.h" lines like in manpages
lib: remove uncessary #includes from headers
lib: more unecessary header removal
lib: unnecessary header removal for drmtest.h, part 1
lib: unnecessary header removal for drmtest.h, part 2
lib: rename intel_gpu_tools.h to intel_io.h lib/intel_io: rename mmio setup functions
lib/intel_io: api documentation
lib: s/drmtest_dumb_aub/igt_aub_dump_enabled/
lib: extract igt_aux.[hc]
lib/igt_aux: api documentation
lib: s/igt_env_set/igt_check_boolean_env_var
lib: Use @include tag for include files
lib/drmtest: api documentation
lib/intel_batchbuffer: document header dependencies
benchmarks/intel_upload_blit_large.c | 9 +- benchmarks/intel_upload_blit_large_gtt.c | 3 +- benchmarks/intel_upload_blit_large_map.c | 3 +- benchmarks/intel_upload_blit_small.c | 3 +- debugger/debug_rdata.c | 3 +- debugger/eudb.c | 2 +- demos/intel_sprite_on.c | 7 +- .../intel-gpu-tools/intel-gpu-tools-docs.xml | 5 +- lib/Makefile.sources | 9 +- lib/drmtest.c | 243 +++----------- lib/drmtest.h | 80 +++-- lib/gen6_render.h | 8 - lib/gen7_media.h | 2 + lib/gen8_media.h | 2 + lib/igt_aux.c | 373 +++++++++++++++++++++ lib/igt_aux.h | 67 ++++ lib/igt_core.c | 9 +- lib/igt_core.h | 7 + lib/igt_debugfs.c | 3 + lib/igt_debugfs.h | 3 +- lib/igt_kms.c | 14 +- lib/igt_kms.h | 10 +- lib/intel_batchbuffer.c | 93 ++++- lib/intel_batchbuffer.h | 96 +++++- lib/intel_chipset.c | 215 ++++++++++++ lib/intel_chipset.h | 26 ++ lib/intel_drm.c | 200 ----------- lib/intel_gpu_tools.h | 126 ------- lib/intel_io.h | 81 +++++ lib/intel_iosf.c | 61 +++- lib/intel_mmio.c | 133 +++++++- lib/intel_os.c | 171 ++++++++++ lib/intel_pci.c | 123 ------- lib/intel_reg_map.c | 3 +- lib/ioctl_wrappers.c | 6 +- lib/ioctl_wrappers.h | 5 + lib/media_fill.c | 14 - lib/media_fill.h | 49 +-- lib/media_fill_gen7.c | 16 +- lib/media_fill_gen8.c | 16 +- lib/rendercopy.h | 71 +--- lib/rendercopy_gen6.c | 51 ++- lib/rendercopy_gen7.c | 44 ++- lib/rendercopy_gen8.c | 58 ++-- lib/rendercopy_i830.c | 64 ++-- lib/rendercopy_i915.c | 30 +- tests/core_get_client_auth.c | 2 +- tests/core_getclient.c | 3 + tests/core_getstats.c | 5 + tests/ddi_compute_wrpll.c | 3 +- tests/drm_vma_limiter.c | 5 +- tests/drm_vma_limiter_cached.c | 5 +- tests/drm_vma_limiter_cpu.c | 5 +- tests/drm_vma_limiter_gtt.c | 5 +- tests/drv_suspend.c | 11 +- tests/eviction_common.c | 1 + tests/gem_bad_address.c | 5 +- tests/gem_bad_batch.c | 5 +- tests/gem_bad_blit.c | 5 +- tests/gem_bad_length.c | 2 +- tests/gem_basic.c | 2 +- tests/gem_caching.c | 10 +- tests/gem_close_race.c | 3 +- tests/gem_concurrent_blit.c | 10 +- tests/gem_cpu_reloc.c | 10 +- tests/gem_cs_prefetch.c | 10 +- tests/gem_cs_tlb.c | 9 +- tests/gem_ctx_bad_destroy.c | 4 +- tests/gem_ctx_bad_exec.c | 2 +- tests/gem_ctx_basic.c | 24 +- tests/gem_ctx_create.c | 4 +- tests/gem_ctx_exec.c | 8 +- tests/gem_double_irq_loop.c | 5 +- tests/gem_dummy_reloc_loop.c | 5 +- tests/gem_evict_alignment.c | 8 +- tests/gem_evict_everything.c | 3 +- tests/gem_exec_bad_domains.c | 5 +- tests/gem_exec_big.c | 2 +- tests/gem_exec_blt.c | 4 +- tests/gem_exec_faulting_reloc.c | 4 +- tests/gem_exec_lut_handle.c | 2 +- tests/gem_exec_nop.c | 4 +- tests/gem_fd_exhaustion.c | 3 + tests/gem_fence_thrash.c | 34 +- tests/gem_fenced_exec_thrash.c | 8 +- tests/gem_flink.c | 2 +- tests/gem_flink_race.c | 3 +- tests/gem_gtt_cpu_tlb.c | 4 +- tests/gem_gtt_hog.c | 3 +- tests/gem_gtt_speed.c | 2 +- tests/gem_hang.c | 5 +- tests/gem_hangcheck_forcewake.c | 5 +- tests/gem_largeobject.c | 2 +- tests/gem_linear_blits.c | 12 +- tests/gem_lut_handle.c | 2 +- tests/gem_madvise.c | 2 +- tests/gem_media_fill.c | 29 +- tests/gem_mmap.c | 2 +- tests/gem_mmap_gtt.c | 2 +- tests/gem_mmap_offset_exhaustion.c | 2 +- tests/gem_non_secure_batch.c | 5 +- tests/gem_partial_pwrite_pread.c | 12 +- tests/gem_persistent_relocs.c | 12 +- tests/gem_pin.c | 9 +- tests/gem_pipe_control_store_loop.c | 5 +- tests/gem_pread.c | 2 +- tests/gem_pread_after_blit.c | 12 +- tests/gem_pwrite.c | 2 +- tests/gem_pwrite_pread.c | 5 +- tests/gem_readwrite.c | 2 +- tests/gem_reg_read.c | 4 +- tests/gem_reloc_overflow.c | 5 +- tests/gem_reloc_vs_gpu.c | 12 +- tests/gem_render_copy.c | 40 ++- tests/gem_render_linear_blits.c | 31 +- tests/gem_render_tiled_blits.c | 27 +- tests/gem_reset_stats.c | 11 +- tests/gem_ring_sync_copy.c | 21 +- tests/gem_ring_sync_loop.c | 5 +- tests/gem_ringfill.c | 26 +- tests/gem_seqno_wrap.c | 22 +- tests/gem_set_tiling_vs_blt.c | 5 +- tests/gem_set_tiling_vs_gtt.c | 5 +- tests/gem_set_tiling_vs_pwrite.c | 4 +- tests/gem_storedw_batches_loop.c | 7 +- tests/gem_storedw_loop_blt.c | 5 +- tests/gem_storedw_loop_bsd.c | 5 +- tests/gem_storedw_loop_render.c | 5 +- tests/gem_storedw_loop_vebox.c | 5 +- tests/gem_stress.c | 87 +++-- tests/gem_threaded_access_tiled.c | 2 +- tests/gem_tiled_blits.c | 12 +- tests/gem_tiled_fence_blits.c | 10 +- tests/gem_tiled_partial_pwrite_pread.c | 12 +- tests/gem_tiled_pread.c | 5 +- tests/gem_tiled_pread_pwrite.c | 9 +- tests/gem_tiled_swapping.c | 9 +- tests/gem_tiling_max_stride.c | 5 +- tests/gem_unfence_active_buffers.c | 5 +- tests/gem_unref_active_buffers.c | 5 +- tests/gem_vmap_blits.c | 5 +- tests/gem_wait_render_timeout.c | 22 +- tests/gem_write_read_ring_switch.c | 12 +- tests/gen3_mixed_blits.c | 5 +- tests/gen3_render_linear_blits.c | 5 +- tests/gen3_render_mixed_blits.c | 5 +- tests/gen3_render_tiledx_blits.c | 5 +- tests/gen3_render_tiledy_blits.c | 5 +- tests/gen7_forcewake_mt.c | 5 +- tests/igt_fork_helper.c | 1 + tests/igt_simulation.c | 2 + tests/kms_addfb.c | 2 +- tests/kms_cursor_crc.c | 1 + tests/kms_fbc_crc.c | 12 +- tests/kms_flip.c | 17 +- tests/kms_pipe_crc_basic.c | 1 + tests/kms_plane.c | 1 + tests/kms_render.c | 7 +- tests/kms_setmode.c | 27 +- tests/pm_lpsp.c | 2 + tests/pm_pc8.c | 5 +- tests/pm_psr.c | 2 + tests/pm_rc6_residency.c | 2 + tests/pm_rps.c | 8 +- tests/prime_nv_api.c | 3 +- tests/prime_nv_pcopy.c | 5 +- tests/prime_nv_test.c | 5 +- tests/prime_self_import.c | 2 +- tests/prime_udl.c | 8 +- tests/testdisplay.c | 6 +- tools/intel_audio_dump.c | 9 +- tools/intel_backlight.c | 6 +- tools/intel_bios_reader.c | 4 +- tools/intel_dpio_read.c | 3 +- tools/intel_dpio_write.c | 3 +- tools/intel_error_decode.c | 3 +- tools/intel_forcewaked.c | 3 +- tools/intel_framebuffer_dump.c | 2 +- tools/intel_gpu_time.c | 6 +- tools/intel_gpu_top.c | 6 +- tools/intel_gtt.c | 3 +- tools/intel_infoframes.c | 8 +- tools/intel_l3_parity.c | 3 +- tools/intel_lid.c | 5 +- tools/intel_nc_read.c | 3 +- tools/intel_nc_write.c | 3 +- tools/intel_opregion_decode.c | 3 +- tools/intel_panel_fitter.c | 4 +- tools/intel_perf_counters.c | 3 +- tools/intel_punit_read.c | 3 +- tools/intel_punit_write.c | 3 +- tools/intel_reg_checker.c | 5 +- tools/intel_reg_dumper.c | 17 +- tools/intel_reg_read.c | 3 +- tools/intel_reg_snapshot.c | 5 +- tools/intel_reg_write.c | 3 +- tools/intel_stepping.c | 3 +- tools/intel_vga_read.c | 3 +- tools/intel_vga_write.c | 3 +- tools/quick_dump/Makefile.am | 6 +- tools/quick_dump/chipset_macro_wrap.c | 33 ++ tools/quick_dump/intel_chipset.c | 33 -- 202 files changed, 2401 insertions(+), 1398 deletions(-) create mode 100644 lib/igt_aux.c create mode 100644 lib/igt_aux.h create mode 100644 lib/intel_chipset.c delete mode 100644 lib/intel_drm.c delete mode 100644 lib/intel_gpu_tools.h create mode 100644 lib/intel_io.h create mode 100644 lib/intel_os.c delete mode 100644 lib/intel_pci.c delete mode 100644 lib/media_fill.c create mode 100644 tools/quick_dump/chipset_macro_wrap.c delete mode 100644 tools/quick_dump/intel_chipset.c
Signature · 1 line
1.8.5.2
PATCH 1/28 lib: rename intel_pci.c to intel_chipset.c
This is to consolidate all the chipset related functions to intel_chipset.[hc].
Unfortunately we need to rename a wrapper lib file in quick_dump, too. And quick_dump makes automake a bit unhappy apparently.
--- lib/Makefile.sources | 2 +- lib/intel_chipset.c | 123 ++++++++++++++++++++++++++++++++++ lib/intel_pci.c | 123 ---------------------------------- tools/quick_dump/Makefile.am | 4 +- tools/quick_dump/chipset_macro_wrap.c | 33 +++++++++ tools/quick_dump/intel_chipset.c | 33 --------- 6 files changed, 159 insertions(+), 159 deletions(-) create mode 100644 lib/intel_chipset.c delete mode 100644 lib/intel_pci.c create mode 100644 tools/quick_dump/chipset_macro_wrap.c delete mode 100644 tools/quick_dump/intel_chipset.c
lib/Makefile.sources +1 -1
@@ -18,7 +18,7 @@ libintel_tools_la_SOURCES = \ intel_drm.c \ intel_gpu_tools.h \ intel_mmio.c \ - intel_pci.c \ + intel_chipset.c \ intel_reg.h \ ioctl_wrappers.c \ ioctl_wrappers.h \
lib/intel_chipset.c new file +123 -0
123 lines not on this page · raw message
lib/intel_pci.c deleted +0 -123
123 lines not on this page · raw message
tools/quick_dump/Makefile.am +2 -2
@@ -7,9 +7,9 @@ bin_SCRIPTS = chipset.py lib_LTLIBRARIES = I915ChipsetPython.la I915ChipsetPython_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) $(PCIACCESS_LIBS) -I915ChipsetPython_la_SOURCES = chipset_wrap_python.c intel_chipset.c \ +I915ChipsetPython_la_SOURCES = chipset_wrap_python.c chipset_macro_wrap.c \ $(top_srcdir)/lib/intel_drm.c \ - $(top_srcdir)/lib/intel_pci.c \ + $(top_srcdir)/lib/intel_chipset.c \ $(top_srcdir)/lib/intel_reg_map.c \ $(top_srcdir)/lib/intel_mmio.c \ $(top_srcdir)/lib/intel_iosf.c
tools/quick_dump/chipset_macro_wrap.c new file +33 -0
@@ -0,0 +1,33 @@ +#include <pciaccess.h> +#include "intel_chipset.h" + +int is_sandybridge (unsigned short pciid) +{ +return IS_GEN6 (pciid); +} + +int is_ivybridge (unsigned short pciid) +{ +return IS_IVYBRIDGE (pciid); +} + +int is_valleyview (unsigned short pciid) +{ +return IS_VALLEYVIEW (pciid); +} + +int is_haswell (unsigned short pciid) +{ +return IS_HASWELL (pciid); +} + +int is_broadwell (unsigned short pciid) +{ +return IS_BROADWELL (pciid); +} + +/* Simple helper because I couldn't make this work in the script */ +unsigned short pcidev_to_devid (struct pci_device *pdev) +{ +return pdev->device_id; +}
tools/quick_dump/intel_chipset.c deleted +0 -33
@@ -1,33 +0,0 @@ -#include <pciaccess.h> -#include "intel_chipset.h" - -int is_sandybridge (unsigned short pciid) -{ -return IS_GEN6 (pciid); -} - -int is_ivybridge (unsigned short pciid) -{ -return IS_IVYBRIDGE (pciid); -} - -int is_valleyview (unsigned short pciid) -{ -return IS_VALLEYVIEW (pciid); -} - -int is_haswell (unsigned short pciid) -{ -return IS_HASWELL (pciid); -} - -int is_broadwell (unsigned short pciid) -{ -return IS_BROADWELL (pciid); -} - -/* Simple helper because I couldn't make this work in the script */ -unsigned short pcidev_to_devid (struct pci_device *pdev) -{ -return pdev->device_id; -}
Signature · 6 lines
1.8.5.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/28 lib: consolidate chipset helpers in intel_chipset.[hc]
In reply to Daniel Vetter--- lib/intel_chipset.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- lib/intel_chipset.h | 21 +++++++++++++++++++++ lib/intel_drm.c | 42 ------------------------------------------ lib/intel_gpu_tools.h | 18 ------------------ 4 files changed, 65 insertions(+), 61 deletions(-)
lib/intel_chipset.c +44 -1
@@ -36,8 +36,9 @@#include <fcntl.h> #include <sys/stat.h> #include <sys/mman.h> +#include "i915_drm.h" -#include "intel_gpu_tools.h" +#include "intel_chipset.h" enum pch_type pch;
@@ -91,6 +92,48 @@ intel_get_pci_device(void)return pci_dev; } +uint32_t +intel_get_drm_devid (int fd) +{ +int ret; +struct drm_i915_getparam gp; +uint32_t devid; +char *override; + + override =getenv ("INTEL_DEVID_OVERRIDE" ); +if (override) { + devid =strtod (override,NULL ); + }else { + gp.param =I915_PARAM_CHIPSET_ID ; + gp.value = (int *)&devid; + + ret =ioctl (fd,DRM_IOCTL_I915_GETPARAM , &gp,sizeof (gp)); +assert (ret ==0 ); + } + +return devid; +} + +int intel_gen (uint32_t devid) +{ +if (IS_GEN2 (devid)) +return 2 ; +if (IS_GEN3 (devid)) +return 3 ; +if (IS_GEN4 (devid)) +return 4 ; +if (IS_GEN5 (devid)) +return 5 ; +if (IS_GEN6 (devid)) +return 6 ; +if (IS_GEN7 (devid)) +return 7 ; +if (IS_GEN8 (devid)) +return 8 ; + +return -1 ; +} +void intel_check_pch (void ) {
lib/intel_chipset.h +21 -0
@@ -28,6 +28,27 @@#ifndef _INTEL_CHIPSET_H#define _INTEL_CHIPSET_H +#include <sys/types.h> +#include <pciaccess.h> + +struct pci_device *intel_get_pci_device (void ); +uint32_t intel_get_drm_devid (int fd); +int intel_gen (uint32_t devid); + +extern enum pch_type pch; +enum pch_type { +PCH_NONE , +PCH_IBX , +PCH_CPT , +PCH_LPT , +}; + +void intel_check_pch (void ); + +#define HAS_IBX (pch == PCH_IBX) +#define HAS_CPT (pch == PCH_CPT) +#define HAS_LPT (pch == PCH_LPT) +#define PCI_CHIP_I810 0x7121#define PCI_CHIP_I810_DC100 0x7123#define PCI_CHIP_I810_E 0x7125
lib/intel_drm.c +0 -42
48 lines not on this page · raw message
lib/intel_gpu_tools.h +0 -18
@@ -100,27 +100,9 @@ OUTREG(uint32_t reg, uint32_t val) *(volatile uint32_t *)((volatile char *)mmio + reg) = val; } -struct pci_device *intel_get_pci_device (void ); - -uint32_t intel_get_drm_devid (int fd); -int intel_gen (uint32_t devid);uint64_t intel_get_total_ram_mb (void );uint64_t intel_get_total_swap_mb (void );void intel_map_file (char *); -enum pch_type { -PCH_NONE , -PCH_IBX , -PCH_CPT , -PCH_LPT , -}; - -extern enum pch_type pch; -void intel_check_pch (void ); - -#define HAS_IBX (pch == PCH_IBX) -#define HAS_CPT (pch == PCH_CPT) -#define HAS_LPT (pch == PCH_LPT) -#endif /* INTEL_GPU_TOOLS_H */
Signature · 1 line
1.8.5.2
PATCH 3/28 lib/intel_chipset: intel_ prefix for pch global
In reply to Daniel VetterJust a bit better namespacing.
--- lib/intel_chipset.c | 10 +++++----- lib/intel_chipset.h | 8 ++++---- tools/intel_infoframes.c | 4 ++-- tools/intel_reg_dumper.c | 10 +++++----- 4 files changed, 16 insertions(+), 16 deletions(-)
lib/intel_chipset.c +5 -5
@@ -40,7 +40,7 @@#include "intel_chipset.h" -enum pch_type pch; +enum pch_type intel_pch;struct pci_device *intel_get_pci_device (void )
@@ -148,18 +148,18 @@ intel_check_pch(void)switch (pch_dev->device_id &0xff00 ) {case 0x3b00 : - pch =PCH_IBX ; + intel_pch =PCH_IBX ;break ;case 0x1c00 :case 0x1e00 : - pch =PCH_CPT ; + intel_pch =PCH_CPT ;break ;case 0x8c00 :case 0x9c00 : - pch =PCH_LPT ; + intel_pch =PCH_LPT ;break ;default : - pch =PCH_NONE ; + intel_pch =PCH_NONE ;return ; } }
lib/intel_chipset.h +4 -4
@@ -35,7 +35,7 @@ struct pci_device *intel_get_pci_device(void);uint32_t intel_get_drm_devid (int fd);int intel_gen (uint32_t devid); -extern enum pch_type pch; +extern enum pch_type intel_pch;enum pch_type {PCH_NONE ,PCH_IBX ,
@@ -45,9 +45,9 @@ enum pch_type {void intel_check_pch (void ); -#define HAS_IBX (pch == PCH_IBX) -#define HAS_CPT (pch == PCH_CPT) -#define HAS_LPT (pch == PCH_LPT) +#define HAS_IBX (intel_pch == PCH_IBX) +#define HAS_CPT (intel_pch == PCH_CPT) +#define HAS_LPT (intel_pch == PCH_LPT)#define PCI_CHIP_I810 0x7121#define PCI_CHIP_I810_DC100 0x7123
tools/intel_infoframes.c +2 -2
@@ -367,7 +367,7 @@ static void dump_port_info(int hdmi_port_index)if (gen ==4 ) transcoder = (val &HDMI_PORT_TRANSCODER_GEN4 ) >>30 ; -else if (pch >=PCH_CPT ) +else if (intel_pch >=PCH_CPT ) transcoder = (val &HDMI_PORT_TRANSCODER_CPT ) >>29 ;else transcoder = (val &HDMI_PORT_TRANSCODER_IBX ) >>30 ;
@@ -1187,7 +1187,7 @@ int main(int argc, char *argv[]) transcoder =TRANSC_A ; else if (!strcmp(optarg, "B")) transcoder =TRANSC_B ; - else if (pch >= PCH_CPT && !strcmp(optarg, "C")) { + else if (intel_pch >= PCH_CPT && !strcmp(optarg, "C")) { transcoder =TRANSC_C ; } else {printf ("Invalid transcoder.\n" );
tools/intel_reg_dumper.c +5 -5
@@ -2931,18 +2931,18 @@ int main(int argc, char** argv)intel_map_file (file);if (devid) {if (IS_GEN5 (devid)) - pch =PCH_IBX ; + intel_pch =PCH_IBX ;else if (IS_GEN6 (devid) ||IS_IVYBRIDGE (devid)) - pch =PCH_CPT ; + intel_pch =PCH_CPT ;else if (IS_HASWELL (devid)) - pch =PCH_LPT ; + intel_pch =PCH_LPT ;else - pch =PCH_NONE ; + intel_pch =PCH_NONE ; }else {printf ("Dumping from file without -d argument. " "Assuming Ironlake machine.\n" ); devid =0x0042 ; - pch =PCH_IBX ; + intel_pch =PCH_IBX ; } }else { pci_dev =intel_get_pci_device ();
Signature · 1 line
1.8.5.2
PATCH 4/28 lib/intel_chipset: api docs
In reply to Daniel VetterUnfortunately gtkdoc doesn't pick up the intel_pch enum.
--- lib/intel_chipset.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- lib/intel_chipset.h | 5 +++++ 2 files changed, 54 insertions(+), 1 deletion(-)
lib/intel_chipset.c +49 -1
@@ -40,8 +40,32 @@#include "intel_chipset.h" +/** +* SECTION:intel_chipset +* @short_description: Feature macros and chipset helpers +* @title: intel chipset +* +* This library mostly provides feature macros which use raw pci device ids. It +* also provides a few more helper functions to handle pci devices, chipset +* detection and related issues. +*/ + +/** +* intel_pch: +* +* Global variable to keep track of the pch type. Can either be set manually or +* detected at runtime with intel_check_pch(). +*/ enum pch_type intel_pch; +/** +* intel_get_pci_device: +* +* Looks up the main graphics pci device using libpciaccess. +* +* Returns: +* The pci_device, exits the program on any failures. +*/ struct pci_device *intel_get_pci_device (void ) {
@@ -92,6 +116,16 @@ intel_get_pci_device(void)return pci_dev; } +/** +* intel_get_drm_devid: +* @fd: open i915 drm file descriptor +* +* Queries the kernel for the pci device id corresponding to the drm file +* descriptor. +* +* Returns: +* The devid, exits the program on any failures. +*/ uint32_t intel_get_drm_devid (int fd) {
@@ -114,6 +148,15 @@ intel_get_drm_devid(int fd)return devid; } +/** +* intel_gen: +* @devid: pci device id +* +* Computes the Intel GFX generation for the give device id. +* +* Returns: +* The GFX generation on successful lookup, -1 on failure. +*/ int intel_gen (uint32_t devid) {if (IS_GEN2 (devid))
@@ -134,6 +177,12 @@ int intel_gen(uint32_t devid)return -1 ; } +/** +* intel_check_pch: +* +* Detects the PCH chipset type of the running systems and fills in the results +* into the global #intel_pch varaible. +*/ void intel_check_pch (void ) {
@@ -163,4 +212,3 @@ intel_check_pch(void)return ; } } -
lib/intel_chipset.h +5 -0
@@ -49,6 +49,9 @@ void intel_check_pch(void);#define HAS_CPT (intel_pch == PCH_CPT)#define HAS_LPT (intel_pch == PCH_LPT) +/* Exclude chipset #defines, they just add noise */ +#ifndef __GTK_DOC_IGNORE__ +#define PCI_CHIP_I810 0x7121#define PCI_CHIP_I810_DC100 0x7123#define PCI_CHIP_I810_E 0x7125
@@ -181,6 +184,8 @@ void intel_check_pch(void);#define PCI_CHIP_VALLEYVIEW_2 0x0f32#define PCI_CHIP_VALLEYVIEW_3 0x0f33 +#endif /* __GTK_DOC_IGNORE__ */ +#define IS_MOBILE (devid) ((devid) == PCI_CHIP_I855_GM || \ (devid) == PCI_CHIP_I915_GM || \ (devid) == PCI_CHIP_I945_GM || \
Signature · 1 line
1.8.5.2
PATCH 5/28 lib: make rendercopy.h an internal header
In reply to Daniel VetterAnd move the public interfaces into intel_batchbuffer.[hc].
A bit messy since we are fairly inconsistent with our header #include handling.
Also exclude rendercopy.h from the documentation.
--- .../intel-gpu-tools/intel-gpu-tools-docs.xml | 1 - lib/intel_batchbuffer.c | 19 ++++++++ lib/intel_batchbuffer.h | 29 ++++++++++++ lib/media_fill.h | 20 --------- lib/rendercopy.h | 51 ---------------------- lib/rendercopy_gen6.c | 20 ++++++++- lib/rendercopy_gen7.c | 20 ++++++++- lib/rendercopy_gen8.c | 20 ++++++++- lib/rendercopy_i830.c | 36 +++++++-------- lib/rendercopy_i915.c | 18 ++++++++ tests/gem_ctx_basic.c | 19 +++++++- tests/gem_render_copy.c | 20 ++++++++- tests/gem_render_linear_blits.c | 20 ++++++++- tests/gem_render_tiled_blits.c | 19 +++++++- tests/gem_reset_stats.c | 5 ++- tests/gem_ring_sync_copy.c | 2 +- tests/gem_ringfill.c | 2 +- tests/gem_seqno_wrap.c | 4 +- tests/gem_stress.c | 19 +++++++- tests/gem_wait_render_timeout.c | 18 +++++++- tests/kms_fbc_crc.c | 2 +- tests/kms_flip.c | 2 +- 22 files changed, 255 insertions(+), 111 deletions(-)
docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml +0 -1
@@ -25,7 +25,6 @@ <xi:include href="xml/intel_chipset.xml"/> <xi:include href="xml/intel_gpu_tools.xml"/> <xi:include href="xml/media_fill.xml"/> - <xi:include href="xml/rendercopy.xml"/> </chapter> <index id="api-index-full">
lib/intel_batchbuffer.c +19 -0
@@ -37,6 +37,7 @@#include "intel_bufmgr.h" #include "intel_chipset.h" #include "intel_reg.h" +#include "rendercopy.h" #include <i915_drm.h> /**
@@ -384,3 +385,21 @@ intel_copy_bo(struct intel_batchbuffer *batch, dst_bo,0 ,0 ,4096 , 4096/4, size/4096, 32); } + +render_copyfunc_t get_render_copyfunc (int devid) +{ +render_copyfunc_t copy =NULL ; + +if (IS_GEN2 (devid)) + copy = gen2_render_copyfunc; +else if (IS_GEN3 (devid)) + copy = gen3_render_copyfunc; +else if (IS_GEN6 (devid)) + copy = gen6_render_copyfunc; +else if (IS_GEN7 (devid)) + copy = gen7_render_copyfunc; +else if (IS_GEN8 (devid)) + copy = gen8_render_copyfunc; + +return copy; +}
lib/intel_batchbuffer.h +29 -0
@@ -2,6 +2,7 @@#define INTEL_BATCHBUFFER_H #include <assert.h> +#include <stdint.h> #include "intel_bufmgr.h" #define BATCH_SZ 4096
@@ -195,4 +196,32 @@ void intel_copy_bo(struct intel_batchbuffer *batch, drm_intel_bo *dst_bo, drm_intel_bo *src_bo, long int size); +struct scratch_buf { +drm_intel_bo *bo; +uint32_t stride; +uint32_t tiling; +uint32_t *data; +uint32_t *cpu_mapping; +uint32_t size; +unsigned num_tiles; +}; + +static inline unsigned buf_width (struct scratch_buf *buf) +{ +return buf->stride/sizeof (uint32_t ); +} + +static inline unsigned buf_height (struct scratch_buf *buf) +{ +return buf->size/buf->stride; +} + +typedef void (*render_copyfunc_t )(struct intel_batchbuffer *batch, +drm_intel_context *context, +struct scratch_buf *src,unsigned src_x,unsigned src_y, +unsigned width,unsigned height, +struct scratch_buf *dst,unsigned dst_x,unsigned dst_y); + +render_copyfunc_t get_render_copyfunc (int devid); +#endif
lib/media_fill.h +0 -20
@@ -19,26 +19,6 @@#include "intel_batchbuffer.h" #include "intel_gpu_tools.h" -struct scratch_buf { -drm_intel_bo *bo; -uint32_t stride; -uint32_t tiling; -uint32_t *data; -uint32_t *cpu_mapping; -uint32_t size; -unsigned num_tiles; -}; - -static inline unsigned buf_width (struct scratch_buf *buf) -{ -return buf->stride/sizeof (uint8_t ); -} - -static inline unsigned buf_height (struct scratch_buf *buf) -{ -return buf->size/buf->stride; -} - typedef void (*media_fillfunc_t)(struct intel_batchbuffer *batch, struct scratch_buf *dst, unsigned x, unsigned y,
lib/rendercopy.h +0 -51
63 lines not on this page · raw message
lib/rendercopy_gen6.c +18 -2
@@ -1,8 +1,24 @@ +#include <assert.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <fcntl.h> +#include <inttypes.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <getopt.h> +#include "drm.h" +#include "i915_drm.h" +#include "drmtest.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_gpu_tools.h" #include "rendercopy.h" #include "gen6_render.h" -#include <assert.h> -#define ALIGN (x, y) (((x) + (y)-1) & ~((y)-1))#define VERTEX_SIZE (3*4)
lib/rendercopy_gen7.c +18 -2
@@ -1,8 +1,24 @@ +#include <assert.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <fcntl.h> +#include <inttypes.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <getopt.h> +#include "drm.h" +#include "i915_drm.h" +#include "drmtest.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_gpu_tools.h" #include "rendercopy.h" #include "gen7_render.h" -#include <assert.h> -#define ALIGN (x, y) (((x) + (y)-1) & ~((y)-1))static const uint32_t ps_kernel[][4 ] = {
lib/rendercopy_gen8.c +18 -2
@@ -1,8 +1,24 @@ +#include <assert.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <fcntl.h> +#include <inttypes.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <getopt.h> +#include "drm.h" +#include "i915_drm.h" +#include "drmtest.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_gpu_tools.h" #include "rendercopy.h" #include "gen8_render.h" -#include <assert.h> -#include <intel_aub.h> #define ALIGN (x, y) (((x) + (y)-1) & ~((y)-1))
lib/rendercopy_i830.c +18 -18
@@ -1,3 +1,21 @@ +#include <stdlib.h> +#include <sys/ioctl.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <fcntl.h> +#include <inttypes.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <getopt.h> +#include "drm.h" +#include "i915_drm.h" +#include "drmtest.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_gpu_tools.h" +#include "i830_reg.h" #include "rendercopy.h"
@@ -228,21 +246,3 @@ void gen2_render_copyfunc(struct intel_batchbuffer *batch,intel_batchbuffer_flush (batch); } - -render_copyfunc_t get_render_copyfunc (int devid) -{ -render_copyfunc_t copy =NULL ; - -if (IS_GEN2 (devid)) - copy = gen2_render_copyfunc; -else if (IS_GEN3 (devid)) - copy = gen3_render_copyfunc; -else if (IS_GEN6 (devid)) - copy = gen6_render_copyfunc; -else if (IS_GEN7 (devid)) - copy = gen7_render_copyfunc; -else if (IS_GEN8 (devid)) - copy = gen8_render_copyfunc; - -return copy; -}
lib/rendercopy_i915.c +18 -0
@@ -1,3 +1,21 @@ +#include <stdlib.h> +#include <sys/ioctl.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <fcntl.h> +#include <inttypes.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <getopt.h> +#include "drm.h" +#include "i915_drm.h" +#include "drmtest.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_gpu_tools.h" +#include "i915_reg.h" #include "i915_3d.h" #include "rendercopy.h"
tests/gem_ctx_basic.c +18 -1
@@ -30,7 +30,24 @@*/ #include <pthread.h> -#include "rendercopy.h" +#include <assert.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <fcntl.h> +#include <inttypes.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <getopt.h> +#include "drm.h" +#include "i915_drm.h" +#include "drmtest.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_gpu_tools.h" /* options */ int num_contexts =10 ;
tests/gem_render_copy.c +18 -2
@@ -32,8 +32,24 @@#include <stdbool.h> #include <unistd.h> #include <cairo.h> - -#include "rendercopy.h" +#include <assert.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <fcntl.h> +#include <inttypes.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <getopt.h> +#include "drm.h" +#include "i915_drm.h" +#include "drmtest.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_gpu_tools.h" #define WIDTH 512#define STRIDE (WIDTH*4)
tests/gem_render_linear_blits.c +18 -2
@@ -37,8 +37,24 @@#include "config.h" #endif -#include "rendercopy.h" - +#include <assert.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <fcntl.h> +#include <inttypes.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <getopt.h> +#include "drm.h" +#include "i915_drm.h" +#include "drmtest.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_gpu_tools.h" #define WIDTH 512#define STRIDE (WIDTH*4)#define HEIGHT 512
tests/gem_render_tiled_blits.c +18 -1
@@ -33,7 +33,24 @@* The goal is to simply ensure the basics work. */ -#include "rendercopy.h" +#include <assert.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <fcntl.h> +#include <inttypes.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <getopt.h> +#include "drm.h" +#include "i915_drm.h" +#include "drmtest.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_gpu_tools.h" #define WIDTH 512#define STRIDE (WIDTH*4)
tests/gem_reset_stats.c +3 -2
@@ -26,6 +26,7 @@*/ #define _GNU_SOURCE +#include <stdbool.h> #include <unistd.h> #include <stdlib.h> #include <stdio.h>
@@ -40,11 +41,11 @@#include <signal.h> #include "i915_drm.h" +#include "drmtest.h" +#include "igt_debugfs.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" -#include "rendercopy.h" -#include "igt_debugfs.h" #define RS_NO_ERROR 0#define RS_BATCH_ACTIVE (1 << 0)
tests/gem_ring_sync_copy.c +1 -1
@@ -52,7 +52,7 @@#include "i915_drm.h" #include "drmtest.h" -#include "rendercopy.h" +#include "intel_batchbuffer.h" #define WIDTH 512#define HEIGHT 512
tests/gem_ringfill.c +1 -1
@@ -43,10 +43,10 @@#include "drm.h" #include "i915_drm.h" +#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" -#include "rendercopy.h" struct bo {const char *ring;
tests/gem_seqno_wrap.c +3 -1
@@ -39,13 +39,15 @@#include <sys/wait.h> #include <limits.h> #include <wordexp.h> +#include <getopt.h> #include <signal.h> #include "i915_drm.h" +#include "drmtest.h" +#include "igt_core.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" -#include "rendercopy.h" static int devid;static int card_index =0 ;
tests/gem_stress.c +18 -1
@@ -49,7 +49,24 @@* In short: designed for maximum evilness. */ -#include "rendercopy.h" +#include <assert.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <fcntl.h> +#include <inttypes.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <getopt.h> +#include "drm.h" +#include "i915_drm.h" +#include "drmtest.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_gpu_tools.h" #define CMD_POLY_STIPPLE_OFFSET 0x7906
tests/gem_wait_render_timeout.c +17 -1
@@ -27,8 +27,24 @@#include <stdio.h> #include <time.h> +#include <assert.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <fcntl.h> +#include <inttypes.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <getopt.h> #include "drm.h" -#include "rendercopy.h" +#include "i915_drm.h" +#include "drmtest.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_gpu_tools.h" #define MSEC_PER_SEC 1000L#define USEC_PER_MSEC 1000L
tests/kms_fbc_crc.c +1 -1
@@ -32,7 +32,7 @@#include "drmtest.h" #include "igt_debugfs.h" #include "igt_kms.h" -#include "rendercopy.h" +#include "intel_batchbuffer.h" enum test_mode {TEST_PAGE_FLIP ,
tests/kms_flip.c +1 -1
@@ -39,7 +39,7 @@#include "i915_drm.h" #include "drmtest.h" #include "testdisplay.h" -#include "rendercopy.h" +#include "intel_batchbuffer.h" #include "igt_kms.h" #define TEST_DPMS (1 << 0)
Signature · 1 line
1.8.5.2
PATCH 6/28 lib: make media_fill.h an internal header
In reply to Daniel VetterSame deal as with rendercopy.h.
--- .../intel-gpu-tools/intel-gpu-tools-docs.xml | 1 - lib/Makefile.sources | 1 - lib/intel_batchbuffer.c | 13 +++++++++++++ lib/intel_batchbuffer.h | 8 ++++++++ lib/media_fill.c | 14 -------------- lib/media_fill.h | 8 -------- tests/gem_media_fill.c | 20 ++++++++++++++++++-- 7 files changed, 39 insertions(+), 26 deletions(-) delete mode 100644 lib/media_fill.c
docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml +0 -1
@@ -24,7 +24,6 @@ <xi:include href="xml/intel_batchbuffer.xml"/> <xi:include href="xml/intel_chipset.xml"/> <xi:include href="xml/intel_gpu_tools.xml"/> - <xi:include href="xml/media_fill.xml"/> </chapter> <index id="api-index-full">
lib/Makefile.sources +0 -1
@@ -22,7 +22,6 @@ libintel_tools_la_SOURCES = \ intel_reg.h \ ioctl_wrappers.c \ ioctl_wrappers.h \ - media_fill.c \ media_fill.h \ media_fill_gen7.c \ media_fill_gen8.c \
lib/intel_batchbuffer.c +13 -0
@@ -38,6 +38,7 @@#include "intel_chipset.h" #include "intel_reg.h" #include "rendercopy.h" +#include "media_fill.h" #include <i915_drm.h> /**
@@ -403,3 +404,15 @@ render_copyfunc_t get_render_copyfunc(int devid)return copy; } + +media_fillfunc_t get_media_fillfunc (int devid) +{ +media_fillfunc_t fill =NULL ; + +if (IS_GEN8 (devid)) + fill = gen8_media_fillfunc; +else if (IS_GEN7 (devid)) + fill = gen7_media_fillfunc; + +return fill; +}
lib/intel_batchbuffer.h +8 -0
@@ -224,4 +224,12 @@ typedef void (*render_copyfunc_t)(struct intel_batchbuffer *batch,render_copyfunc_t get_render_copyfunc (int devid); +typedef void (*media_fillfunc_t )(struct intel_batchbuffer *batch, +struct scratch_buf *dst, +unsigned x,unsigned y, +unsigned width,unsigned height, +uint8_t color); + +media_fillfunc_t get_media_fillfunc (int devid); +#endif
lib/media_fill.c deleted +0 -14
@@ -1,14 +0,0 @@ -#include "i830_reg.h" -#include "media_fill.h" - -media_fillfunc_t get_media_fillfunc (int devid) -{ -media_fillfunc_t fill =NULL ; - -if (IS_GEN8 (devid)) - fill = gen8_media_fillfunc; -else if (IS_GEN7 (devid)) - fill = gen7_media_fillfunc; - -return fill; -}
lib/media_fill.h +0 -8
@@ -19,14 +19,6 @@#include "intel_batchbuffer.h" #include "intel_gpu_tools.h" -typedef void (*media_fillfunc_t )(struct intel_batchbuffer *batch, -struct scratch_buf *dst, -unsigned x,unsigned y, -unsigned width,unsigned height, -uint8_t color); - -media_fillfunc_t get_media_fillfunc (int devid); - void gen8_media_fillfunc(struct intel_batchbuffer *batch, struct scratch_buf *dst,
tests/gem_media_fill.c +18 -2
@@ -32,8 +32,24 @@#include <stdbool.h> #include <unistd.h> - -#include "media_fill.h" +#include <assert.h> +#include <stdlib.h> +#include <sys/ioctl.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> +#include <fcntl.h> +#include <inttypes.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <getopt.h> +#include "drm.h" +#include "i915_drm.h" +#include "drmtest.h" +#include "intel_bufmgr.h" +#include "intel_batchbuffer.h" +#include "intel_gpu_tools.h" #define WIDTH 64#define STRIDE (WIDTH)
Signature · 1 line
1.8.5.2
PATCH 7/28 lib/intel_batchbuffer: un-inline buf_height/width
In reply to Daniel Vettergtkdoc won't pick them up otherwise.
--- lib/intel_batchbuffer.c | 10 ++++++++++ lib/intel_batchbuffer.h | 11 ++--------- 2 files changed, 12 insertions(+), 9 deletions(-)
lib/intel_batchbuffer.c +10 -0
@@ -387,6 +387,16 @@ intel_copy_bo(struct intel_batchbuffer *batch, 4096/4, size/4096, 32); } +unsigned buf_width (struct scratch_buf *buf) +{ +return buf->stride/sizeof (uint32_t ); +} + +unsigned buf_height (struct scratch_buf *buf) +{ +return buf->size/buf->stride; +} +render_copyfunc_t get_render_copyfunc (int devid) {render_copyfunc_t copy =NULL ;
lib/intel_batchbuffer.h +2 -9
@@ -206,15 +206,8 @@ struct scratch_buf {unsigned num_tiles; }; -static inline unsigned buf_width (struct scratch_buf *buf) -{ -return buf->stride/sizeof (uint32_t ); -} - -static inline unsigned buf_height (struct scratch_buf *buf) -{ -return buf->size/buf->stride; -} +unsigned buf_width (struct scratch_buf *buf); +unsigned buf_height (struct scratch_buf *buf); typedef void (*render_copyfunc_t)(struct intel_batchbuffer *batch, drm_intel_context *context,
Signature · 1 line
1.8.5.2
PATCH 8/28 lib/intel_batchbuffer: igt_ namespace for the buffer structure
In reply to Daniel VetterStep one to properly namespace the rendercpy/mediafill functions. Als give the buf_height/width helpers a proper igt_ prefix.
--- lib/intel_batchbuffer.c | 4 +-- lib/intel_batchbuffer.h | 12 ++++---- lib/media_fill.h | 4 +-- lib/media_fill_gen7.c | 12 ++++---- lib/media_fill_gen8.c | 12 ++++---- lib/rendercopy.h | 20 ++++++------- lib/rendercopy_gen6.c | 30 +++++++++---------- lib/rendercopy_gen7.c | 22 +++++++------- lib/rendercopy_gen8.c | 32 ++++++++++----------- lib/rendercopy_i830.c | 28 +++++++++--------- lib/rendercopy_i915.c | 12 ++++---- tests/gem_ctx_basic.c | 4 +-- tests/gem_media_fill.c | 6 ++-- tests/gem_render_copy.c | 12 ++++---- tests/gem_render_linear_blits.c | 6 ++-- tests/gem_render_tiled_blits.c | 2 +- tests/gem_ring_sync_copy.c | 12 ++++---- tests/gem_ringfill.c | 6 ++-- tests/gem_seqno_wrap.c | 8 +++--- tests/gem_stress.c | 64 ++++++++++++++++++++--------------------- tests/kms_fbc_crc.c | 4 +-- tests/kms_flip.c | 4 +-- 22 files changed, 158 insertions(+), 158 deletions(-)
lib/intel_batchbuffer.c +2 -2
@@ -387,12 +387,12 @@ intel_copy_bo(struct intel_batchbuffer *batch, 4096/4, size/4096, 32); } -unsigned buf_width (struct scratch_buf *buf) +unsigned igt_buf_width (struct igt_buf *buf) {return buf->stride/sizeof (uint32_t ); } -unsigned buf_height (struct scratch_buf *buf) +unsigned igt_buf_height (struct igt_buf *buf) {return buf->size/buf->stride; }
lib/intel_batchbuffer.h +6 -6
@@ -196,7 +196,7 @@ void intel_copy_bo(struct intel_batchbuffer *batch, drm_intel_bo *dst_bo, drm_intel_bo *src_bo, long int size); -struct scratch_buf { +struct igt_buf {drm_intel_bo *bo;uint32_t stride;uint32_t tiling;
@@ -206,19 +206,19 @@ struct scratch_buf {unsigned num_tiles; }; -unsigned buf_width (struct scratch_buf *buf); -unsigned buf_height (struct scratch_buf *buf); +unsigned igt_buf_width (struct igt_buf *buf); +unsigned igt_buf_height (struct igt_buf *buf);typedef void (*render_copyfunc_t )(struct intel_batchbuffer *batch,drm_intel_context *context, -struct scratch_buf *src,unsigned src_x,unsigned src_y, +struct igt_buf *src,unsigned src_x,unsigned src_y,unsigned width,unsigned height, -struct scratch_buf *dst,unsigned dst_x,unsigned dst_y); +struct igt_buf *dst,unsigned dst_x,unsigned dst_y);render_copyfunc_t get_render_copyfunc (int devid);typedef void (*media_fillfunc_t )(struct intel_batchbuffer *batch, -struct scratch_buf *dst, +struct igt_buf *dst,unsigned x,unsigned y,unsigned width,unsigned height,uint8_t color);
lib/media_fill.h +2 -2
@@ -21,14 +21,14 @@void gen8_media_fillfunc (struct intel_batchbuffer *batch, -struct scratch_buf *dst, +struct igt_buf *dst,unsigned x,unsigned y,unsigned width,unsigned height,uint8_t color);void gen7_media_fillfunc (struct intel_batchbuffer *batch, -struct scratch_buf *dst, +struct igt_buf *dst,unsigned x,unsigned y,unsigned width,unsigned height,uint8_t color);
lib/media_fill_gen7.c +6 -6
@@ -82,7 +82,7 @@ gen7_fill_curbe_buffer_data(struct intel_batchbuffer *batch,static uint32_t gen7_fill_surface_state (struct intel_batchbuffer *batch, -struct scratch_buf *buf, +struct igt_buf *buf,uint32_t format,int is_dst) {
@@ -116,8 +116,8 @@ gen7_fill_surface_state(struct intel_batchbuffer *batch, read_domain, write_domain);assert (ret ==0 ); - ss->ss2.height =buf_height (buf) -1 ; - ss->ss2.width =buf_width (buf) -1 ; + ss->ss2.height =igt_buf_height (buf) -1 ; + ss->ss2.width =igt_buf_width (buf) -1 ; ss->ss3.pitch = buf->stride -1 ;
@@ -131,7 +131,7 @@ gen7_fill_surface_state(struct intel_batchbuffer *batch,static uint32_t gen7_fill_binding_table (struct intel_batchbuffer *batch, -struct scratch_buf *dst) +struct igt_buf *dst) {uint32_t *binding_table, offset;
@@ -156,7 +156,7 @@ gen7_fill_media_kernel(struct intel_batchbuffer *batch, }static uint32_t -gen7_fill_interface_descriptor (struct intel_batchbuffer *batch,struct scratch_buf *dst) +gen7_fill_interface_descriptor (struct intel_batchbuffer *batch,struct igt_buf *dst) {struct gen7_interface_descriptor_data *idd;uint32_t offset;
@@ -311,7 +311,7 @@ gen7_emit_media_objects(struct intel_batchbuffer *batch,void gen7_media_fillfunc (struct intel_batchbuffer *batch, -struct scratch_buf *dst, +struct igt_buf *dst,unsigned x,unsigned y,unsigned width,unsigned height,uint8_t color)
lib/media_fill_gen8.c +6 -6
@@ -82,7 +82,7 @@ gen8_fill_curbe_buffer_data(struct intel_batchbuffer *batch,static uint32_t gen8_fill_surface_state (struct intel_batchbuffer *batch, -struct scratch_buf *buf, +struct igt_buf *buf,uint32_t format,int is_dst) {
@@ -119,8 +119,8 @@ gen8_fill_surface_state(struct intel_batchbuffer *batch, read_domain, write_domain);assert (ret ==0 ); - ss->ss2.height =buf_height (buf) -1 ; - ss->ss2.width =buf_width (buf) -1 ; + ss->ss2.height =igt_buf_height (buf) -1 ; + ss->ss2.width =igt_buf_width (buf) -1 ; ss->ss3.pitch = buf->stride -1 ; ss->ss7.shader_chanel_select_r =4 ;
@@ -133,7 +133,7 @@ gen8_fill_surface_state(struct intel_batchbuffer *batch,static uint32_t gen8_fill_binding_table (struct intel_batchbuffer *batch, -struct scratch_buf *dst) +struct igt_buf *dst) {uint32_t *binding_table, offset;
@@ -158,7 +158,7 @@ gen8_fill_media_kernel(struct intel_batchbuffer *batch, }static uint32_t -gen8_fill_interface_descriptor (struct intel_batchbuffer *batch,struct scratch_buf *dst) +gen8_fill_interface_descriptor (struct intel_batchbuffer *batch,struct igt_buf *dst) {struct gen8_interface_descriptor_data *idd;uint32_t offset;
@@ -334,7 +334,7 @@ gen8_emit_media_objects(struct intel_batchbuffer *batch,void gen8_media_fillfunc (struct intel_batchbuffer *batch, -struct scratch_buf *dst, +struct igt_buf *dst,unsigned x,unsigned y,unsigned width,unsigned height,uint8_t color)
lib/rendercopy.h +10 -10
@@ -22,26 +22,26 @@ static inline void emit_vertex_normalized(struct intel_batchbuffer *batch,void gen8_render_copyfunc (struct intel_batchbuffer *batch,drm_intel_context *context, -struct scratch_buf *src,unsigned src_x,unsigned src_y, +struct igt_buf *src,unsigned src_x,unsigned src_y,unsigned width,unsigned height, -struct scratch_buf *dst,unsigned dst_x,unsigned dst_y); +struct igt_buf *dst,unsigned dst_x,unsigned dst_y);void gen7_render_copyfunc (struct intel_batchbuffer *batch,drm_intel_context *context, -struct scratch_buf *src,unsigned src_x,unsigned src_y, +struct igt_buf *src,unsigned src_x,unsigned src_y,unsigned width,unsigned height, -struct scratch_buf *dst,unsigned dst_x,unsigned dst_y); +struct igt_buf *dst,unsigned dst_x,unsigned dst_y);void gen6_render_copyfunc (struct intel_batchbuffer *batch,drm_intel_context *context, -struct scratch_buf *src,unsigned src_x,unsigned src_y, +struct igt_buf *src,unsigned src_x,unsigned src_y,unsigned width,unsigned height, -struct scratch_buf *dst,unsigned dst_x,unsigned dst_y); +struct igt_buf *dst,unsigned dst_x,unsigned dst_y);void gen3_render_copyfunc (struct intel_batchbuffer *batch,drm_intel_context *context, -struct scratch_buf *src,unsigned src_x,unsigned src_y, +struct igt_buf *src,unsigned src_x,unsigned src_y,unsigned width,unsigned height, -struct scratch_buf *dst,unsigned dst_x,unsigned dst_y); +struct igt_buf *dst,unsigned dst_x,unsigned dst_y);void gen2_render_copyfunc (struct intel_batchbuffer *batch,drm_intel_context *context, -struct scratch_buf *src,unsigned src_x,unsigned src_y, +struct igt_buf *src,unsigned src_x,unsigned src_y,unsigned width,unsigned height, -struct scratch_buf *dst,unsigned dst_x,unsigned dst_y); +struct igt_buf *dst,unsigned dst_x,unsigned dst_y);
lib/rendercopy_gen6.c +15 -15
@@ -107,7 +107,7 @@ gen6_render_flush(struct intel_batchbuffer *batch, }static uint32_t -gen6_bind_buf (struct intel_batchbuffer *batch,struct scratch_buf *buf, +gen6_bind_buf (struct intel_batchbuffer *batch,struct igt_buf *buf,uint32_t format,int is_dst) {struct gen6_surface_state *ss;
@@ -135,8 +135,8 @@ gen6_bind_buf(struct intel_batchbuffer *batch, struct scratch_buf *buf, read_domain, write_domain);assert (ret ==0 ); - ss->ss2.height =buf_height (buf) -1 ; - ss->ss2.width =buf_width (buf) -1 ; + ss->ss2.height =igt_buf_height (buf) -1 ; + ss->ss2.width =igt_buf_width (buf) -1 ; ss->ss3.pitch = buf->stride -1 ; ss->ss3.tiled_surface = buf->tiling !=I915_TILING_NONE ; ss->ss3.tile_walk = buf->tiling ==I915_TILING_Y ;
@@ -146,8 +146,8 @@ gen6_bind_buf(struct intel_batchbuffer *batch, struct scratch_buf *buf,static uint32_t gen6_bind_surfaces (struct intel_batchbuffer *batch, -struct scratch_buf *src, -struct scratch_buf *dst) +struct igt_buf *src, +struct igt_buf *dst) {uint32_t *binding_table;
@@ -376,11 +376,11 @@ gen6_emit_binding_table(struct intel_batchbuffer *batch, uint32_t wm_table) }static void -gen6_emit_drawing_rectangle (struct intel_batchbuffer *batch,struct scratch_buf *dst) +gen6_emit_drawing_rectangle (struct intel_batchbuffer *batch,struct igt_buf *dst) {OUT_BATCH (GEN6_3DSTATE_DRAWING_RECTANGLE | (4 -2 ));OUT_BATCH (0 ); -OUT_BATCH ((buf_height (dst) -1 ) <<16 | (buf_width (dst) -1 )); +OUT_BATCH ((igt_buf_height (dst) -1 ) <<16 | (igt_buf_width (dst) -1 ));OUT_BATCH (0 ); }
@@ -547,9 +547,9 @@ static uint32_t gen6_emit_primitive(struct intel_batchbuffer *batch)void gen6_render_copyfunc (struct intel_batchbuffer *batch,drm_intel_context *context, -struct scratch_buf *src,unsigned src_x,unsigned src_y, +struct igt_buf *src,unsigned src_x,unsigned src_y,unsigned width,unsigned height, -struct scratch_buf *dst,unsigned dst_x,unsigned dst_y) +struct igt_buf *dst,unsigned dst_x,unsigned dst_y) {uint32_t wm_state, wm_kernel, wm_table;uint32_t cc_vp, cc_blend, offset;
@@ -601,16 +601,16 @@ void gen6_render_copyfunc(struct intel_batchbuffer *batch,batch_round_upto (batch,VERTEX_SIZE )/VERTEX_SIZE ;emit_vertex_2s (batch, dst_x + width, dst_y + height); -emit_vertex_normalized (batch, src_x + width,buf_width (src)); -emit_vertex_normalized (batch, src_y + height,buf_height (src)); +emit_vertex_normalized (batch, src_x + width,igt_buf_width (src)); +emit_vertex_normalized (batch, src_y + height,igt_buf_height (src));emit_vertex_2s (batch, dst_x, dst_y + height); -emit_vertex_normalized (batch, src_x,buf_width (src)); -emit_vertex_normalized (batch, src_y + height,buf_height (src)); +emit_vertex_normalized (batch, src_x,igt_buf_width (src)); +emit_vertex_normalized (batch, src_y + height,igt_buf_height (src));emit_vertex_2s (batch, dst_x, dst_y); -emit_vertex_normalized (batch, src_x,buf_width (src)); -emit_vertex_normalized (batch, src_y,buf_height (src)); +emit_vertex_normalized (batch, src_x,igt_buf_width (src)); +emit_vertex_normalized (batch, src_y,igt_buf_height (src));gen6_render_flush (batch, context, batch_end);intel_batchbuffer_reset (batch);
lib/rendercopy_gen7.c +11 -11
@@ -93,7 +93,7 @@ gen7_tiling_bits(uint32_t tiling)static uint32_t gen7_bind_buf (struct intel_batchbuffer *batch, -struct scratch_buf *buf, +struct igt_buf *buf,uint32_t format,int is_dst) {
@@ -114,8 +114,8 @@ gen7_bind_buf(struct intel_batchbuffer *batch,gen7_tiling_bits (buf->tiling) | format << GEN7_SURFACE_FORMAT_SHIFT); ss[1 ] = buf->bo->offset; - ss[2 ] = ((buf_width (buf) -1 ) <<GEN7_SURFACE_WIDTH_SHIFT | - (buf_height (buf) -1 ) <<GEN7_SURFACE_HEIGHT_SHIFT ); + ss[2 ] = ((igt_buf_width (buf) -1 ) <<GEN7_SURFACE_WIDTH_SHIFT | + (igt_buf_height (buf) -1 ) <<GEN7_SURFACE_HEIGHT_SHIFT ); ss[3 ] = (buf->stride -1 ) <<GEN7_SURFACE_PITCH_SHIFT ; ss[4 ] =0 ; ss[5 ] =0 ;
@@ -220,8 +220,8 @@ static void gen7_emit_vertex_buffer(struct intel_batchbuffer *batch,static uint32_t gen7_bind_surfaces (struct intel_batchbuffer *batch, -struct scratch_buf *src, -struct scratch_buf *dst) +struct igt_buf *src, +struct igt_buf *dst) {uint32_t *binding_table;
@@ -237,19 +237,19 @@ gen7_bind_surfaces(struct intel_batchbuffer *batch,static void gen7_emit_binding_table (struct intel_batchbuffer *batch, -struct scratch_buf *src, -struct scratch_buf *dst) +struct igt_buf *src, +struct igt_buf *dst) {OUT_BATCH (GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS | (2 -2 ));OUT_BATCH (gen7_bind_surfaces (batch, src, dst)); }static void -gen7_emit_drawing_rectangle (struct intel_batchbuffer *batch,struct scratch_buf *dst) +gen7_emit_drawing_rectangle (struct intel_batchbuffer *batch,struct igt_buf *dst) {OUT_BATCH (GEN7_3DSTATE_DRAWING_RECTANGLE | (4 -2 ));OUT_BATCH (0 ); -OUT_BATCH ((buf_height (dst) -1 ) <<16 | (buf_width (dst) -1 )); +OUT_BATCH ((igt_buf_height (dst) -1 ) <<16 | (igt_buf_width (dst) -1 ));OUT_BATCH (0 ); }
@@ -531,9 +531,9 @@ gen7_emit_null_depth_buffer(struct intel_batchbuffer *batch)#define BATCH_STATE_SPLIT 2048void gen7_render_copyfunc (struct intel_batchbuffer *batch,drm_intel_context *context, -struct scratch_buf *src,unsigned src_x,unsigned src_y, +struct igt_buf *src,unsigned src_x,unsigned src_y,unsigned width,unsigned height, -struct scratch_buf *dst,unsigned dst_x,unsigned dst_y) +struct igt_buf *dst,unsigned dst_x,unsigned dst_y) {uint32_t batch_end;
lib/rendercopy_gen8.c +16 -16
@@ -177,7 +177,7 @@ gen6_render_flush(struct intel_batchbuffer *batch,/* Mostly copy+paste from gen6, except height, width, pitch moved */ static uint32_t -gen8_bind_buf (struct intel_batchbuffer *batch,struct scratch_buf *buf, +gen8_bind_buf (struct intel_batchbuffer *batch,struct igt_buf *buf,uint32_t format,int is_dst) {struct gen8_surface_state *ss;uint32_t write_domain, read_domain, offset;
@@ -213,8 +213,8 @@ gen8_bind_buf(struct intel_batchbuffer *batch, struct scratch_buf *buf, read_domain, write_domain);assert (ret ==0 ); - ss->ss2.height =buf_height (buf) -1 ; - ss->ss2.width =buf_width (buf) -1 ; + ss->ss2.height =igt_buf_height (buf) -1 ; + ss->ss2.width =igt_buf_width (buf) -1 ; ss->ss3.pitch = buf->stride -1 ; ss->ss7.shader_chanel_select_r =4 ;
@@ -227,8 +227,8 @@ gen8_bind_buf(struct intel_batchbuffer *batch, struct scratch_buf *buf,static uint32_t gen8_bind_surfaces (struct intel_batchbuffer *batch, -struct scratch_buf *src, -struct scratch_buf *dst) +struct igt_buf *src, +struct igt_buf *dst) {uint32_t *binding_table, offset;
@@ -295,7 +295,7 @@ gen8_fill_ps(struct intel_batchbuffer *batch,*/ static uint32_t gen7_fill_vertex_buffer_data (struct intel_batchbuffer *batch, -struct scratch_buf *src, +struct igt_buf *src,uint32_t src_x,uint32_t src_y,uint32_t dst_x,uint32_t dst_y,uint32_t width,uint32_t height)
@@ -307,16 +307,16 @@ gen7_fill_vertex_buffer_data(struct intel_batchbuffer *batch, start = batch->ptr;emit_vertex_2s (batch, dst_x + width, dst_y + height); -emit_vertex_normalized (batch, src_x + width,buf_width (src)); -emit_vertex_normalized (batch, src_y + height,buf_height (src)); +emit_vertex_normalized (batch, src_x + width,igt_buf_width (src)); +emit_vertex_normalized (batch, src_y + height,igt_buf_height (src));emit_vertex_2s (batch, dst_x, dst_y + height); -emit_vertex_normalized (batch, src_x,buf_width (src)); -emit_vertex_normalized (batch, src_y + height,buf_height (src)); +emit_vertex_normalized (batch, src_x,igt_buf_width (src)); +emit_vertex_normalized (batch, src_y + height,igt_buf_height (src));emit_vertex_2s (batch, dst_x, dst_y); -emit_vertex_normalized (batch, src_x,buf_width (src)); -emit_vertex_normalized (batch, src_y,buf_height (src)); +emit_vertex_normalized (batch, src_x,igt_buf_width (src)); +emit_vertex_normalized (batch, src_y,igt_buf_height (src)); offset =batch_offset (batch, start); annotation_add_state(&aub_annotations, AUB_TRACE_VERTEX_BUFFER,
@@ -843,11 +843,11 @@ gen7_emit_clear(struct intel_batchbuffer *batch) { }static void -gen6_emit_drawing_rectangle (struct intel_batchbuffer *batch,struct scratch_buf *dst) +gen6_emit_drawing_rectangle (struct intel_batchbuffer *batch,struct igt_buf *dst) {OUT_BATCH (GEN6_3DSTATE_DRAWING_RECTANGLE | (4 -2 ));OUT_BATCH (0 ); -OUT_BATCH ((buf_height (dst) -1 ) <<16 | (buf_width (dst) -1 )); +OUT_BATCH ((igt_buf_height (dst) -1 ) <<16 | (igt_buf_width (dst) -1 ));OUT_BATCH (0 ); }
@@ -907,9 +907,9 @@ static void gen8_emit_primitive(struct intel_batchbuffer *batch, uint32_t offsetvoid gen8_render_copyfunc (struct intel_batchbuffer *batch,drm_intel_context *context, -struct scratch_buf *src,unsigned src_x,unsigned src_y, +struct igt_buf *src,unsigned src_x,unsigned src_y,unsigned width,unsigned height, -struct scratch_buf *dst,unsigned dst_x,unsigned dst_y) +struct igt_buf *dst,unsigned dst_x,unsigned dst_y) {uint32_t ps_sampler_state, ps_kernel_off, ps_binding_table;uint32_t scissor_state;
lib/rendercopy_i830.c +14 -14
@@ -134,7 +134,7 @@ static void gen2_emit_invariant(struct intel_batchbuffer *batch) }static void gen2_emit_target (struct intel_batchbuffer *batch, -struct scratch_buf *dst) +struct igt_buf *dst) {uint32_t tiling;
@@ -156,13 +156,13 @@ static void gen2_emit_target(struct intel_batchbuffer *batch,OUT_BATCH (_3DSTATE_DRAW_RECT_CMD);OUT_BATCH (0 );OUT_BATCH (0 );/* ymin, xmin */ -OUT_BATCH (DRAW_YMAX (buf_height (dst) -1 ) | -DRAW_XMAX (buf_width (dst) -1 )); +OUT_BATCH (DRAW_YMAX (igt_buf_height (dst) -1 ) | +DRAW_XMAX (igt_buf_width (dst) -1 ));OUT_BATCH (0 );/* yorig, xorig */ }static void gen2_emit_texture (struct intel_batchbuffer *batch, -struct scratch_buf *src, +struct igt_buf *src,int unit) {uint32_t tiling;
@@ -175,8 +175,8 @@ static void gen2_emit_texture(struct intel_batchbuffer *batch,OUT_BATCH (_3DSTATE_LOAD_STATE_IMMEDIATE_2 |LOAD_TEXTURE_MAP (unit) |4 );OUT_RELOC (src->bo,I915_GEM_DOMAIN_SAMPLER ,0 ,0 ); -OUT_BATCH ((buf_height (src) -1 ) <<TM0S1_HEIGHT_SHIFT | - (buf_width (src) -1 ) <<TM0S1_WIDTH_SHIFT | +OUT_BATCH ((igt_buf_height (src) -1 ) <<TM0S1_HEIGHT_SHIFT | + (igt_buf_width (src) -1 ) <<TM0S1_WIDTH_SHIFT |MAPSURF_32BIT |MT_32BIT_ARGB8888 | tiling);OUT_BATCH ((src->stride /4 -1 ) <<TM0S2_PITCH_SHIFT |TM0S2_MAP_2D ); OUT_BATCH(FILTER_NEAREST << TM0S3_MAG_FILTER_SHIFT |
@@ -210,9 +210,9 @@ static void gen2_emit_copy_pipeline(struct intel_batchbuffer *batch)void gen2_render_copyfunc (struct intel_batchbuffer *batch,drm_intel_context *context, -struct scratch_buf *src,unsigned src_x,unsigned src_y, +struct igt_buf *src,unsigned src_x,unsigned src_y,unsigned width,unsigned height, -struct scratch_buf *dst,unsigned dst_x,unsigned dst_y) +struct igt_buf *dst,unsigned dst_x,unsigned dst_y) {gen2_emit_invariant (batch);gen2_emit_copy_pipeline (batch);
@@ -231,18 +231,18 @@ void gen2_render_copyfunc(struct intel_batchbuffer *batch,OUT_BATCH (PRIM3D_INLINE |PRIM3D_RECTLIST | (3 *4 -1 ));emit_vertex (batch, dst_x + width);emit_vertex (batch, dst_y + height); -emit_vertex_normalized (batch, src_x + width,buf_width (src)); -emit_vertex_normalized (batch, src_y + height,buf_height (src)); +emit_vertex_normalized (batch, src_x + width,igt_buf_width (src)); +emit_vertex_normalized (batch, src_y + height,igt_buf_height (src));emit_vertex (batch, dst_x);emit_vertex (batch, dst_y + height); -emit_vertex_normalized (batch, src_x,buf_width (src)); -emit_vertex_normalized (batch, src_y + height,buf_height (src)); +emit_vertex_normalized (batch, src_x,igt_buf_width (src)); +emit_vertex_normalized (batch, src_y + height,igt_buf_height (src));emit_vertex (batch, dst_x);emit_vertex (batch, dst_y); -emit_vertex_normalized (batch, src_x,buf_width (src)); -emit_vertex_normalized (batch, src_y,buf_height (src)); +emit_vertex_normalized (batch, src_x,igt_buf_width (src)); +emit_vertex_normalized (batch, src_y,igt_buf_height (src));intel_batchbuffer_flush (batch); }
lib/rendercopy_i915.c +6 -6
@@ -22,9 +22,9 @@void gen3_render_copyfunc (struct intel_batchbuffer *batch,drm_intel_context *context, -struct scratch_buf *src,unsigned src_x,unsigned src_y, +struct igt_buf *src,unsigned src_x,unsigned src_y,unsigned width,unsigned height, -struct scratch_buf *dst,unsigned dst_x,unsigned dst_y) +struct igt_buf *dst,unsigned dst_x,unsigned dst_y) {/* invariant state */ {
@@ -96,8 +96,8 @@ void gen3_render_copyfunc(struct intel_batchbuffer *batch,OUT_RELOC (src->bo,I915_GEM_DOMAIN_SAMPLER ,0 ,0 );OUT_BATCH (MAPSURF_32BIT |MT_32BIT_ARGB8888 | tiling_bits | - (buf_height (src) -1 ) <<MS3_HEIGHT_SHIFT | - (buf_width (src) -1 ) <<MS3_WIDTH_SHIFT ); + (igt_buf_height (src) -1 ) <<MS3_HEIGHT_SHIFT | + (igt_buf_width (src) -1 ) <<MS3_WIDTH_SHIFT );OUT_BATCH ((src->stride/4 -1 ) <<MS4_PITCH_SHIFT );OUT_BATCH (_3DSTATE_SAMPLER_STATE | (3 *TEX_COUNT ));
@@ -133,8 +133,8 @@ void gen3_render_copyfunc(struct intel_batchbuffer *batch,OUT_BATCH (_3DSTATE_DRAW_RECT_CMD);OUT_BATCH (0x00000000 );OUT_BATCH (0x00000000 );/* ymin, xmin */ -OUT_BATCH (DRAW_YMAX (buf_height (dst) -1 ) | -DRAW_XMAX (buf_width (dst) -1 )); +OUT_BATCH (DRAW_YMAX (igt_buf_height (dst) -1 ) | +DRAW_XMAX (igt_buf_width (dst) -1 ));/* yorig, xorig (relate to color buffer?) */ OUT_BATCH (0x00000000 ); }
tests/gem_ctx_basic.c +2 -2
@@ -61,7 +61,7 @@ int devid;int fd;static void init_buffer (drm_intel_bufmgr *bufmgr, -struct scratch_buf *buf, +struct igt_buf *buf,uint32_t size) { buf->bo =drm_intel_bo_alloc (bufmgr,"" , size,4096 );
@@ -93,7 +93,7 @@ static void *work(void *arg)igt_require (context);for (i =0 ; i < iter; i++) { -struct scratch_buf src, dst; +struct igt_buf src, dst;init_buffer (bufmgr, &src,4096 );init_buffer (bufmgr, &dst,4096 );
tests/gem_media_fill.c +3 -3
@@ -66,7 +66,7 @@ typedef struct {uint8_t linear[WIDTH *HEIGHT ]; } data_t; -static void scratch_buf_init (data_t *data,struct scratch_buf *buf, +static void scratch_buf_init (data_t *data,struct igt_buf *buf,int width,int height,int stride,uint8_t color) {drm_intel_bo *bo;
@@ -85,7 +85,7 @@ static void scratch_buf_init(data_t *data, struct scratch_buf *buf, }static void -scratch_buf_check (data_t *data,struct scratch_buf *buf,int x,int y, +scratch_buf_check (data_t *data,struct igt_buf *buf,int x,int y,uint8_t color) {uint8_t val;
@@ -104,7 +104,7 @@ igt_simple_main {data_t data = {0 , };struct intel_batchbuffer *batch =NULL ; -struct scratch_buf dst; +struct igt_buf dst;media_fillfunc_t media_fill =NULL ;int i, j;
tests/gem_render_copy.c +6 -6
@@ -66,7 +66,7 @@ typedef struct {uint32_t linear[WIDTH *HEIGHT ]; } data_t; -static void scratch_buf_write_to_png (struct scratch_buf *buf,const char *filename) +static void scratch_buf_write_to_png (struct igt_buf *buf,const char *filename) {cairo_surface_t *surface;cairo_status_t ret;
@@ -74,8 +74,8 @@ static void scratch_buf_write_to_png(struct scratch_buf *buf, const char *filenadrm_intel_bo_map (buf->bo,0 ); surface =cairo_image_surface_create_for_data (buf->bo->virtual,CAIRO_FORMAT_RGB24 , -buf_width (buf), -buf_height (buf), +igt_buf_width (buf), +igt_buf_height (buf), buf->stride); ret =cairo_surface_write_to_png (surface, filename);if (ret !=CAIRO_STATUS_SUCCESS ) {
@@ -86,7 +86,7 @@ static void scratch_buf_write_to_png(struct scratch_buf *buf, const char *filenadrm_intel_bo_unmap (buf->bo); } -static void scratch_buf_init (data_t *data,struct scratch_buf *buf, +static void scratch_buf_init (data_t *data,struct igt_buf *buf,int width,int height,int stride,uint32_t color) {drm_intel_bo *bo;
@@ -105,7 +105,7 @@ static void scratch_buf_init(data_t *data, struct scratch_buf *buf, }static void -scratch_buf_check (data_t *data,struct scratch_buf *buf,int x,int y, +scratch_buf_check (data_t *data,struct igt_buf *buf,int x,int y,uint32_t color) {uint32_t val;
@@ -124,7 +124,7 @@ int main(int argc, char **argv) {data_t data = {0 , };struct intel_batchbuffer *batch =NULL ; -struct scratch_buf src, dst; +struct igt_buf src, dst;render_copyfunc_t render_copy =NULL ;int opt;int opt_dump_png = false;
tests/gem_render_linear_blits.c +3 -3
@@ -137,7 +137,7 @@ int main(int argc, char **argv)printf ("Cyclic blits, forward...\n" );for (i =0 ; i < count *4 ; i++) { -struct scratch_buf src, dst; +struct igt_buf src, dst; src.bo = bo[i % count]; src.stride =STRIDE ;
@@ -160,7 +160,7 @@ int main(int argc, char **argv)printf ("Cyclic blits, backward...\n" );for (i =0 ; i < count *4 ; i++) { -struct scratch_buf src, dst; +struct igt_buf src, dst; src.bo = bo[(i +1 ) % count]; src.stride =STRIDE ;
@@ -180,7 +180,7 @@ int main(int argc, char **argv)printf ("Random blits...\n" );for (i =0 ; i < count *4 ; i++) { -struct scratch_buf src, dst; +struct igt_buf src, dst;int s =random () % count;int d =random () % count;
tests/gem_render_tiled_blits.c +1 -1
@@ -84,7 +84,7 @@ int main(int argc, char **argv)drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;uint32_t *start_val; -struct scratch_buf *buf; +struct igt_buf *buf;uint32_t start =0 ;int i, j, fd, count;
tests/gem_ring_sync_copy.c +6 -6
@@ -70,8 +70,8 @@ typedef struct {struct {render_copyfunc_t copy; -struct scratch_buf *srcs; -struct scratch_buf *dsts; +struct igt_buf *srcs; +struct igt_buf *dsts; } render;struct {
@@ -128,7 +128,7 @@ static void bo_check(data_t *data, drm_intel_bo *bo, uint32_t val) igt_assert_cmpint(data->linear[i], ==, val); } -static void scratch_buf_init_from_bo (struct scratch_buf *buf,drm_intel_bo *bo) +static void scratch_buf_init_from_bo (struct igt_buf *buf,drm_intel_bo *bo) { buf->bo = bo; buf->stride =4 *WIDTH ;
@@ -136,7 +136,7 @@ static void scratch_buf_init_from_bo(struct scratch_buf *buf, drm_intel_bo *bo) buf->size =4 *WIDTH *HEIGHT ; } -static void scratch_buf_init (data_t *data,struct scratch_buf *buf, +static void scratch_buf_init (data_t *data,struct igt_buf *buf,int width,int height,uint32_t color) {drm_intel_bo *bo;
@@ -162,7 +162,7 @@ static void render_busy(data_t *data)size_t array_size;int i; - array_size = data->n_buffers_load *sizeof (struct scratch_buf ); + array_size = data->n_buffers_load *sizeof (struct igt_buf ); data->render.srcs =malloc (array_size); data->render.dsts =malloc (array_size);
@@ -201,7 +201,7 @@ static void render_busy_fini(data_t *data)static void render_copy (data_t *data,drm_intel_bo *src,drm_intel_bo *dst) { -struct scratch_buf src_buf, dst_buf; +struct igt_buf src_buf, dst_buf;scratch_buf_init_from_bo (&src_buf, src);scratch_buf_init_from_bo (&dst_buf, dst);
tests/gem_ringfill.c +3 -3
@@ -115,7 +115,7 @@ static int check_ring(drm_intel_bufmgr *bufmgr,const char *ring, render_copyfunc_t copy) { - struct scratch_buf src, tmp, dst; + struct igt_buf src, tmp, dst;struct bo bo;char output[100 ];int i;
@@ -174,9 +174,9 @@ static int check_ring(drm_intel_bufmgr *bufmgr,static void blt_copy (struct intel_batchbuffer *batch,drm_intel_context *context, -struct scratch_buf *src,unsigned src_x,unsigned src_y, +struct igt_buf *src,unsigned src_x,unsigned src_y,unsigned w,unsigned h, -struct scratch_buf *dst,unsigned dst_x,unsigned dst_y) +struct igt_buf *dst,unsigned dst_x,unsigned dst_y) {BLIT_COPY_BATCH_START (batch->devid,0 ); OUT_BATCH((3 << 24) | /* 32 bits */
tests/gem_seqno_wrap.c +4 -4
@@ -70,7 +70,7 @@ struct option_struct {static struct option_struct options;static void init_buffer (drm_intel_bufmgr *bufmgr, -struct scratch_buf *buf, +struct igt_buf *buf,drm_intel_bo *bo,int width,int height) {
@@ -139,8 +139,8 @@ static void release_bo(drm_intel_bo *bo)drm_intel_bo_unreference (bo); } -static void render_copyfunc (struct scratch_buf *src, -struct scratch_buf *dst, +static void render_copyfunc (struct igt_buf *src, +struct igt_buf *dst,int width,int height) {
@@ -188,7 +188,7 @@ static int run_sync_test(int num_buffers, bool verify)int r =-1 ;int failed =0 ;unsigned int *p_dst1, *p_dst2; -struct scratch_buf *s_src, *s_dst; +struct igt_buf *s_src, *s_dst; fd =drm_open_any ();igt_assert (fd >=0 );
tests/gem_stress.c +32 -32
157 lines not on this page · raw message
tests/kms_fbc_crc.c +2 -2
@@ -168,7 +168,7 @@ static void fill_blt(data_t *data, uint32_t handle, unsigned char color)gem_bo_busy (data->drm_fd, handle); } -static void scratch_buf_init (struct scratch_buf *buf,drm_intel_bo *bo) +static void scratch_buf_init (struct igt_buf *buf,drm_intel_bo *bo) { buf->bo = bo; buf->stride =4096 ;
@@ -204,7 +204,7 @@ static void fill_render(data_t *data, uint32_t handle, {drm_intel_bo *src, *dst;struct intel_batchbuffer *batch; -struct scratch_buf src_buf, dst_buf; +struct igt_buf src_buf, dst_buf;const uint8_t buf[4 ] = { color, color, color, color };render_copyfunc_t rendercopy =get_render_copyfunc (data->devid);
tests/kms_flip.c +2 -2
@@ -248,7 +248,7 @@ static void emit_dummy_load__rcs(struct test_output *o) {const struct kmstest_fb *fb_info = &o->fb_info[o->current_fb_id];render_copyfunc_t copyfunc; -struct scratch_buf sb[2 ], *src, *dst; +struct igt_buf sb[2 ], *src, *dst;int i, limit; copyfunc =get_render_copyfunc (devid);
@@ -277,7 +277,7 @@ static void emit_dummy_load__rcs(struct test_output *o) dst = &sb[1 ];for (i =0 ; i < limit; i++) { -struct scratch_buf *tmp; +struct igt_buf *tmp; copyfunc(batch, NULL, src, 0, 0,
Signature · 1 line
1.8.5.2
PATCH 9/28 lib/intel_batchbuffer: igt_ prefix for rendercopy/mediafill funcs
In reply to Daniel VetterNow everything is prepared to pour some neat api docs over this all.
--- lib/intel_batchbuffer.c | 14 +++++++------- lib/intel_batchbuffer.h | 24 ++++++++++++------------ tests/gem_ctx_basic.c | 2 +- tests/gem_media_fill.c | 4 ++-- tests/gem_render_copy.c | 4 ++-- tests/gem_render_linear_blits.c | 4 ++-- tests/gem_render_tiled_blits.c | 4 ++-- tests/gem_ring_sync_copy.c | 4 ++-- tests/gem_ringfill.c | 6 +++--- tests/gem_seqno_wrap.c | 2 +- tests/gem_stress.c | 2 +- tests/kms_fbc_crc.c | 2 +- tests/kms_flip.c | 4 ++-- 13 files changed, 38 insertions(+), 38 deletions(-)
lib/intel_batchbuffer.c +7 -7
@@ -298,9 +298,9 @@ intel_batchbuffer_data(struct intel_batchbuffer *batch,*/ void intel_blt_copy (struct intel_batchbuffer *batch, -drm_intel_bo *src_bo,int src_x1,int src_y1,int src_pitch, -drm_intel_bo *dst_bo,int dst_x1,int dst_y1,int dst_pitch, -int width,int height,int bpp) +drm_intel_bo *src_bo,int src_x1,int src_y1,int src_pitch, +drm_intel_bo *dst_bo,int dst_x1,int dst_y1,int dst_pitch, +int width,int height,int bpp) {uint32_t src_tiling, dst_tiling, swizzle;uint32_t cmd_bits =0 ;
@@ -397,9 +397,9 @@ unsigned igt_buf_height(struct igt_buf *buf)return buf->size/buf->stride; } -render_copyfunc_t get_render_copyfunc (int devid) +igt_render_copyfunc_t igt_get_render_copyfunc (int devid) { -render_copyfunc_t copy =NULL ; +igt_render_copyfunc_t copy =NULL ;if (IS_GEN2 (devid)) copy = gen2_render_copyfunc;
@@ -415,9 +415,9 @@ render_copyfunc_t get_render_copyfunc(int devid)return copy; } -media_fillfunc_t get_media_fillfunc (int devid) +igt_media_fillfunc_t igt_get_media_fillfunc (int devid) { -media_fillfunc_t fill =NULL ; +igt_media_fillfunc_t fill =NULL ;if (IS_GEN8 (devid)) fill = gen8_media_fillfunc;
lib/intel_batchbuffer.h +12 -12
@@ -209,20 +209,20 @@ struct igt_buf {unsigned igt_buf_width (struct igt_buf *buf);unsigned igt_buf_height (struct igt_buf *buf); -typedef void (*render_copyfunc_t )(struct intel_batchbuffer *batch, -drm_intel_context *context, -struct igt_buf *src,unsigned src_x,unsigned src_y, -unsigned width,unsigned height, -struct igt_buf *dst,unsigned dst_x,unsigned dst_y); +typedef void (*igt_render_copyfunc_t )(struct intel_batchbuffer *batch, +drm_intel_context *context, +struct igt_buf *src,unsigned src_x,unsigned src_y, +unsigned width,unsigned height, +struct igt_buf *dst,unsigned dst_x,unsigned dst_y); -render_copyfunc_t get_render_copyfunc (int devid); +igt_render_copyfunc_t igt_get_render_copyfunc (int devid); -typedef void (*media_fillfunc_t )(struct intel_batchbuffer *batch, -struct igt_buf *dst, -unsigned x,unsigned y, -unsigned width,unsigned height, -uint8_t color); +typedef void (*igt_media_fillfunc_t )(struct intel_batchbuffer *batch, +struct igt_buf *dst, +unsigned x,unsigned y, +unsigned width,unsigned height, +uint8_t color); -media_fillfunc_t get_media_fillfunc (int devid); +igt_media_fillfunc_t igt_get_media_fillfunc (int devid);#endif
tests/gem_ctx_basic.c +1 -1
@@ -74,7 +74,7 @@ static void init_buffer(drm_intel_bufmgr *bufmgr,static void *work (void *arg) {struct intel_batchbuffer *batch; -render_copyfunc_t rendercopy =get_render_copyfunc (devid); +igt_render_copyfunc_t rendercopy =igt_get_render_copyfunc (devid);drm_intel_context *context;drm_intel_bufmgr *bufmgr;int td_fd;
tests/gem_media_fill.c +2 -2
@@ -105,7 +105,7 @@ igt_simple_maindata_t data = {0 , };struct intel_batchbuffer *batch =NULL ;struct igt_buf dst; -media_fillfunc_t media_fill =NULL ; +igt_media_fillfunc_t media_fill =NULL ;int i, j; data.drm_fd =drm_open_any_render ();
@@ -114,7 +114,7 @@ igt_simple_main data.bufmgr =drm_intel_bufmgr_gem_init (data.drm_fd,4096 );igt_assert (data.bufmgr); - media_fill =get_media_fillfunc (data.devid); + media_fill =igt_get_media_fillfunc (data.devid);igt_require_f (media_fill,"no media-fill function\n" );
tests/gem_render_copy.c +2 -2
@@ -125,7 +125,7 @@ int main(int argc, char **argv)data_t data = {0 , };struct intel_batchbuffer *batch =NULL ;struct igt_buf src, dst; -render_copyfunc_t render_copy =NULL ; +igt_render_copyfunc_t render_copy =NULL ;int opt;int opt_dump_png = false;int opt_dump_aub =drmtest_dump_aub ();
@@ -149,7 +149,7 @@ int main(int argc, char **argv) data.bufmgr =drm_intel_bufmgr_gem_init (data.drm_fd,4096 );igt_assert (data.bufmgr); - render_copy =get_render_copyfunc (data.devid); + render_copy =igt_get_render_copyfunc (data.devid);igt_require_f (render_copy,"no render-copy function\n" );
tests/gem_render_linear_blits.c +2 -2
@@ -61,7 +61,7 @@#define SIZE (HEIGHT*STRIDE)static uint32_t linear[WIDTH *HEIGHT ]; -static render_copyfunc_t render_copy; +static igt_render_copyfunc_t render_copy;static void check_bo (int fd,uint32_t handle,uint32_t val)
@@ -93,7 +93,7 @@ int main(int argc, char **argv) fd =drm_open_any (); - render_copy =get_render_copyfunc (intel_get_drm_devid (fd)); + render_copy =igt_get_render_copyfunc (intel_get_drm_devid (fd));if (render_copy ==NULL ) {printf ("no render-copy function, doing nothing\n" );return 77 ;
tests/gem_render_tiled_blits.c +2 -2
@@ -57,7 +57,7 @@#define HEIGHT 512#define SIZE (HEIGHT*STRIDE) -static render_copyfunc_t render_copy; +static igt_render_copyfunc_t render_copy;static void check_bo (drm_intel_bo *bo,uint32_t val)
@@ -94,7 +94,7 @@ int main(int argc, char **argv) fd =drm_open_any (); - render_copy =get_render_copyfunc (intel_get_drm_devid (fd)); + render_copy =igt_get_render_copyfunc (intel_get_drm_devid (fd));if (render_copy ==NULL ) {printf ("no render-copy function, doing nothing\n" );return 77 ;
tests/gem_ring_sync_copy.c +2 -2
@@ -69,7 +69,7 @@ typedef struct {uint32_t linear[WIDTH *HEIGHT ];struct { -render_copyfunc_t copy; +igt_render_copyfunc_t copy;struct igt_buf *srcs;struct igt_buf *dsts; } render;
@@ -336,7 +336,7 @@ igt_mainigt_assert (data.bufmgr);drm_intel_bufmgr_gem_enable_reuse (data.bufmgr); - data.render.copy =get_render_copyfunc (data.devid); + data.render.copy =igt_get_render_copyfunc (data.devid);igt_require_f (data.render.copy,"no render-copy function\n" );
tests/gem_ringfill.c +3 -3
@@ -113,7 +113,7 @@ static void destroy_bo(struct bo *b)static int check_ring (drm_intel_bufmgr *bufmgr,struct intel_batchbuffer *batch,const char *ring, -render_copyfunc_t copy) +igt_render_copyfunc_t copy) {struct igt_buf src, tmp, dst;struct bo bo;
@@ -197,7 +197,7 @@ static void blt_copy(struct intel_batchbuffer *batch,drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch; -render_copyfunc_t copy; +igt_render_copyfunc_t copy;int fd; igt_main
@@ -219,7 +219,7 @@ igt_main/* Strictly only required on architectures with a separate BLT ring, * but lets stress everybody. */ - copy =get_render_copyfunc (batch->devid); + copy =igt_get_render_copyfunc (batch->devid);igt_require (copy); }
tests/gem_seqno_wrap.c +1 -1
@@ -145,7 +145,7 @@ static void render_copyfunc(struct igt_buf *src, int height) {const int src_x =0 , src_y =0 , dst_x =0 , dst_y =0 ; -render_copyfunc_t rendercopy =get_render_copyfunc (devid); +igt_render_copyfunc_t rendercopy =igt_get_render_copyfunc (devid);static int warned =0 ;if (rendercopy) {
tests/gem_stress.c +1 -1
@@ -338,7 +338,7 @@ static void render_copyfunc(struct igt_buf *src, unsigned src_x, unsigned src_y, unsigned logical_tile_no) {static unsigned keep_gpu_busy_counter =0 ; -render_copyfunc_t rendercopy =get_render_copyfunc (devid); +igt_render_copyfunc_t rendercopy =igt_get_render_copyfunc (devid);/* check both edges of the fence usage */ if (keep_gpu_busy_counter &1 )
tests/kms_fbc_crc.c +1 -1
@@ -206,7 +206,7 @@ static void fill_render(data_t *data, uint32_t handle,struct intel_batchbuffer *batch;struct igt_buf src_buf, dst_buf;const uint8_t buf[4 ] = { color, color, color, color }; -render_copyfunc_t rendercopy =get_render_copyfunc (data->devid); +igt_render_copyfunc_t rendercopy =igt_get_render_copyfunc (data->devid);igt_skip_on (!rendercopy);
tests/kms_flip.c +2 -2
@@ -247,11 +247,11 @@ static void emit_fence_stress(struct test_output *o)static void emit_dummy_load__rcs (struct test_output *o) {const struct kmstest_fb *fb_info = &o->fb_info[o->current_fb_id]; -render_copyfunc_t copyfunc; +igt_render_copyfunc_t copyfunc;struct igt_buf sb[2 ], *src, *dst;int i, limit; - copyfunc =get_render_copyfunc (devid); + copyfunc =igt_get_render_copyfunc (devid);if (copyfunc ==NULL )return emit_dummy_load__bcs (o);
Signature · 1 line
1.8.5.2
PATCH 10/28 lib/intel_batchbuffer: drop cpu_mapping from igt_buf
In reply to Daniel VetterIt's unused. There's still num_tiles getting in the way of things, but that is used by gem_stress a bit.
--- lib/intel_batchbuffer.h | 1 - tests/gem_ringfill.c | 1 - tests/gem_seqno_wrap.c | 1 - 3 files changed, 3 deletions(-)
lib/intel_batchbuffer.h +0 -1
@@ -201,7 +201,6 @@ struct igt_buf {uint32_t stride;uint32_t tiling;uint32_t *data; -uint32_t *cpu_mapping;uint32_t size;unsigned num_tiles; };
tests/gem_ringfill.c +0 -1
@@ -126,7 +126,6 @@ static int check_ring(drm_intel_bufmgr *bufmgr, src.stride =4 * width; src.tiling =0 ; - src.data = src.cpu_mapping =NULL ; src.size =4 * width * height; src.num_tiles =4 * width * height; dst = tmp = src;
tests/gem_seqno_wrap.c +0 -1
@@ -79,7 +79,6 @@ static void init_buffer(drm_intel_bufmgr *bufmgr, buf->size = width * height *4 ;igt_assert (buf->bo); buf->tiling =I915_TILING_NONE ; - buf->data = buf->cpu_mapping =NULL ; buf->num_tiles = width * height *4 ; buf->stride = width *4 ; }
Signature · 1 line
1.8.5.2
PATCH 11/28 lib/intel_batchbuffer: api documentation for render copy/media fill
In reply to Daniel VetterAlso fix a fumble in the documentation for intel_blt_copy. One thing we might want to do is unify the parameter ordering here a bit ...
Again gtkdoc fails to pick up the documentation for struct igt_buf :(
--- lib/intel_batchbuffer.c | 41 +++++++++++++++++++++++++++++++++++-- lib/intel_batchbuffer.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 2 deletions(-)
lib/intel_batchbuffer.c +39 -2
@@ -286,8 +286,8 @@ intel_batchbuffer_data(struct intel_batchbuffer *batch,* @src_y1: source pixel y-coordination * @src_pitch: @src_bo's pitch in bytes * @dst_bo: destination libdrm buffer object -* @dst_x1: source pixel x-coordination -* @dst_y1: source pixel y-coordination +* @dst_x1: destination pixel x-coordination +* @dst_y1: destination pixel y-coordination * @dst_pitch: @dst_bo's pitch in bytes * @width: width of the copied rectangle * @height: height of the copied rectangle
@@ -387,16 +387,44 @@ intel_copy_bo(struct intel_batchbuffer *batch, 4096/4, size/4096, 32); } +/** +* igt_buf_width: +* @buf: the i-g-t buffer object +* +* Computes the widht in 32-bit pixels of the given buffer. +* +* Returns: +* The width of the buffer. +*/ unsigned igt_buf_width (struct igt_buf *buf) {return buf->stride/sizeof (uint32_t ); } +/** +* igt_buf_height: +* @buf: the i-g-t buffer object +* +* Computes the height in 32-bit pixels of the given buffer. +* +* Returns: +* The height of the buffer. +*/ unsigned igt_buf_height (struct igt_buf *buf) {return buf->size/buf->stride; } +/** +* igt_get_render_copyfunc: +* @devid: pci device id +* +* Returns: +* +* The platform-specific render copy function pointer for the device +* specified with @devid. Will return NULL when no render copy function is +* implemented. +*/ igt_render_copyfunc_t igt_get_render_copyfunc (int devid) {igt_render_copyfunc_t copy =NULL ;
@@ -415,6 +443,15 @@ igt_render_copyfunc_t igt_get_render_copyfunc(int devid)return copy; } +/** +* igt_get_media_fillfunc: +* @devid: pci device id +* +* Returns: +* +* The platform-specific media fill function pointer for the device specified +* with @devid. Will return NULL when no media fill function is implemented. +*/ igt_media_fillfunc_t igt_get_media_fillfunc (int devid) {igt_media_fillfunc_t fill =NULL ;
lib/intel_batchbuffer.h +54 -0
72 lines not on this page · raw message
Signature · 1 line
1.8.5.2
PATCH 12/28 lib: Move non-register things out of intel-gpu-tools.h
In reply to Daniel VetterRight now almost everything in there concerns itself with register access. Move everything else out (into drmtest.h for lack of better place) to prepare for api documentation.
Also rename intel_drm.c to intel_os.c since it contains OS, not drm abstractions.
--- lib/Makefile.sources | 2 +- lib/drmtest.h | 17 +++++ lib/intel_drm.c | 158 ------------------------------------------- lib/intel_gpu_tools.h | 50 +++++--------- lib/intel_os.c | 158 +++++++++++++++++++++++++++++++++++++++++++ tools/quick_dump/Makefile.am | 2 +- 6 files changed, 194 insertions(+), 193 deletions(-) delete mode 100644 lib/intel_drm.c create mode 100644 lib/intel_os.c
lib/Makefile.sources +1 -1
@@ -15,7 +15,7 @@ libintel_tools_la_SOURCES = \ intel_batchbuffer.c \ intel_batchbuffer.h \ intel_chipset.h \ - intel_drm.c \ + intel_os.c \ intel_gpu_tools.h \ intel_mmio.c \ intel_chipset.c \
lib/drmtest.h +17 -0
@@ -47,6 +47,19 @@#include "ioctl_wrappers.h" #include "igt_core.h" +#ifdef ANDROID +#ifndef HAVE_MMAP64 +extern void *__mmap2 (void *,size_t ,int ,int ,int ,off_t ); +static inline void *mmap64 (void *addr,size_t length,int prot,int flags, +int fd,off64_t offset) +{ +return __mmap2 (addr, length, prot, flags, fd, offset >>12 ); +} +#endif +#endif + +#define ARRAY_SIZE (arr) (sizeof(arr)/sizeof(arr[0])) +int drm_get_card (void );int drm_open_any (void );int drm_open_any_render (void );
@@ -85,4 +98,8 @@ void igt_drop_root(void);void igt_wait_for_keypress (void ); +/* sysinfo cross-arch wrappers from intel_os.c */ +uint64_t intel_get_total_ram_mb (void ); +uint64_t intel_get_total_swap_mb (void ); +#endif /* DRMTEST_H */
lib/intel_drm.c deleted +0 -158
158 lines not on this page · raw message
lib/intel_gpu_tools.h +17 -33
76 lines not on this page · raw message
lib/intel_os.c new file +158 -0
158 lines not on this page · raw message
tools/quick_dump/Makefile.am +1 -1
@@ -8,7 +8,7 @@ bin_SCRIPTS = chipset.py lib_LTLIBRARIES = I915ChipsetPython.la I915ChipsetPython_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) $(PCIACCESS_LIBS) I915ChipsetPython_la_SOURCES = chipset_wrap_python.c chipset_macro_wrap.c \ - $(top_srcdir)/lib/intel_drm.c \ + $(top_srcdir)/lib/intel_os.c \ $(top_srcdir)/lib/intel_chipset.c \ $(top_srcdir)/lib/intel_reg_map.c \ $(top_srcdir)/lib/intel_mmio.c \
Signature · 6 lines
1.8.5.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 13/28 tests|lib: remove assert.h includes
In reply to Daniel VetterOnly the igt core and non-test tools should have asserts to catch internal errors, tests and helper libraries should all user igt_asert instead.
Fix things up where assert instead of igt_assert was used.
One tiny step towards header sanity.
--- lib/drmtest.c | 2 +- lib/drmtest.h | 1 - lib/igt_core.c | 1 + lib/igt_kms.c | 6 +++--- lib/intel_batchbuffer.h | 10 +++++----- lib/ioctl_wrappers.c | 2 +- lib/media_fill.h | 1 - tests/drv_suspend.c | 4 ++-- tests/gem_ctx_basic.c | 2 -- tests/gem_fence_thrash.c | 32 ++++++++++++++++---------------- tests/gem_media_fill.c | 2 -- tests/gem_render_copy.c | 2 -- tests/gem_render_linear_blits.c | 2 -- tests/gem_render_tiled_blits.c | 2 -- tests/gem_storedw_batches_loop.c | 2 +- tests/gem_stress.c | 2 -- tests/gem_wait_render_timeout.c | 2 -- tests/igt_simulation.c | 1 + tests/kms_setmode.c | 25 ++++++++++++------------- tests/pm_rps.c | 2 +- tests/testdisplay.c | 4 ++-- tools/intel_l3_parity.c | 1 + 22 files changed, 47 insertions(+), 61 deletions(-)
lib/drmtest.c +1 -1
@@ -396,7 +396,7 @@ void igt_init_aperture_trashers(drm_intel_bufmgr *bufmgr) num_trash_bos =gem_mappable_aperture_size () / (1024 *1024 ); trash_bos =malloc (num_trash_bos *sizeof (drm_intel_bo *)); -assert (trash_bos); +igt_assert (trash_bos);for (i =0 ; i < num_trash_bos; i++) trash_bos[i] =drm_intel_bo_alloc (bufmgr,"trash bo" ,1024 *1024 ,4096 );
lib/drmtest.h +0 -1
@@ -31,7 +31,6 @@#include <stdio.h> #include <stdlib.h> #include <unistd.h> -#include <assert.h> #include <errno.h> #include <stdbool.h> #include <setjmp.h>
lib/igt_core.c +1 -0
@@ -32,6 +32,7 @@#include <libgen.h> #endif #include <stdio.h> +#include <assert.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/ioctl.h>
lib/igt_kms.c +3 -3
@@ -146,7 +146,7 @@ int kmstest_cairo_printf_line(cairo_t *cr, enum kmstest_text_align align,va_start (ap, fmt); ret =vasprintf (&text, fmt, ap); -assert (ret >=0 ); +igt_assert (ret >=0 );va_end (ap);cairo_text_extents (cr, text, &extents);
@@ -221,7 +221,7 @@ void kmstest_paint_test_pattern(cairo_t *cr, int width, int height)paint_marker (cr,0 , height);paint_marker (cr, width, height); -assert (!cairo_status (cr)); +igt_assert (!cairo_status (cr)); } void kmstest_paint_image(cairo_t *cr, const char *filename,
@@ -232,7 +232,7 @@ void kmstest_paint_image(cairo_t *cr, const char *filename,double scale_x, scale_y; image =cairo_image_surface_create_from_png (filename); -assert (cairo_surface_status (image) ==CAIRO_STATUS_SUCCESS ); +igt_assert (cairo_surface_status (image) ==CAIRO_STATUS_SUCCESS ); img_width =cairo_image_surface_get_width (image); img_height =cairo_image_surface_get_height (image);
lib/intel_batchbuffer.h +5 -5
@@ -1,9 +1,9 @@#ifndef INTEL_BATCHBUFFER_H #define INTEL_BATCHBUFFER_H -#include <assert.h> #include <stdint.h> #include "intel_bufmgr.h" +#include "igt_core.h" #define BATCH_SZ 4096#define BATCH_RESERVED 16
@@ -58,7 +58,7 @@ intel_batchbuffer_space(struct intel_batchbuffer *batch)static inline void intel_batchbuffer_emit_dword (struct intel_batchbuffer *batch,uint32_t dword) { -assert (intel_batchbuffer_space (batch) >=4 ); +igt_assert (intel_batchbuffer_space (batch) >=4 ); *(uint32_t *) (batch->ptr) = dword; batch->ptr +=4 ; }
@@ -67,7 +67,7 @@ static inline void intel_batchbuffer_require_space(struct intel_batchbuffer *batch, unsigned int sz) { - assert(sz < BATCH_SZ - BATCH_RESERVED); + igt_assert(sz < BATCH_SZ - BATCH_RESERVED);if (intel_batchbuffer_space (batch) < sz)intel_batchbuffer_flush (batch); }
@@ -110,7 +110,7 @@ intel_batchbuffer_require_space(struct intel_batchbuffer *batch,* scope. */ #define OUT_RELOC_FENCED (buf, read_domains, write_domain, delta) do { \ - assert((delta) >= 0); \ + igt_assert((delta) >= 0); \ intel_batchbuffer_emit_reloc(batch, buf, delta, \ read_domains, write_domain, 1); \ } while (0)
@@ -128,7 +128,7 @@ intel_batchbuffer_require_space(struct intel_batchbuffer *batch,* scope. */ #define OUT_RELOC (buf, read_domains, write_domain, delta) do { \ - assert((delta) >= 0); \ + igt_assert((delta) >= 0); \ intel_batchbuffer_emit_reloc(batch, buf, delta, \ read_domains, write_domain, 0); \ } while (0)
lib/ioctl_wrappers.c +1 -1
@@ -808,7 +808,7 @@ void gem_require_ring(int fd, int ring_id)return ;#endif default : -assert (0 ); +igt_assert (0 );return ; } }
lib/media_fill.h +0 -1
@@ -5,7 +5,6 @@#include <sys/ioctl.h> #include <stdio.h> #include <string.h> -#include <assert.h> #include <fcntl.h> #include <inttypes.h> #include <errno.h>
tests/drv_suspend.c +2 -2
@@ -109,7 +109,7 @@ test_debugfs_reader(void)snprintf (tmp,sizeof (tmp) -1 ,"while true; do find %s/%i/ -type f | xargs cat > /dev/null 2>&1; done" , dfs_base,drm_get_card ()); -assert (execl ("/bin/sh" ,"sh" ,"-c" , tmp, (char *)NULL ) !=-1 ); +igt_assert (execl ("/bin/sh" ,"sh" ,"-c" , tmp, (char *)NULL ) !=-1 ); }sleep (1 );
@@ -134,7 +134,7 @@ test_sysfs_reader(void)snprintf (tmp,sizeof (tmp) -1 ,"while true; do find %s%i*/ -type f | xargs cat > /dev/null 2>&1; done" , dfs_base,drm_get_card ()); -assert (execl ("/bin/sh" ,"sh" ,"-c" , tmp, (char *)NULL ) !=-1 ); +igt_assert (execl ("/bin/sh" ,"sh" ,"-c" , tmp, (char *)NULL ) !=-1 ); }sleep (1 );
tests/gem_ctx_basic.c +0 -2
@@ -30,12 +30,10 @@*/ #include <pthread.h> -#include <assert.h> #include <stdlib.h> #include <sys/ioctl.h> #include <stdio.h> #include <string.h> -#include <assert.h> #include <fcntl.h> #include <inttypes.h> #include <errno.h>
tests/gem_fence_thrash.c +16 -16
@@ -113,8 +113,8 @@ _bo_write_verify(struct test *t)unsigned int dwords =OBJECT_SIZE >>2 ;const char *tile_str[] = {"none" ,"x" ,"y" }; -assert (t->tiling >=0 && t->tiling <=I915_TILING_Y ); -assert (t->num_surfaces >0 ); +igt_assert (t->tiling >=0 && t->tiling <=I915_TILING_Y ); +igt_assert (t->num_surfaces >0 ); s =calloc (sizeof (*s), t->num_surfaces);igt_assert (s);
@@ -171,7 +171,7 @@ static int run_test(int threads_per_fence, void *f, int tiling, t.num_surfaces = surfaces_per_thread; num_fences =gem_available_fences (t.fd); -assert (num_fences >0 ); +igt_assert (num_fences >0 ); num_threads = threads_per_fence * num_fences;
@@ -181,7 +181,7 @@ static int run_test(int threads_per_fence, void *f, int tiling,if (threads_per_fence) { threads =calloc (sizeof (*threads), num_threads); -assert (threads !=NULL ); +igt_assert (threads !=NULL );for (n =0 ; n < num_threads; n++)pthread_create (&threads[n],NULL , f, &t);
@@ -203,29 +203,29 @@ igt_mainigt_skip_on_simulation (); igt_subtest("bo-write-verify-none") - assert (run_test(0, bo_write_verify, I915_TILING_NONE, 80) == 0); +igt_assert (run_test (0 , bo_write_verify,I915_TILING_NONE ,80 ) ==0 ); igt_subtest("bo-write-verify-x") - assert (run_test(0, bo_write_verify, I915_TILING_X, 80) == 0); +igt_assert (run_test (0 , bo_write_verify,I915_TILING_X ,80 ) ==0 ); igt_subtest("bo-write-verify-y") - assert (run_test(0, bo_write_verify, I915_TILING_Y, 80) == 0); +igt_assert (run_test (0 , bo_write_verify,I915_TILING_Y ,80 ) ==0 ); igt_subtest("bo-write-verify-threaded-none") - assert (run_test(5, bo_write_verify, I915_TILING_NONE, 2) == 0); +igt_assert (run_test (5 , bo_write_verify,I915_TILING_NONE ,2 ) ==0 ); igt_subtest("bo-write-verify-threaded-x") { -assert (run_test (2 , bo_write_verify,I915_TILING_X ,2 ) ==0 ); -assert (run_test (5 , bo_write_verify,I915_TILING_X ,2 ) ==0 ); -assert (run_test (10 , bo_write_verify,I915_TILING_X ,2 ) ==0 ); -assert (run_test (20 , bo_write_verify,I915_TILING_X ,2 ) ==0 ); +igt_assert (run_test (2 , bo_write_verify,I915_TILING_X ,2 ) ==0 ); +igt_assert (run_test (5 , bo_write_verify,I915_TILING_X ,2 ) ==0 ); +igt_assert (run_test (10 , bo_write_verify,I915_TILING_X ,2 ) ==0 ); +igt_assert (run_test (20 , bo_write_verify,I915_TILING_X ,2 ) ==0 ); } igt_subtest("bo-write-verify-threaded-y") { -assert (run_test (2 , bo_write_verify,I915_TILING_Y ,2 ) ==0 ); -assert (run_test (5 , bo_write_verify,I915_TILING_Y ,2 ) ==0 ); -assert (run_test (10 , bo_write_verify,I915_TILING_Y ,2 ) ==0 ); -assert (run_test (20 , bo_write_verify,I915_TILING_Y ,2 ) ==0 ); +igt_assert (run_test (2 , bo_write_verify,I915_TILING_Y ,2 ) ==0 ); +igt_assert (run_test (5 , bo_write_verify,I915_TILING_Y ,2 ) ==0 ); +igt_assert (run_test (10 , bo_write_verify,I915_TILING_Y ,2 ) ==0 ); +igt_assert (run_test (20 , bo_write_verify,I915_TILING_Y ,2 ) ==0 ); }igt_subtest ("bo-copy" )
tests/gem_media_fill.c +0 -2
@@ -32,12 +32,10 @@#include <stdbool.h> #include <unistd.h> -#include <assert.h> #include <stdlib.h> #include <sys/ioctl.h> #include <stdio.h> #include <string.h> -#include <assert.h> #include <fcntl.h> #include <inttypes.h> #include <errno.h>
tests/gem_render_copy.c +0 -2
@@ -32,12 +32,10 @@#include <stdbool.h> #include <unistd.h> #include <cairo.h> -#include <assert.h> #include <stdlib.h> #include <sys/ioctl.h> #include <stdio.h> #include <string.h> -#include <assert.h> #include <fcntl.h> #include <inttypes.h> #include <errno.h>
tests/gem_render_linear_blits.c +0 -2
@@ -37,12 +37,10 @@#include "config.h" #endif -#include <assert.h> #include <stdlib.h> #include <sys/ioctl.h> #include <stdio.h> #include <string.h> -#include <assert.h> #include <fcntl.h> #include <inttypes.h> #include <errno.h>
tests/gem_render_tiled_blits.c +0 -2
@@ -33,12 +33,10 @@* The goal is to simply ensure the basics work. */ -#include <assert.h> #include <stdlib.h> #include <sys/ioctl.h> #include <stdio.h> #include <string.h> -#include <assert.h> #include <fcntl.h> #include <inttypes.h> #include <errno.h>
tests/gem_storedw_batches_loop.c +1 -1
@@ -83,7 +83,7 @@ store_dword_loop(int divider, unsigned flags) cmd_address_offset = j *4 ; buf[j++] = target_bo->offset; } -assert (j >0 ); +igt_assert (j >0 ); buf[j++] =0x42000000 + val;igt_assert (drm_intel_bo_references (cmd_bo, target_bo) ==0 );
tests/gem_stress.c +0 -2
@@ -49,12 +49,10 @@* In short: designed for maximum evilness. */ -#include <assert.h> #include <stdlib.h> #include <sys/ioctl.h> #include <stdio.h> #include <string.h> -#include <assert.h> #include <fcntl.h> #include <inttypes.h> #include <errno.h>
tests/gem_wait_render_timeout.c +0 -2
@@ -27,12 +27,10 @@#include <stdio.h> #include <time.h> -#include <assert.h> #include <stdlib.h> #include <sys/ioctl.h> #include <stdio.h> #include <string.h> -#include <assert.h> #include <fcntl.h> #include <inttypes.h> #include <errno.h>
tests/igt_simulation.c +1 -0
@@ -28,6 +28,7 @@#include <stdlib.h> #include <sys/wait.h> #include <sys/types.h> +#include <assert.h> #include "drmtest.h" #include "igt_core.h"
tests/kms_setmode.c +12 -13
@@ -24,7 +24,6 @@#include "config.h" #endif -#include <assert.h> #include <cairo.h> #include <errno.h> #include <stdint.h>
@@ -193,7 +192,7 @@ static void create_fb_for_crtc(struct crtc_config *crtc, fb_id =kmstest_create_fb (drm_fd, crtc->mode.hdisplay, crtc->mode.vdisplay, bpp, depth, enable_tiling, fb_info); -assert (fb_id >0 ); +igt_assert (fb_id >0 ); } static void get_mode_for_crtc(struct crtc_config *crtc,
@@ -239,7 +238,7 @@ static int get_encoder_idx(drmModeRes *resources, drmModeEncoder *encoder)for (i =0 ; i < resources->count_encoders; i++)if (resources->encoders[i] == encoder->encoder_id)return i; -assert (0 ); +igt_assert (0 ); } static void get_crtc_config_str(struct crtc_config *crtc, char *buf,
@@ -304,7 +303,7 @@ static void setup_crtcs(drmModeRes *resources, struct connector_config *cconf, crtc->cconfs =malloc (sizeof (*crtc->cconfs) * crtc->connector_count); -assert (crtc->cconfs); +igt_assert (crtc->cconfs); encoder_mask =0 ;for (j =0 ; j < crtc->connector_count; j++) {
@@ -318,7 +317,7 @@ static void setup_crtcs(drmModeRes *resources, struct connector_config *cconf,igt_assert (connector->count_encoders ==1 ); encoder =drmModeGetEncoder (drm_fd, connector->encoders[0 ]); -assert (encoder); +igt_assert (encoder); config_valid &= !!(encoder->possible_crtcs & (1 << crtc->crtc_idx));
@@ -371,7 +370,7 @@ static uint32_t *get_connector_ids(struct crtc_config *crtc)int i; ids =malloc (sizeof (*ids) * crtc->connector_count); -assert (ids); +igt_assert (ids);for (i =0 ; i < crtc->connector_count; i++) ids[i] = crtc->cconfs[i].connector->connector_id;
@@ -502,7 +501,7 @@ static int get_one_connector(drmModeRes *resources, int connector_id,drmModeModeInfo mode; connector =drmModeGetConnector (drm_fd, connector_id); -assert (connector); +igt_assert (connector); cconf->connector = connector; cconf->connected = connector->connection ==DRM_MODE_CONNECTED ;
@@ -543,7 +542,7 @@ static int get_connectors(drmModeRes *resources, int *connector_idxs,int connector_id; connector_idx = connector_idxs[i]; -assert (connector_idx < resources->count_connectors); +igt_assert (connector_idx < resources->count_connectors); connector_id = resources->connectors[connector_idx];if (get_one_connector (resources, connector_id, &cconfs[i]) <0 )
@@ -589,7 +588,7 @@ static void iterate_combinations(int n, int k, bool allow_repetitions,int v;if (!k) { -assert (set->count <ARRAY_SIZE (set->items)); +igt_assert (set->count <ARRAY_SIZE (set->items)); set->items[set->count++] = *comb;return ; }
@@ -608,7 +607,7 @@ static void get_combinations(int n, int k, bool allow_repetitions, {struct combination comb; -assert (k <=ARRAY_SIZE (set->items[0 ].elems)); +igt_assert (k <=ARRAY_SIZE (set->items[0 ].elems)); set->count =0 ;iterate_combinations (n, k, allow_repetitions,0 ,0 , &comb, set); }
@@ -634,7 +633,7 @@ static void test_combinations(const struct test_config *tconf,int j; cconfs =malloc (sizeof (*cconfs) * connector_count); -assert (cconfs); +igt_assert (cconfs); connector_idxs = &connector_combs.items[i].elems[0 ]; ret = get_connectors(tconf->resources, connector_idxs,
@@ -678,7 +677,7 @@ static int opt_handler(int opt, int opt_index) filter_test_id =atoi (optarg);break ;default : -assert (0 ); +igt_assert (0 ); }return 0 ;
@@ -723,7 +722,7 @@ int main(int argc, char **argv)igt_set_vt_graphics_mode (); drm_resources =drmModeGetResources (drm_fd); -assert (drm_resources); +igt_assert (drm_resources); }for (i =0 ; i <ARRAY_SIZE (tests); i++) {
tests/pm_rps.c +1 -1
@@ -197,7 +197,7 @@ static void emit_store_dword_imm(uint32_t val)#define LOAD_HELPER_BO_SIZE (16*1024*1024)static void load_helper_set_load (enum load load) { -assert (lh.igt_proc.running); +igt_assert (lh.igt_proc.running);if (lh.load == load)return ;
tests/testdisplay.c +2 -2
@@ -504,7 +504,7 @@ static void stereo_fb_layout_from_mode(struct stereo_fb_layout *layout,break ; }default : -assert (0 ); +igt_assert (0 ); } }
@@ -520,7 +520,7 @@ static const char *stereo_mode_str(drmModeModeInfo *mode)case DRM_MODE_FLAG_3D_FRAME_PACKING :return "FP" ;default : -assert (0 ); +igt_assert (0 ); } }
tools/intel_l3_parity.c +1 -0
@@ -28,6 +28,7 @@#define _GNU_SOURCE#include <sys/types.h> #include <sys/stat.h> +#include <assert.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h>
Signature · 1 line
1.8.5.2
PATCH 14/28 lib: add #include "foo.h" lines like in manpages
In reply to Daniel VetterShould help in alleviating the header mess we have atm.
--- lib/igt_core.c | 2 ++ lib/igt_debugfs.c | 2 ++ lib/intel_batchbuffer.c | 2 ++ lib/intel_chipset.c | 2 ++ lib/ioctl_wrappers.c | 2 ++ 5 files changed, 10 insertions(+)
lib/igt_core.c +2 -0
@@ -64,6 +64,8 @@* @short_description: Core i-g-t testing support * @title: i-g-t core * +* > #include "igt_core.h" +* * This libary implements the core of the i-g-t test support infrastructure. * Main features are the subtest enumeration, cmdline option parsing helpers for * subtest handling and various helpers to structure testcases with subtests and
lib/igt_debugfs.c +2 -0
@@ -39,6 +39,8 @@* @short_description: Support code for debugfs features * @title: i-g-t debugfs * +* > #include "igt_debugfs.h" +* * This library provides helpers to access debugfs features. On top of some * basic functions to access debugfs files with e.g. igt_debugfs_open() it also * provides higher-level wrappers for some debugfs features
lib/intel_batchbuffer.c +2 -0
@@ -46,6 +46,8 @@* @short_description: Batchbuffer and blitter support * @title: intel batchbuffer * +* > #include "intel_batchbuffer.h" +* * This library provides some basic support for batchbuffers and using the * blitter engine based upon libdrm. A new batchbuffer is allocated with * intel_batchbuffer_alloc() and for simple blitter commands submitted with
lib/intel_chipset.c +2 -0
@@ -45,6 +45,8 @@* @short_description: Feature macros and chipset helpers * @title: intel chipset * +* > #include "intel_chipset.h" +* * This library mostly provides feature macros which use raw pci device ids. It * also provides a few more helper functions to handle pci devices, chipset * detection and related issues.
lib/ioctl_wrappers.c +2 -0
@@ -63,6 +63,8 @@* @short_description: ioctl wrappers and related functions * @title: ioctl wrappers * +* > #include "ioctl_wrappers.h" +* * This helper library contains simple functions to wrap the raw drm/i915 kernel * ioctls. The normal versions never pass any error codes to the caller and use * igt_assert() to check for error conditions instead. For some ioctls raw
Signature · 1 line
1.8.5.2
PATCH 15/28 lib: remove uncessary #includes from headers
In reply to Daniel VetterOnly include what the header itself needs. The big fish here is intel-gpu-tools.h. More will follow.
One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one of which was broken.
--- debugger/debug_rdata.c | 1 + lib/drmtest.c | 1 + lib/gen6_render.h | 8 -------- lib/gen7_media.h | 2 ++ lib/gen8_media.h | 2 ++ lib/igt_core.h | 2 ++ lib/igt_debugfs.h | 3 +-- lib/igt_kms.h | 4 ++-- lib/intel_batchbuffer.h | 1 + lib/intel_chipset.h | 2 +- lib/intel_gpu_tools.h | 5 ----- lib/intel_iosf.c | 1 + lib/intel_mmio.c | 1 + lib/intel_os.c | 1 + lib/intel_reg_map.c | 1 + lib/media_fill_gen7.c | 1 + lib/media_fill_gen8.c | 1 + lib/rendercopy_gen6.c | 1 + lib/rendercopy_gen7.c | 1 + lib/rendercopy_gen8.c | 1 + tests/ddi_compute_wrpll.c | 1 + tools/intel_audio_dump.c | 3 +++ tools/intel_backlight.c | 2 ++ tools/intel_bios_reader.c | 2 ++ tools/intel_dpio_read.c | 1 + tools/intel_dpio_write.c | 1 + tools/intel_error_decode.c | 1 + tools/intel_forcewaked.c | 1 + tools/intel_gpu_time.c | 2 ++ tools/intel_gpu_top.c | 2 ++ tools/intel_gtt.c | 1 + tools/intel_infoframes.c | 2 ++ tools/intel_lid.c | 1 + tools/intel_nc_read.c | 1 + tools/intel_nc_write.c | 1 + tools/intel_opregion_decode.c | 1 + tools/intel_panel_fitter.c | 2 ++ tools/intel_punit_read.c | 1 + tools/intel_punit_write.c | 1 + tools/intel_reg_checker.c | 1 + tools/intel_reg_dumper.c | 3 +++ tools/intel_reg_read.c | 1 + tools/intel_reg_snapshot.c | 1 + tools/intel_reg_write.c | 1 + tools/intel_stepping.c | 1 + tools/intel_vga_read.c | 1 + tools/intel_vga_write.c | 1 + 47 files changed, 59 insertions(+), 18 deletions(-)
debugger/debug_rdata.c +1 -0
@@ -29,6 +29,7 @@#include <stdio.h> #include <stdlib.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" struct eu_rdata { union {
lib/drmtest.c +1 -0
@@ -55,6 +55,7 @@#include "igt_debugfs.h" #include "../version.h" #include "config.h" +#include "intel_reg.h" /* This file contains a bunch of wrapper functions to directly use gem ioctls. * Mostly useful to write kernel tests. */
lib/gen6_render.h +0 -8
@@ -261,10 +261,6 @@#define GEN6_TS_STRG_VAL 0x7e04#define GEN6_TS_RDATA 0x7e08 -/* TD_CTL on gen6 is 0x7000, to not break stuff which depends on this... */ -#ifndef GEN6_TD_CTL -#define GEN6_TD_CTL 0x8000 -#endif #define GEN6_TD_CTL_MUX_SHIFT 8#define GEN6_TD_CTL_EXTERNAL_HALT_R0_DEBUG_MATCH (1 << 7)#define GEN6_TD_CTL_FORCE_EXTERNAL_HALT (1 << 6)
@@ -570,10 +566,6 @@#define GEN6_TS_STRG_VAL 0x7e04#define GEN6_TS_RDATA 0x7e08 -/* TD_CTL on gen6 is 0x7000, to not break stuff which depends on this... */ -#ifndef GEN6_TD_CTL -#define GEN6_TD_CTL 0x8000 -#endif #define GEN6_TD_CTL_MUX_SHIFT 8#define GEN6_TD_CTL_EXTERNAL_HALT_R0_DEBUG_MATCH (1 << 7)#define GEN6_TD_CTL_FORCE_EXTERNAL_HALT (1 << 6)
lib/gen7_media.h +2 -0
@@ -1,6 +1,8 @@#ifndef GEN7_MEDIA_H #define GEN7_MEDIA_H +#include <stdint.h> +#define GEN7_SURFACEFORMAT_R32G32B32A32_FLOAT 0x000#define GEN7_SURFACEFORMAT_R32G32B32A32_SINT 0x001#define GEN7_SURFACEFORMAT_R32G32B32A32_UINT 0x002
lib/gen8_media.h +2 -0
@@ -1,6 +1,8 @@#ifndef GEN8_MEDIA_H #define GEN8_MEDIA_H +#include <stdint.h> +#define GEN8_SURFACEFORMAT_R32G32B32A32_FLOAT 0x000#define GEN8_SURFACEFORMAT_R32G32B32A32_SINT 0x001#define GEN8_SURFACEFORMAT_R32G32B32A32_UINT 0x002
lib/igt_core.h +2 -0
@@ -30,6 +30,8 @@#ifndef IGT_CORE_H #define IGT_CORE_H +#include <stdbool.h> +bool __igt_fixture (void );void __igt_fixture_complete (void );void __igt_fixture_end (void ) __attribute__((noreturn));
lib/igt_debugfs.h +1 -2
@@ -27,9 +27,8 @@#include <stdbool.h> #include <stdint.h> -#include <stdio.h> -#include "igt_display.h" +enum pipe ;int igt_debugfs_open (const char *filename,int mode); FILE *igt_debugfs_fopen(const char *filename,
lib/igt_kms.h +2 -2
@@ -26,11 +26,11 @@#define __IGT_KMS_H__#include <stdbool.h> - +#include <stdint.h> #include <drm_fourcc.h> #include <cairo.h> -#include <igt_display.h> +#include "igt_display.h" struct kmstest_connector_config {drmModeCrtc *crtc;
lib/intel_batchbuffer.h +1 -0
@@ -4,6 +4,7 @@#include <stdint.h> #include "intel_bufmgr.h" #include "igt_core.h" +#include "intel_reg.h" #define BATCH_SZ 4096#define BATCH_RESERVED 16
lib/intel_chipset.h +1 -1
@@ -28,7 +28,6 @@#ifndef _INTEL_CHIPSET_H#define _INTEL_CHIPSET_H -#include <sys/types.h> #include <pciaccess.h> struct pci_device *intel_get_pci_device (void );
@@ -36,6 +35,7 @@ uint32_t intel_get_drm_devid(int fd);int intel_gen (uint32_t devid);extern enum pch_type intel_pch; +enum pch_type {PCH_NONE ,PCH_IBX ,
lib/intel_gpu_tools.h +0 -5
@@ -29,13 +29,8 @@#define INTEL_GPU_TOOLS_H #include <stdint.h> -#include <sys/types.h> #include <pciaccess.h> -#include "intel_chipset.h" -#include "intel_reg.h" -#include "drmtest.h" -/* register access helpers from intel_mmio.c */ extern void *mmio;void intel_get_mmio (struct pci_device *pci_dev);
lib/intel_iosf.c +1 -0
@@ -4,6 +4,7 @@#include <err.h> #include <errno.h> #include "intel_gpu_tools.h" +#include "intel_reg.h" #define TIMEOUT_US 500000
lib/intel_mmio.c +1 -0
@@ -43,6 +43,7 @@#include "intel_gpu_tools.h" #include "igt_debugfs.h" +#include "intel_chipset.h" #define FAKEKEY 0x2468ace0
lib/intel_os.c +1 -0
@@ -49,6 +49,7 @@#include "intel_gpu_tools.h" #include "i915_drm.h" +#include "drmtest.h" uint64_t intel_get_total_ram_mb (void )
lib/intel_reg_map.c +1 -0
@@ -30,6 +30,7 @@#include <stdlib.h> #include <sys/types.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" static struct intel_register_range gen_bwcl_register_map[] = { {0x00000000 ,0x00000fff ,INTEL_RANGE_RW },
lib/media_fill_gen7.c +1 -0
@@ -1,5 +1,6 @@#include "media_fill.h" #include "gen7_media.h" +#include "intel_reg.h" #include <assert.h>
lib/media_fill_gen8.c +1 -0
@@ -1,5 +1,6 @@#include "media_fill.h" #include "gen8_media.h" +#include "intel_reg.h" #include <assert.h>
lib/rendercopy_gen6.c +1 -0
@@ -18,6 +18,7 @@#include "intel_gpu_tools.h" #include "rendercopy.h" #include "gen6_render.h" +#include "intel_reg.h" #define ALIGN (x, y) (((x) + (y)-1) & ~((y)-1))#define VERTEX_SIZE (3*4)
lib/rendercopy_gen7.c +1 -0
@@ -18,6 +18,7 @@#include "intel_gpu_tools.h" #include "rendercopy.h" #include "gen7_render.h" +#include "intel_reg.h" #define ALIGN (x, y) (((x) + (y)-1) & ~((y)-1))
lib/rendercopy_gen8.c +1 -0
@@ -18,6 +18,7 @@#include "intel_gpu_tools.h" #include "rendercopy.h" #include "gen8_render.h" +#include "intel_reg.h" #include <intel_aub.h>
tests/ddi_compute_wrpll.c +1 -0
@@ -4,6 +4,7 @@#include <stdlib.h> #include "intel_gpu_tools.h" +#include "drmtest.h" #define LC_FREQ 2700#define LC_FREQ_2K (LC_FREQ * 2000)
tools/intel_audio_dump.c +3 -0
@@ -34,6 +34,9 @@#include <err.h> #include <arpa/inet.h> #include "intel_gpu_tools.h" +#include "intel_reg.h" +#include "intel_chipset.h" +#include "drmtest.h" static uint32_t devid;
tools/intel_backlight.c +2 -0
@@ -31,6 +31,8 @@#include <string.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" +#include "intel_reg.h" /* XXX PCH only today */
tools/intel_bios_reader.c +2 -0
@@ -37,6 +37,8 @@#include "intel_bios.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" +#include "drmtest.h" static uint32_t devid =-1 ;
tools/intel_dpio_read.c +1 -0
@@ -31,6 +31,7 @@#include <err.h> #include <string.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" static void usage (char *cmdname) {
tools/intel_dpio_write.c +1 -0
@@ -31,6 +31,7 @@#include <err.h> #include <string.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" static void usage (char *cmdname) {
tools/intel_error_decode.c +1 -0
@@ -55,6 +55,7 @@#include "intel_chipset.h" #include "intel_gpu_tools.h" #include "instdone.h" +#include "intel_reg.h" static uint32_t print_head (unsigned int reg)
tools/intel_forcewaked.c +1 -0
@@ -35,6 +35,7 @@#include <syslog.h> #include <unistd.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" bool daemonized;
tools/intel_gpu_time.c +2 -0
@@ -35,6 +35,8 @@#include <sys/wait.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" +#include "intel_reg.h" #define SAMPLES_PER_SEC 10000
tools/intel_gpu_top.c +2 -0
@@ -44,6 +44,8 @@#endif #include "intel_gpu_tools.h" #include "instdone.h" +#include "intel_reg.h" +#include "intel_chipset.h" #define FORCEWAKE 0xA18C#define FORCEWAKE_ACK 0x130090
tools/intel_gtt.c +1 -0
@@ -35,6 +35,7 @@#include <unistd.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" #define KB (x) ((x) * 1024)#define MB (x) ((x) * 1024 * 1024)
tools/intel_infoframes.c +2 -0
@@ -31,6 +31,8 @@#include <string.h> #include <getopt.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" +#include "drmtest.h" typedef enum { TRANSC_A = 0,
tools/intel_lid.c +1 -0
@@ -40,6 +40,7 @@#include "intel_gpu_tools.h" #include "intel_reg.h" #include "intel_bios.h" +#include "intel_chipset.h" enum lid_status {LID_UNKNOWN =-1 ,
tools/intel_nc_read.c +1 -0
@@ -31,6 +31,7 @@#include <err.h> #include <string.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" static void usage (char *cmdname) {
tools/intel_nc_write.c +1 -0
@@ -31,6 +31,7 @@#include <err.h> #include <string.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" static void usage (char *cmdname) {
tools/intel_opregion_decode.c +1 -0
@@ -38,6 +38,7 @@#include <sys/types.h> #include "intel_gpu_tools.h" +#include "drmtest.h" #define OPREGION_HEADER_OFFSET 0#define OPREGION_ACPI_OFFSET 0x100
tools/intel_panel_fitter.c +2 -0
@@ -31,6 +31,8 @@#include <stdlib.h> #include <string.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" +#include "intel_reg.h" int gen;
tools/intel_punit_read.c +1 -0
@@ -31,6 +31,7 @@#include <err.h> #include <string.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" static void usage (char *cmdname) {
tools/intel_punit_write.c +1 -0
@@ -31,6 +31,7 @@#include <err.h> #include <string.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" static void usage (char *cmdname) {
tools/intel_reg_checker.c +1 -0
@@ -27,6 +27,7 @@#include <string.h> #include <stdbool.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" static uint32_t devid;static int gen;
tools/intel_reg_dumper.c +3 -0
@@ -34,6 +34,9 @@#include <err.h> #include <unistd.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" +#include "intel_reg.h" +#include "drmtest.h" static uint32_t devid =0 ;
tools/intel_reg_read.c +1 -0
@@ -31,6 +31,7 @@#include <err.h> #include <string.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" static void bit_decode (uint32_t reg) {
tools/intel_reg_snapshot.c +1 -0
@@ -27,6 +27,7 @@#include <unistd.h> #include <assert.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" int main (int argc,char ** argv) {
tools/intel_reg_write.c +1 -0
@@ -30,6 +30,7 @@#include <stdio.h> #include <err.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" int main (int argc,char ** argv) {
tools/intel_stepping.c +1 -0
@@ -33,6 +33,7 @@#include <err.h> #include "intel_chipset.h" #include "intel_gpu_tools.h" +#include "intel_reg.h" static void print_clock (const char *name,int clock) {
tools/intel_vga_read.c +1 -0
@@ -32,6 +32,7 @@#include <unistd.h> #include <sys/io.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" static uint8_t read_reg (uint32_t reg,bool use_mmio) {
tools/intel_vga_write.c +1 -0
@@ -32,6 +32,7 @@#include <unistd.h> #include <sys/io.h> #include "intel_gpu_tools.h" +#include "intel_chipset.h" static void write_reg (uint32_t reg,uint8_t val,bool use_mmio) {
Signature · 1 line
1.8.5.2
PATCH 16/28 lib: more unecessary header removal
In reply to Daniel VetterThis time big with media_fill.h
--- lib/igt_core.h | 3 +++ lib/igt_kms.h | 1 - lib/intel_batchbuffer.h | 2 +- lib/media_fill.h | 16 +--------------- lib/media_fill_gen7.c | 3 +++ lib/media_fill_gen8.c | 3 +++ tests/kms_cursor_crc.c | 1 + tests/kms_pipe_crc_basic.c | 1 + tests/kms_plane.c | 1 + 9 files changed, 14 insertions(+), 17 deletions(-)
lib/igt_core.h +3 -0
@@ -30,7 +30,10 @@#ifndef IGT_CORE_H #define IGT_CORE_H +#include <setjmp.h> #include <stdbool.h> +#include <string.h> +#include <sys/types.h> bool __igt_fixture (void );void __igt_fixture_complete (void );
lib/igt_kms.h +0 -1
@@ -27,7 +27,6 @@#include <stdbool.h> #include <stdint.h> -#include <drm_fourcc.h> #include <cairo.h> #include "igt_display.h"
lib/intel_batchbuffer.h +1 -1
@@ -2,7 +2,7 @@#define INTEL_BATCHBUFFER_H #include <stdint.h> -#include "intel_bufmgr.h" +#include <intel_bufmgr.h> #include "igt_core.h" #include "intel_reg.h"
lib/media_fill.h +1 -15
@@ -1,22 +1,8 @@#ifndef RENDE_MEDIA_FILL_H #define RENDE_MEDIA_FILL_H -#include <stdlib.h> -#include <sys/ioctl.h> -#include <stdio.h> -#include <string.h> -#include <fcntl.h> -#include <inttypes.h> -#include <errno.h> -#include <sys/stat.h> -#include <sys/time.h> -#include <getopt.h> -#include "drm.h" -#include "i915_drm.h" -#include "drmtest.h" -#include "intel_bufmgr.h" +#include <stdint.h> #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" void gen8_media_fillfunc(struct intel_batchbuffer *batch,
lib/media_fill_gen7.c +3 -0
@@ -1,3 +1,6 @@ +#include <intel_bufmgr.h> +#include <i915_drm.h> +#include "media_fill.h" #include "gen7_media.h" #include "intel_reg.h"
lib/media_fill_gen8.c +3 -0
@@ -1,3 +1,6 @@ +#include <intel_bufmgr.h> +#include <i915_drm.h> +#include "media_fill.h" #include "gen8_media.h" #include "intel_reg.h"
tests/kms_cursor_crc.c +1 -0
@@ -27,6 +27,7 @@#include <stdbool.h> #include <stdio.h> #include <string.h> +#include <drm_fourcc.h> #include "drmtest.h" #include "igt_debugfs.h"
tests/kms_pipe_crc_basic.c +1 -0
@@ -26,6 +26,7 @@#include <stdbool.h> #include <stdio.h> #include <string.h> +#include <drm_fourcc.h> #include "drmtest.h" #include "igt_debugfs.h"
tests/kms_plane.c +1 -0
@@ -28,6 +28,7 @@#include <stdbool.h> #include <stdio.h> #include <string.h> +#include <drm_fourcc.h> #include "drmtest.h" #include "igt_debugfs.h"
Signature · 1 line
1.8.5.2
PATCH 17/28 lib: unnecessary header removal for drmtest.h, part 1
In reply to Daniel VetterBrought a few missing headers to light in ioctl_wrappers.h, too.
--- benchmarks/intel_upload_blit_large.c | 1 + benchmarks/intel_upload_blit_large_gtt.c | 1 + benchmarks/intel_upload_blit_large_map.c | 1 + benchmarks/intel_upload_blit_small.c | 1 + demos/intel_sprite_on.c | 7 +++---- lib/drmtest.c | 1 + lib/drmtest.h | 7 ------- lib/igt_debugfs.c | 1 + lib/igt_kms.c | 1 + lib/ioctl_wrappers.h | 5 +++++ lib/rendercopy_gen7.c | 1 + tests/core_get_client_auth.c | 2 +- tests/drm_vma_limiter.c | 3 ++- tests/drm_vma_limiter_cached.c | 3 ++- tests/drm_vma_limiter_cpu.c | 3 ++- tests/drm_vma_limiter_gtt.c | 3 ++- tests/drv_suspend.c | 2 +- tests/gem_bad_address.c | 3 ++- tests/gem_bad_batch.c | 3 ++- tests/gem_bad_blit.c | 3 ++- tests/gem_bad_length.c | 2 +- tests/gem_basic.c | 2 +- tests/gem_caching.c | 3 ++- tests/gem_close_race.c | 3 ++- tests/gem_concurrent_blit.c | 3 ++- tests/gem_cpu_reloc.c | 3 ++- tests/gem_cs_prefetch.c | 3 ++- tests/gem_cs_tlb.c | 2 +- tests/gem_ctx_bad_destroy.c | 2 +- tests/gem_ctx_bad_exec.c | 2 +- tests/gem_ctx_basic.c | 3 ++- tests/gem_ctx_create.c | 2 +- tests/gem_ctx_exec.c | 2 +- tests/gem_double_irq_loop.c | 3 ++- tests/gem_dummy_reloc_loop.c | 3 ++- tests/gem_evict_alignment.c | 3 ++- tests/gem_evict_everything.c | 3 ++- tests/gem_exec_bad_domains.c | 3 ++- tests/gem_exec_big.c | 2 +- tests/gem_exec_blt.c | 2 +- tests/gem_exec_faulting_reloc.c | 2 +- tests/gem_exec_lut_handle.c | 2 +- tests/gem_exec_nop.c | 2 +- tests/gem_fd_exhaustion.c | 1 + tests/gem_fence_thrash.c | 2 +- tests/gem_fenced_exec_thrash.c | 3 ++- tests/gem_flink.c | 2 +- tests/gem_flink_race.c | 2 +- tests/gem_gtt_cpu_tlb.c | 2 +- tests/gem_gtt_hog.c | 3 ++- tests/gem_gtt_speed.c | 2 +- tests/gem_hang.c | 3 ++- tests/gem_hangcheck_forcewake.c | 3 ++- tests/gem_largeobject.c | 2 +- tests/gem_linear_blits.c | 3 ++- tests/gem_lut_handle.c | 2 +- tests/gem_madvise.c | 2 +- tests/gem_media_fill.c | 3 ++- tests/gem_mmap.c | 2 +- tests/gem_mmap_gtt.c | 2 +- tests/gem_mmap_offset_exhaustion.c | 2 +- tests/gem_non_secure_batch.c | 3 ++- tests/gem_partial_pwrite_pread.c | 3 ++- tests/gem_persistent_relocs.c | 3 ++- tests/gem_pin.c | 2 +- tests/gem_pipe_control_store_loop.c | 3 ++- tests/gem_pread.c | 2 +- tests/gem_pread_after_blit.c | 3 ++- tests/gem_pwrite.c | 2 +- tests/gem_pwrite_pread.c | 3 ++- tests/gem_readwrite.c | 2 +- tests/gem_reg_read.c | 2 +- tests/gem_reloc_overflow.c | 3 ++- tests/gem_reloc_vs_gpu.c | 3 ++- tests/gem_render_copy.c | 3 ++- tests/gem_render_linear_blits.c | 4 +++- tests/gem_render_tiled_blits.c | 3 ++- tests/gem_reset_stats.c | 3 ++- tests/gem_ring_sync_copy.c | 3 ++- tests/gem_ring_sync_loop.c | 3 ++- tests/gem_ringfill.c | 3 ++- tests/gem_seqno_wrap.c | 3 ++- tests/gem_set_tiling_vs_blt.c | 3 ++- tests/gem_set_tiling_vs_gtt.c | 3 ++- tests/gem_set_tiling_vs_pwrite.c | 2 +- tests/gem_storedw_batches_loop.c | 3 ++- tests/gem_storedw_loop_blt.c | 3 ++- tests/gem_storedw_loop_bsd.c | 3 ++- tests/gem_storedw_loop_render.c | 3 ++- tests/gem_storedw_loop_vebox.c | 3 ++- tests/gem_stress.c | 3 ++- tests/gem_threaded_access_tiled.c | 2 +- tests/gem_tiled_blits.c | 3 ++- tests/gem_tiled_fence_blits.c | 3 ++- tests/gem_tiled_partial_pwrite_pread.c | 3 ++- tests/gem_tiled_pread.c | 3 ++- tests/gem_tiled_pread_pwrite.c | 2 +- tests/gem_tiled_swapping.c | 2 +- tests/gem_tiling_max_stride.c | 3 ++- tests/gem_unfence_active_buffers.c | 3 ++- tests/gem_unref_active_buffers.c | 3 ++- tests/gem_vmap_blits.c | 2 +- tests/gem_wait_render_timeout.c | 3 ++- tests/gem_write_read_ring_switch.c | 3 ++- tests/gen3_mixed_blits.c | 3 ++- tests/gen3_render_linear_blits.c | 3 ++- tests/gen3_render_mixed_blits.c | 3 ++- tests/gen3_render_tiledx_blits.c | 3 ++- tests/gen3_render_tiledy_blits.c | 3 ++- tests/gen7_forcewake_mt.c | 3 ++- tests/kms_addfb.c | 2 +- tests/kms_fbc_crc.c | 4 +++- tests/kms_flip.c | 6 ++++-- tests/kms_render.c | 5 ++++- tests/pm_lpsp.c | 2 ++ tests/pm_pc8.c | 3 ++- tests/pm_rps.c | 3 +++ tests/prime_nv_api.c | 1 + tests/prime_nv_pcopy.c | 3 ++- tests/prime_nv_test.c | 3 ++- tests/prime_self_import.c | 2 +- tests/prime_udl.c | 3 ++- tests/testdisplay.c | 2 +- tools/intel_perf_counters.c | 1 + 124 files changed, 208 insertions(+), 120 deletions(-)
benchmarks/intel_upload_blit_large.c +1 -0
@@ -59,6 +59,7 @@#include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #define OBJECT_WIDTH 1280#define OBJECT_HEIGHT 720
benchmarks/intel_upload_blit_large_gtt.c +1 -0
@@ -59,6 +59,7 @@#include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #define OBJECT_WIDTH 1280#define OBJECT_HEIGHT 720
benchmarks/intel_upload_blit_large_map.c +1 -0
@@ -62,6 +62,7 @@#include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #define OBJECT_WIDTH 1280#define OBJECT_HEIGHT 720
benchmarks/intel_upload_blit_small.c +1 -0
@@ -55,6 +55,7 @@#include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" /* Happens to be 128k, the size of the VBOs used by i965's Mesa driver. */ #define OBJECT_WIDTH 256
demos/intel_sprite_on.c +3 -4
@@ -47,10 +47,9 @@#include "drmtest.h" #include "igt_kms.h" -#if defined(DRM_IOCTL_MODE_ADDFB2 ) && defined(DRM_I915_SET_SPRITE_COLORKEY ) -#define TEST_PLANES 1 -#include "drm_fourcc.h" -#endif +#include <drm_fourcc.h> + +#include "ioctl_wrappers.h" /* * Mode setting with the kernel interfaces is a bit of a chore.
lib/drmtest.c +1 -0
@@ -56,6 +56,7 @@#include "../version.h" #include "config.h" #include "intel_reg.h" +#include "ioctl_wrappers.h" /* This file contains a bunch of wrapper functions to directly use gem ioctls. * Mostly useful to write kernel tests. */
lib/drmtest.h +0 -7
@@ -33,18 +33,11 @@#include <unistd.h> #include <errno.h> #include <stdbool.h> -#include <setjmp.h> #include <sys/mman.h> #include "xf86drm.h" #include "xf86drmMode.h" -#include "i915_drm.h" #include "intel_batchbuffer.h" -#include "intel_chipset.h" -#include "intel_gpu_tools.h" - -#include "ioctl_wrappers.h" -#include "igt_core.h" #ifdef ANDROID #ifndef HAVE_MMAP64
lib/igt_debugfs.c +1 -0
@@ -22,6 +22,7 @@* */ +#include <inttypes.h> #include <sys/stat.h> #include <sys/mount.h> #include <errno.h>
lib/igt_kms.c +1 -0
@@ -34,6 +34,7 @@#include "drmtest.h" #include "igt_kms.h" +#include "ioctl_wrappers.h" /* helpers to create nice-looking framebuffers */ static int create_bo_for_fb(int fd, int width, int height, int bpp,
lib/ioctl_wrappers.h +5 -0
@@ -30,6 +30,11 @@#ifndef IOCTL_WRAPPERS_H #define IOCTL_WRAPPERS_H +#include <stdint.h> +#include <stdbool.h> +#include <intel_bufmgr.h> +#include <i915_drm.h> +/* libdrm interfacing */ drm_intel_bo *gem_handle_to_libdrm_bo (drm_intel_bufmgr *bufmgr,int fd,const char *name,uint32_t handle);
lib/rendercopy_gen7.c +1 -0
@@ -16,6 +16,7 @@#include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #include "rendercopy.h" #include "gen7_render.h" #include "intel_reg.h"
tests/core_get_client_auth.c +1 -1
@@ -40,7 +40,7 @@# include <sys/syscall.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" /* Checks whether the thread id is the current thread */
tests/drm_vma_limiter.c +2 -1
@@ -33,11 +33,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/drm_vma_limiter_cached.c +2 -1
@@ -33,11 +33,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/drm_vma_limiter_cpu.c +2 -1
@@ -33,11 +33,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/drm_vma_limiter_gtt.c +2 -1
@@ -33,11 +33,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/drv_suspend.c +1 -1
@@ -35,7 +35,7 @@#include <sys/stat.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "igt_debugfs.h"
tests/gem_bad_address.c +2 -1
@@ -35,9 +35,10 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" +#include "intel_chipset.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h"
tests/gem_bad_batch.c +2 -1
@@ -35,10 +35,11 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" +#include "intel_chipset.h" #include "intel_gpu_tools.h" static drm_intel_bufmgr *bufmgr;
tests/gem_bad_blit.c +2 -1
@@ -50,10 +50,11 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" +#include "intel_chipset.h" #include "intel_gpu_tools.h" static drm_intel_bufmgr *bufmgr;
tests/gem_bad_length.c +1 -1
@@ -35,7 +35,7 @@#include <sys/stat.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" /*
tests/gem_basic.c +1 -1
@@ -35,7 +35,7 @@#include <sys/stat.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" static void
tests/gem_caching.c +2 -1
@@ -35,11 +35,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" /* * Testcase: snoop consistency when touching partial cachelines
tests/gem_close_race.c +2 -1
@@ -38,8 +38,9 @@#include <sys/ioctl.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" +#include "intel_chipset.h" #define OBJECT_SIZE 1024*1024*4
tests/gem_concurrent_blit.c +2 -1
@@ -45,11 +45,12 @@#include <sys/time.h> #include <sys/wait.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static void prw_set_bo (drm_intel_bo *bo,uint32_t val,int width,int height)
tests/gem_cpu_reloc.c +2 -1
@@ -54,11 +54,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static uint32_t use_blt;
tests/gem_cs_prefetch.c +2 -1
@@ -44,11 +44,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_cs_tlb.c +1 -1
@@ -47,7 +47,7 @@#include <sys/ioctl.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_gpu_tools.h"
tests/gem_ctx_bad_destroy.c +1 -1
@@ -31,7 +31,7 @@#include <stdio.h> #include <string.h> -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" struct local_drm_i915_context_destroy {
tests/gem_ctx_bad_exec.c +1 -1
@@ -42,7 +42,7 @@#include <sys/ioctl.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" /* Copied from gem_exec_nop.c */
tests/gem_ctx_basic.c +2 -1
@@ -41,11 +41,12 @@#include <sys/time.h> #include <getopt.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" /* options */ int num_contexts =10 ;
tests/gem_ctx_create.c +1 -1
@@ -27,7 +27,7 @@#include <stdio.h> #include <string.h> -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" struct local_drm_i915_gem_context_create {
tests/gem_ctx_exec.c +1 -1
@@ -41,7 +41,7 @@#include <sys/ioctl.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" struct local_drm_i915_gem_context_destroy {
tests/gem_double_irq_loop.c +2 -1
@@ -34,12 +34,13 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" #include "i830_reg.h" +#include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_dummy_reloc_loop.c +2 -1
@@ -34,12 +34,13 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" #include "i830_reg.h" +#include "intel_chipset.h" #define LOCAL_I915_EXEC_VEBOX (4<<0)
tests/gem_evict_alignment.c +2 -1
@@ -42,8 +42,9 @@#include <sys/ioctl.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" +#include "intel_chipset.h" #define HEIGHT 256#define WIDTH 1024
tests/gem_evict_everything.c +2 -1
@@ -42,8 +42,9 @@#include <sys/ioctl.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" +#include "intel_chipset.h" #include "eviction_common.c"
tests/gem_exec_bad_domains.c +2 -1
@@ -34,11 +34,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" /* Testcase: Test whether the kernel rejects relocations with non-gpu domains *
tests/gem_exec_big.c +1 -1
@@ -44,7 +44,7 @@#include <sys/ioctl.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #define BATCH_SIZE (1024*1024)
tests/gem_exec_blt.c +1 -1
@@ -37,7 +37,7 @@#include <sys/ioctl.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_chipset.h" #include "intel_gpu_tools.h"
tests/gem_exec_faulting_reloc.c +1 -1
@@ -37,7 +37,7 @@#include <sys/ioctl.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_chipset.h" #include "intel_gpu_tools.h"
tests/gem_exec_lut_handle.c +1 -1
@@ -36,7 +36,7 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #define BATCH_SIZE (1024*1024)
tests/gem_exec_nop.c +1 -1
@@ -37,7 +37,7 @@#include <sys/ioctl.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_gpu_tools.h"
tests/gem_fd_exhaustion.c +1 -0
@@ -32,6 +32,7 @@#include <fcntl.h> #include <limits.h> #include "drmtest.h" +#include "ioctl_wrappers.h" #define FD_ARR_SZ 100
tests/gem_fence_thrash.c +1 -1
@@ -41,7 +41,7 @@#include <sys/ioctl.h> #include <pthread.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #define OBJECT_SIZE (128*1024)/* restricted to 1MiB alignment on i915 fences */
tests/gem_fenced_exec_thrash.c +2 -1
@@ -34,9 +34,10 @@#include <fcntl.h> #include <inttypes.h> #include <drm.h> -#include <i915_drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" +#include "intel_chipset.h" #include "intel_gpu_tools.h" #define WIDTH 1024
tests/gem_flink.c +1 -1
@@ -34,7 +34,7 @@#include <sys/stat.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" static void
tests/gem_flink_race.c +1 -1
@@ -33,7 +33,7 @@#include <pthread.h> #include "drmtest.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "intel_bufmgr.h" #include "igt_debugfs.h"
tests/gem_gtt_cpu_tlb.c +1 -1
@@ -40,7 +40,7 @@#include <sys/time.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_gpu_tools.h"
tests/gem_gtt_hog.c +2 -1
@@ -39,8 +39,9 @@#include <sys/wait.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" +#include "intel_chipset.h" static const uint32_t canary =0xdeadbeef ;
tests/gem_gtt_speed.c +1 -1
@@ -38,7 +38,7 @@#include <sys/ioctl.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #define OBJECT_SIZE 16384
tests/gem_hang.c +2 -1
@@ -35,9 +35,10 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" +#include "intel_chipset.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h"
tests/gem_hangcheck_forcewake.c +2 -1
@@ -34,11 +34,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" /* * Testcase: Provoke the hangcheck timer on an otherwise idle system
tests/gem_largeobject.c +1 -1
@@ -34,7 +34,7 @@#include <sys/stat.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" /* Should take 64 pages to store the page pointers on 64 bit */
tests/gem_linear_blits.c +2 -1
@@ -42,7 +42,8 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" +#include "intel_chipset.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h"
tests/gem_lut_handle.c +1 -1
@@ -36,7 +36,7 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #define BATCH_SIZE (1024*1024)
tests/gem_madvise.c +1 -1
@@ -36,7 +36,7 @@#include <signal.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #define OBJECT_SIZE (1024*1024)
tests/gem_media_fill.c +2 -1
@@ -43,11 +43,12 @@#include <sys/time.h> #include <getopt.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #define WIDTH 64#define STRIDE (WIDTH)
tests/gem_mmap.c +1 -1
@@ -35,7 +35,7 @@#include <sys/stat.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #define OBJECT_SIZE 16384
tests/gem_mmap_gtt.c +1 -1
@@ -36,7 +36,7 @@#include <sys/stat.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "igt_debugfs.h"
tests/gem_mmap_offset_exhaustion.c +1 -1
@@ -35,7 +35,7 @@#include <sys/stat.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #define OBJECT_SIZE (1024*1024)
tests/gem_non_secure_batch.c +2 -1
@@ -34,10 +34,11 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" +#include "intel_chipset.h" #include "intel_gpu_tools.h" #include "i830_reg.h"
tests/gem_partial_pwrite_pread.c +2 -1
@@ -34,8 +34,9 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" +#include "intel_chipset.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h"
tests/gem_persistent_relocs.c +2 -1
@@ -37,9 +37,10 @@#include <signal.h> #include <sys/wait.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" +#include "intel_chipset.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" #include "igt_debugfs.h"
tests/gem_pin.c +1 -1
@@ -36,7 +36,7 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_chipset.h" #include "intel_gpu_tools.h"
tests/gem_pipe_control_store_loop.c +2 -1
@@ -40,10 +40,11 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" +#include "intel_chipset.h" #include "intel_gpu_tools.h" static drm_intel_bufmgr *bufmgr;
tests/gem_pread.c +1 -1
@@ -37,7 +37,7 @@#include <sys/ioctl.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #define OBJECT_SIZE 16384
tests/gem_pread_after_blit.c +2 -1
@@ -43,8 +43,9 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" +#include "intel_chipset.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h"
tests/gem_pwrite.c +1 -1
@@ -37,7 +37,7 @@#include <sys/ioctl.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #define OBJECT_SIZE 16384
tests/gem_pwrite_pread.c +2 -1
@@ -37,8 +37,9 @@#include <sys/ioctl.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" +#include "intel_chipset.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h"
tests/gem_readwrite.c +1 -1
@@ -35,7 +35,7 @@#include <sys/stat.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #define OBJECT_SIZE 16384
tests/gem_reg_read.c +1 -1
@@ -27,7 +27,7 @@#include <stdio.h> #include <string.h> -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" struct local_drm_i915_reg_read {
tests/gem_reloc_overflow.c +2 -1
@@ -43,7 +43,8 @@#include <sys/time.h> #include <sys/types.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" +#include "intel_chipset.h" #include "drmtest.h" #include "intel_gpu_tools.h"
tests/gem_reloc_vs_gpu.c +2 -1
@@ -37,10 +37,11 @@#include <signal.h> #include <sys/wait.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" +#include "intel_chipset.h" #include "intel_gpu_tools.h" #include "igt_debugfs.h"
tests/gem_render_copy.c +2 -1
@@ -43,11 +43,12 @@#include <sys/time.h> #include <getopt.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #define WIDTH 512#define STRIDE (WIDTH*4)
tests/gem_render_linear_blits.c +3 -1
@@ -48,11 +48,13 @@#include <sys/time.h> #include <getopt.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" +#define WIDTH 512#define STRIDE (WIDTH*4)#define HEIGHT 512
tests/gem_render_tiled_blits.c +2 -1
@@ -44,11 +44,12 @@#include <sys/time.h> #include <getopt.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #define WIDTH 512#define STRIDE (WIDTH*4)
tests/gem_reset_stats.c +2 -1
@@ -40,10 +40,11 @@#include <time.h> #include <signal.h> -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "igt_debugfs.h" #include "intel_bufmgr.h" +#include "intel_chipset.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h"
tests/gem_ring_sync_copy.c +2 -1
@@ -50,9 +50,10 @@#include <stdlib.h> #include <stdbool.h> -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_batchbuffer.h" +#include "intel_chipset.h" #define WIDTH 512#define HEIGHT 512
tests/gem_ring_sync_loop.c +2 -1
@@ -34,12 +34,13 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" #include "i830_reg.h" +#include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_ringfill.c +2 -1
@@ -42,9 +42,10 @@#include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" +#include "intel_chipset.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h"
tests/gem_seqno_wrap.c +2 -1
@@ -42,12 +42,13 @@#include <getopt.h> #include <signal.h> -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "igt_core.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static int devid;static int card_index =0 ;
tests/gem_set_tiling_vs_blt.c +2 -1
@@ -54,10 +54,11 @@#include <sys/time.h> #include <stdbool.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" +#include "intel_chipset.h" #include "intel_gpu_tools.h" static drm_intel_bufmgr *bufmgr;
tests/gem_set_tiling_vs_gtt.c +2 -1
@@ -35,9 +35,10 @@#include <sys/stat.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #define OBJECT_SIZE (1024*1024)#define TEST_STRIDE (1024*4)
tests/gem_set_tiling_vs_pwrite.c +1 -1
@@ -35,7 +35,7 @@#include <sys/stat.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_gpu_tools.h"
tests/gem_storedw_batches_loop.c +2 -1
@@ -35,9 +35,10 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" +#include "intel_chipset.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h"
tests/gem_storedw_loop_blt.c +2 -1
@@ -35,11 +35,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_storedw_loop_bsd.c +2 -1
@@ -35,11 +35,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_storedw_loop_render.c +2 -1
@@ -35,11 +35,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_storedw_loop_vebox.c +2 -1
@@ -34,11 +34,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #define LOCAL_I915_EXEC_VEBOX (4<<0)
tests/gem_stress.c +2 -1
@@ -60,11 +60,12 @@#include <sys/time.h> #include <getopt.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #define CMD_POLY_STIPPLE_OFFSET 0x7906
tests/gem_threaded_access_tiled.c +1 -1
@@ -31,7 +31,7 @@#include <pthread.h> #include "drmtest.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "intel_bufmgr.h" /* Testcase: check parallel access to tiled memory
tests/gem_tiled_blits.c +2 -1
@@ -50,10 +50,11 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" +#include "intel_chipset.h" #include "intel_gpu_tools.h" static drm_intel_bufmgr *bufmgr;
tests/gem_tiled_fence_blits.c +2 -1
@@ -50,11 +50,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_tiled_partial_pwrite_pread.c +2 -1
@@ -34,9 +34,10 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" +#include "intel_chipset.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h"
tests/gem_tiled_pread.c +2 -1
@@ -45,9 +45,10 @@#include <sys/time.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #define WIDTH 512#define HEIGHT 512
tests/gem_tiled_pread_pwrite.c +1 -1
@@ -54,7 +54,7 @@#include <sys/time.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_gpu_tools.h"
tests/gem_tiled_swapping.c +1 -1
@@ -54,7 +54,7 @@#include <sys/time.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_gpu_tools.h"
tests/gem_tiling_max_stride.c +2 -1
@@ -36,9 +36,10 @@#include <sys/stat.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static void do_test_invalid_tiling (int fd,uint32_t handle,int tiling,int stride) {
tests/gem_unfence_active_buffers.c +2 -1
@@ -48,11 +48,12 @@#include <sys/time.h> #include <stdbool.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_unref_active_buffers.c +2 -1
@@ -41,11 +41,12 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_vmap_blits.c +1 -1
@@ -44,7 +44,7 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h"
tests/gem_wait_render_timeout.c +2 -1
@@ -38,11 +38,12 @@#include <sys/time.h> #include <getopt.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #define MSEC_PER_SEC 1000L#define USEC_PER_MSEC 1000L
tests/gem_write_read_ring_switch.c +2 -1
@@ -34,10 +34,11 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" +#include "intel_chipset.h" #include "intel_gpu_tools.h" #include "i830_reg.h"
tests/gen3_mixed_blits.c +2 -1
@@ -43,9 +43,10 @@#include <sys/time.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #include "i915_reg.h" #include "i915_3d.h"
tests/gen3_render_linear_blits.c +2 -1
@@ -42,9 +42,10 @@#include <sys/stat.h> #include <sys/time.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #include "i915_reg.h" #include "i915_3d.h"
tests/gen3_render_mixed_blits.c +2 -1
@@ -43,9 +43,10 @@#include <sys/time.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #include "i915_reg.h" #include "i915_3d.h"
tests/gen3_render_tiledx_blits.c +2 -1
@@ -43,9 +43,10 @@#include <sys/time.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #include "i915_reg.h" #include "i915_3d.h"
tests/gen3_render_tiledy_blits.c +2 -1
@@ -43,9 +43,10 @@#include <sys/time.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #include "i915_reg.h" #include "i915_3d.h"
tests/gen7_forcewake_mt.c +2 -1
@@ -35,10 +35,11 @@#include <string.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "i915_pciids.h" #include "drmtest.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #define FORCEWAKE_MT 0xa188
tests/kms_addfb.c +1 -1
@@ -35,7 +35,7 @@#include <sys/stat.h> #include <sys/ioctl.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "drm_fourcc.h"
tests/kms_fbc_crc.c +3 -1
@@ -27,12 +27,14 @@#include <stdio.h> #include <string.h> -#include "drm_fourcc.h" +#include <drm_fourcc.h> #include "drmtest.h" #include "igt_debugfs.h" #include "igt_kms.h" +#include "intel_chipset.h" #include "intel_batchbuffer.h" +#include "ioctl_wrappers.h" enum test_mode {TEST_PAGE_FLIP ,
tests/kms_flip.c +4 -2
@@ -35,10 +35,12 @@#include <sys/time.h> #include <sys/ioctl.h> #include <linux/kd.h> +#include <time.h> +#include <pthread.h> -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" -#include "testdisplay.h" +#include "intel_chipset.h" #include "intel_batchbuffer.h" #include "igt_kms.h"
tests/kms_render.c +4 -1
@@ -30,13 +30,16 @@#include <unistd.h> #include <sys/time.h> -#include "drm_fourcc.h" +#include <drm_fourcc.h> +#include "drmtest.h" #include "testdisplay.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" +#include "intel_chipset.h" #include "igt_kms.h" +#include "ioctl_wrappers.h" drmModeRes *resources;int drm_fd;
tests/pm_lpsp.c +2 -0
@@ -31,6 +31,8 @@#include "drmtest.h" #include "igt_kms.h" +#include "intel_gpu_tools.h" +#include "intel_chipset.h" /* We know that if we don't enable audio runtime PM, snd_hda_intel will never * release its power well refcount, and we'll never reach the LPSP sate. OTOH
tests/pm_pc8.c +2 -1
@@ -44,7 +44,8 @@#include "drmtest.h" #include "intel_batchbuffer.h" #include "intel_gpu_tools.h" -#include "i915_drm.h" +#include "intel_chipset.h" +#include "ioctl_wrappers.h" #include "igt_kms.h" #include "igt_debugfs.h"
tests/pm_rps.c +3 -0
@@ -34,11 +34,14 @@#include <getopt.h> #include <fcntl.h> #include <signal.h> +#include "drmtest.h" #include "intel_gpu_tools.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" +#include "intel_chipset.h" #include "igt_debugfs.h" +#include "ioctl_wrappers.h" static int drm_fd;
tests/prime_nv_api.c +1 -0
@@ -19,6 +19,7 @@#include "intel_gpu_tools.h" #include "intel_batchbuffer.h" #include "drmtest.h" +#include "intel_chipset.h" #define BO_SIZE (256*1024)
tests/prime_nv_pcopy.c +2 -1
@@ -23,11 +23,12 @@#include <sys/ioctl.h> #include <errno.h> -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "intel_bufmgr.h" #include "nouveau.h" #include "intel_gpu_tools.h" #include "intel_batchbuffer.h" +#include "intel_chipset.h" #include "drmtest.h" static int intel_fd =-1 , nouveau_fd =-1 ;
tests/prime_nv_test.c +2 -1
@@ -22,11 +22,12 @@#include <sys/stat.h> #include <sys/ioctl.h> -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "intel_bufmgr.h" #include "nouveau.h" #include "intel_gpu_tools.h" #include "intel_batchbuffer.h" +#include "intel_chipset.h" #include "drmtest.h" int intel_fd =-1 , nouveau_fd =-1 ;
tests/prime_self_import.c +1 -1
@@ -44,7 +44,7 @@#include <pthread.h> #include "drm.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "igt_debugfs.h"
tests/prime_udl.c +2 -1
@@ -25,11 +25,12 @@#include "xf86drm.h" #include "xf86drmMode.h" -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "intel_bufmgr.h" #include "intel_gpu_tools.h" #include "intel_batchbuffer.h" #include "drmtest.h" +#include "intel_chipset.h" int intel_fd =-1 , udl_fd =-1 ;drm_intel_bufmgr *bufmgr;
tests/testdisplay.c +1 -1
@@ -62,7 +62,7 @@#include <sys/types.h> #include <sys/stat.h> -#include "i915_drm.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "testdisplay.h" #include "igt_kms.h"
tools/intel_perf_counters.c +1 -0
@@ -48,6 +48,7 @@#include "intel_gpu_tools.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" +#include "intel_chipset.h" #define GEN5_COUNTER_COUNT 29
Signature · 1 line
1.8.5.2
PATCH 18/28 lib: unnecessary header removal for drmtest.h, part 2
In reply to Daniel VetterI've left unistd.h in it - it's not strictly required but most users of drmtest.h want it for the open helpers, and then you kinda need to close that file descriptor again ...
--- benchmarks/intel_upload_blit_large.c | 6 ++++-- lib/drmtest.h | 9 +++------ lib/igt_core.c | 2 +- lib/igt_core.h | 2 ++ lib/igt_debugfs.c | 1 + lib/igt_kms.c | 6 +++++- lib/igt_kms.h | 2 ++ lib/ioctl_wrappers.c | 1 + tests/core_getclient.c | 3 +++ tests/core_getstats.c | 5 +++++ tests/gem_ctx_bad_destroy.c | 2 ++ tests/gem_ctx_create.c | 2 ++ tests/gem_fenced_exec_thrash.c | 4 +++- tests/gem_flink_race.c | 1 + tests/gem_reg_read.c | 2 ++ tests/gem_seqno_wrap.c | 1 + tests/gem_vmap_blits.c | 1 + tests/igt_simulation.c | 1 + tests/pm_psr.c | 2 ++ tests/pm_rc6_residency.c | 2 ++ tests/pm_rps.c | 1 + tests/prime_udl.c | 3 ++- 22 files changed, 47 insertions(+), 12 deletions(-)
benchmarks/intel_upload_blit_large.c +4 -2
@@ -53,8 +53,10 @@#include <errno.h> #include <sys/stat.h> #include <sys/time.h> -#include "drm.h" -#include "i915_drm.h" + +#include <drm.h> +#include <i915_drm.h> +#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h"
lib/drmtest.h +3 -6
@@ -28,16 +28,13 @@#ifndef DRMTEST_H #define DRMTEST_H -#include <stdio.h> -#include <stdlib.h> #include <unistd.h> -#include <errno.h> #include <stdbool.h> +#include <stdint.h> #include <sys/mman.h> -#include "xf86drm.h" -#include "xf86drmMode.h" -#include "intel_batchbuffer.h" +#include <xf86drm.h> +#include <intel_batchbuffer.h> #ifdef ANDROID #ifndef HAVE_MMAP64
lib/igt_core.c +1 -1
@@ -48,9 +48,9 @@#include <sys/syscall.h> #include <sys/utsname.h> #include <termios.h> +#include <errno.h> #include "drmtest.h" -#include "i915_drm.h" #include "intel_chipset.h" #include "intel_gpu_tools.h" #include "igt_debugfs.h"
lib/igt_core.h +2 -0
@@ -32,8 +32,10 @@#include <setjmp.h> #include <stdbool.h> +#include <stdlib.h> #include <string.h> #include <sys/types.h> +#include <stdarg.h> bool __igt_fixture (void );void __igt_fixture_complete (void );
lib/igt_debugfs.c +1 -0
@@ -27,6 +27,7 @@#include <sys/mount.h> #include <errno.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h>
lib/igt_kms.c +5 -1
@@ -23,14 +23,18 @@*/ #define _GNU_SOURCE +#include <unistd.h> #include <stdio.h> #include <stdarg.h> #include <fcntl.h> #include <sys/stat.h> #include <string.h> +#include <stdlib.h> #include <math.h> #include <linux/kd.h> -#include "drm_fourcc.h" +#include <errno.h> + +#include <drm_fourcc.h> #include "drmtest.h" #include "igt_kms.h"
lib/igt_kms.h +2 -0
@@ -29,6 +29,8 @@#include <stdint.h> #include <cairo.h> +#include <xf86drmMode.h> +#include "igt_display.h" struct kmstest_connector_config {
lib/ioctl_wrappers.c +1 -0
@@ -47,6 +47,7 @@#include <sys/syscall.h> #include <sys/utsname.h> #include <termios.h> +#include <errno.h> #include "drmtest.h" #include "i915_drm.h"
tests/core_getclient.c +3 -0
@@ -27,6 +27,9 @@#include <limits.h> #include <sys/ioctl.h> +#include <stdlib.h> +#include <errno.h> +#include "drmtest.h" /**
tests/core_getstats.c +5 -0
@@ -27,6 +27,11 @@#include <limits.h> #include <sys/ioctl.h> +#include <sys/types.h> + +#include <drm.h> + +#include "igt_core.h" #include "drmtest.h" /**
tests/gem_ctx_bad_destroy.c +2 -0
@@ -31,6 +31,8 @@#include <stdio.h> #include <string.h> +#include <errno.h> +#include "ioctl_wrappers.h" #include "drmtest.h"
tests/gem_ctx_create.c +2 -0
@@ -27,6 +27,8 @@#include <stdio.h> #include <string.h> +#include <errno.h> +#include "ioctl_wrappers.h" #include "drmtest.h"
tests/gem_fenced_exec_thrash.c +3 -1
@@ -33,9 +33,11 @@#include <string.h> #include <fcntl.h> #include <inttypes.h> +#include <errno.h> +#include <drm.h> -#include "ioctl_wrappers.h" +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_chipset.h" #include "intel_gpu_tools.h"
tests/gem_flink_race.c +1 -0
@@ -31,6 +31,7 @@#include <fcntl.h> #include <unistd.h> #include <pthread.h> +#include <errno.h> #include "drmtest.h" #include "ioctl_wrappers.h"
tests/gem_reg_read.c +2 -0
@@ -27,6 +27,8 @@#include <stdio.h> #include <string.h> +#include <errno.h> +#include "ioctl_wrappers.h" #include "drmtest.h"
tests/gem_seqno_wrap.c +1 -0
@@ -41,6 +41,7 @@#include <wordexp.h> #include <getopt.h> #include <signal.h> +#include <errno.h> #include "ioctl_wrappers.h" #include "drmtest.h"
tests/gem_vmap_blits.c +1 -0
@@ -43,6 +43,7 @@#include <errno.h> #include <sys/stat.h> #include <sys/time.h> +#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h"
tests/igt_simulation.c +1 -0
@@ -29,6 +29,7 @@#include <sys/wait.h> #include <sys/types.h> #include <assert.h> +#include <errno.h> #include "drmtest.h" #include "igt_core.h"
tests/pm_psr.c +2 -0
@@ -29,6 +29,8 @@#include <stdlib.h> #include <string.h> #include <unistd.h> +#include <errno.h> +#include "drmtest.h" #define SLEEP_DURATION 5000 // in milliseconds
tests/pm_rc6_residency.c +2 -0
@@ -30,6 +30,8 @@#include <stdlib.h> #include <string.h> #include <unistd.h> +#include <errno.h> +#include "drmtest.h" #define SLEEP_DURATION 3000 // in milliseconds
tests/pm_rps.c +1 -0
@@ -34,6 +34,7 @@#include <getopt.h> #include <fcntl.h> #include <signal.h> +#include <errno.h> #include "drmtest.h" #include "intel_gpu_tools.h"
tests/prime_udl.c +2 -1
@@ -24,7 +24,8 @@#include <errno.h> #include "xf86drm.h" -#include "xf86drmMode.h" +#include <xf86drmMode.h> +#include "ioctl_wrappers.h" #include "intel_bufmgr.h" #include "intel_gpu_tools.h"
Signature · 1 line
1.8.5.2
PATCH 19/28 lib: rename intel_gpu_tools.h to intel_io.h
In reply to Daniel VetterWith the header cleanup we can now give this header a suitable name, since it now really only contains register access and other I/O functions and assorted definitions.
--- benchmarks/intel_upload_blit_large.c | 2 +- benchmarks/intel_upload_blit_large_gtt.c | 2 +- benchmarks/intel_upload_blit_large_map.c | 2 +- benchmarks/intel_upload_blit_small.c | 2 +- debugger/debug_rdata.c | 2 +- debugger/eudb.c | 2 +- .../intel-gpu-tools/intel-gpu-tools-docs.xml | 2 +- lib/Makefile.sources | 2 +- lib/drmtest.c | 2 +- lib/igt_core.c | 2 +- lib/intel_gpu_tools.h | 87 ---------------------- lib/intel_io.h | 87 ++++++++++++++++++++++ lib/intel_iosf.c | 2 +- lib/intel_mmio.c | 2 +- lib/intel_os.c | 2 +- lib/intel_reg_map.c | 2 +- lib/ioctl_wrappers.c | 2 +- lib/rendercopy_gen6.c | 2 +- lib/rendercopy_gen7.c | 2 +- lib/rendercopy_gen8.c | 2 +- lib/rendercopy_i830.c | 2 +- lib/rendercopy_i915.c | 2 +- tests/ddi_compute_wrpll.c | 2 +- tests/drm_vma_limiter.c | 2 +- tests/drm_vma_limiter_cached.c | 2 +- tests/drm_vma_limiter_cpu.c | 2 +- tests/drm_vma_limiter_gtt.c | 2 +- tests/gem_bad_address.c | 2 +- tests/gem_bad_batch.c | 2 +- tests/gem_bad_blit.c | 2 +- tests/gem_caching.c | 2 +- tests/gem_concurrent_blit.c | 2 +- tests/gem_cpu_reloc.c | 2 +- tests/gem_cs_prefetch.c | 2 +- tests/gem_cs_tlb.c | 2 +- tests/gem_ctx_basic.c | 2 +- tests/gem_double_irq_loop.c | 2 +- tests/gem_dummy_reloc_loop.c | 2 +- tests/gem_exec_bad_domains.c | 2 +- tests/gem_exec_blt.c | 2 +- tests/gem_exec_faulting_reloc.c | 2 +- tests/gem_exec_nop.c | 2 +- tests/gem_fenced_exec_thrash.c | 2 +- tests/gem_gtt_cpu_tlb.c | 2 +- tests/gem_hang.c | 2 +- tests/gem_hangcheck_forcewake.c | 2 +- tests/gem_linear_blits.c | 2 +- tests/gem_media_fill.c | 2 +- tests/gem_non_secure_batch.c | 2 +- tests/gem_partial_pwrite_pread.c | 2 +- tests/gem_persistent_relocs.c | 2 +- tests/gem_pin.c | 2 +- tests/gem_pipe_control_store_loop.c | 2 +- tests/gem_pread_after_blit.c | 2 +- tests/gem_pwrite_pread.c | 2 +- tests/gem_reloc_overflow.c | 2 +- tests/gem_reloc_vs_gpu.c | 2 +- tests/gem_render_copy.c | 2 +- tests/gem_render_linear_blits.c | 2 +- tests/gem_render_tiled_blits.c | 2 +- tests/gem_reset_stats.c | 2 +- tests/gem_ring_sync_loop.c | 2 +- tests/gem_ringfill.c | 2 +- tests/gem_seqno_wrap.c | 2 +- tests/gem_set_tiling_vs_blt.c | 2 +- tests/gem_set_tiling_vs_gtt.c | 2 +- tests/gem_set_tiling_vs_pwrite.c | 2 +- tests/gem_storedw_batches_loop.c | 2 +- tests/gem_storedw_loop_blt.c | 2 +- tests/gem_storedw_loop_bsd.c | 2 +- tests/gem_storedw_loop_render.c | 2 +- tests/gem_storedw_loop_vebox.c | 2 +- tests/gem_stress.c | 2 +- tests/gem_tiled_blits.c | 2 +- tests/gem_tiled_fence_blits.c | 2 +- tests/gem_tiled_partial_pwrite_pread.c | 2 +- tests/gem_tiled_pread.c | 2 +- tests/gem_tiled_pread_pwrite.c | 2 +- tests/gem_tiled_swapping.c | 2 +- tests/gem_tiling_max_stride.c | 2 +- tests/gem_unfence_active_buffers.c | 2 +- tests/gem_unref_active_buffers.c | 2 +- tests/gem_vmap_blits.c | 2 +- tests/gem_wait_render_timeout.c | 2 +- tests/gem_write_read_ring_switch.c | 2 +- tests/gen3_mixed_blits.c | 2 +- tests/gen3_render_linear_blits.c | 2 +- tests/gen3_render_mixed_blits.c | 2 +- tests/gen3_render_tiledx_blits.c | 2 +- tests/gen3_render_tiledy_blits.c | 2 +- tests/gen7_forcewake_mt.c | 2 +- tests/kms_render.c | 2 +- tests/kms_setmode.c | 2 +- tests/pm_lpsp.c | 2 +- tests/pm_pc8.c | 2 +- tests/pm_rps.c | 2 +- tests/prime_nv_api.c | 2 +- tests/prime_nv_pcopy.c | 2 +- tests/prime_nv_test.c | 2 +- tests/prime_udl.c | 2 +- tools/intel_audio_dump.c | 2 +- tools/intel_backlight.c | 2 +- tools/intel_bios_reader.c | 2 +- tools/intel_dpio_read.c | 2 +- tools/intel_dpio_write.c | 2 +- tools/intel_error_decode.c | 2 +- tools/intel_forcewaked.c | 2 +- tools/intel_framebuffer_dump.c | 2 +- tools/intel_gpu_time.c | 2 +- tools/intel_gpu_top.c | 2 +- tools/intel_gtt.c | 2 +- tools/intel_infoframes.c | 2 +- tools/intel_l3_parity.c | 2 +- tools/intel_lid.c | 2 +- tools/intel_nc_read.c | 2 +- tools/intel_nc_write.c | 2 +- tools/intel_opregion_decode.c | 2 +- tools/intel_panel_fitter.c | 2 +- tools/intel_perf_counters.c | 2 +- tools/intel_punit_read.c | 2 +- tools/intel_punit_write.c | 2 +- tools/intel_reg_checker.c | 2 +- tools/intel_reg_dumper.c | 2 +- tools/intel_reg_read.c | 2 +- tools/intel_reg_snapshot.c | 2 +- tools/intel_reg_write.c | 2 +- tools/intel_stepping.c | 2 +- tools/intel_vga_read.c | 2 +- tools/intel_vga_write.c | 2 +- 129 files changed, 214 insertions(+), 214 deletions(-) delete mode 100644 lib/intel_gpu_tools.h create mode 100644 lib/intel_io.h
benchmarks/intel_upload_blit_large.c +1 -1
@@ -60,7 +60,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #define OBJECT_WIDTH 1280
benchmarks/intel_upload_blit_large_gtt.c +1 -1
@@ -58,7 +58,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #define OBJECT_WIDTH 1280
benchmarks/intel_upload_blit_large_map.c +1 -1
@@ -61,7 +61,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #define OBJECT_WIDTH 1280
benchmarks/intel_upload_blit_small.c +1 -1
@@ -54,7 +54,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" /* Happens to be 128k, the size of the VBOs used by i965's Mesa driver. */
debugger/debug_rdata.c +1 -1
@@ -28,7 +28,7 @@#include <stdint.h> #include <stdio.h> #include <stdlib.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" struct eu_rdata {
debugger/eudb.c +1 -1
@@ -44,7 +44,7 @@#include "drmtest.h" #include "intel_chipset.h" #include "intel_bufmgr.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_batchbuffer.h" #include "intel_debug.h" #include "debug.h"
docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml +1 -1
@@ -23,7 +23,7 @@ <xi:include href="xml/ioctl_wrappers.xml"/> <xi:include href="xml/intel_batchbuffer.xml"/> <xi:include href="xml/intel_chipset.xml"/> - <xi:include href="xml/intel_gpu_tools.xml"/> + <xi:include href="xml/intel_io.xml"/> </chapter> <index id="api-index-full">
lib/Makefile.sources +1 -1
@@ -16,7 +16,7 @@ libintel_tools_la_SOURCES = \ intel_batchbuffer.h \ intel_chipset.h \ intel_os.c \ - intel_gpu_tools.h \ + intel_io.h \ intel_mmio.c \ intel_chipset.c \ intel_reg.h \
lib/drmtest.c +1 -1
@@ -51,7 +51,7 @@#include "drmtest.h" #include "i915_drm.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "igt_debugfs.h" #include "../version.h" #include "config.h"
lib/igt_core.c +1 -1
@@ -52,7 +52,7 @@#include "drmtest.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "igt_debugfs.h" #include "../version.h" #include "config.h"
lib/intel_gpu_tools.h deleted +0 -87
87 lines not on this page · raw message
lib/intel_io.h new file +87 -0
87 lines not on this page · raw message
lib/intel_iosf.c +1 -1
@@ -3,7 +3,7 @@#include <stdio.h> #include <err.h> #include <errno.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_reg.h" #define TIMEOUT_US 500000
lib/intel_mmio.c +1 -1
@@ -41,7 +41,7 @@#include <sys/stat.h> #include <sys/mman.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "igt_debugfs.h" #include "intel_chipset.h"
lib/intel_os.c +1 -1
@@ -47,7 +47,7 @@#include <sys/swap.h> #endif -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "i915_drm.h" #include "drmtest.h"
lib/intel_reg_map.c +1 -1
@@ -29,7 +29,7 @@#include <stdarg.h> #include <stdlib.h> #include <sys/types.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static struct intel_register_range gen_bwcl_register_map[] = {
lib/ioctl_wrappers.c +1 -1
@@ -52,7 +52,7 @@#include "drmtest.h" #include "i915_drm.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "igt_debugfs.h" #include "../version.h" #include "config.h"
lib/rendercopy_gen6.c +1 -1
@@ -15,7 +15,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "rendercopy.h" #include "gen6_render.h" #include "intel_reg.h"
lib/rendercopy_gen7.c +1 -1
@@ -15,7 +15,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #include "rendercopy.h" #include "gen7_render.h"
lib/rendercopy_gen8.c +1 -1
@@ -15,7 +15,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "rendercopy.h" #include "gen8_render.h" #include "intel_reg.h"
lib/rendercopy_i830.c +1 -1
@@ -14,7 +14,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "i830_reg.h" #include "rendercopy.h"
lib/rendercopy_i915.c +1 -1
@@ -14,7 +14,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "i915_reg.h" #include "i915_3d.h"
tests/ddi_compute_wrpll.c +1 -1
@@ -3,7 +3,7 @@#include <stdint.h> #include <stdlib.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "drmtest.h" #define LC_FREQ 2700
tests/drm_vma_limiter.c +1 -1
@@ -37,7 +37,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;
tests/drm_vma_limiter_cached.c +1 -1
@@ -37,7 +37,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;
tests/drm_vma_limiter_cpu.c +1 -1
@@ -37,7 +37,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;
tests/drm_vma_limiter_gtt.c +1 -1
@@ -37,7 +37,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;
tests/gem_bad_address.c +1 -1
@@ -40,7 +40,7 @@#include "intel_bufmgr.h" #include "intel_chipset.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_bad_batch.c +1 -1
@@ -40,7 +40,7 @@#include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_bad_blit.c +1 -1
@@ -55,7 +55,7 @@#include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_caching.c +1 -1
@@ -39,7 +39,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" /*
tests/gem_concurrent_blit.c +1 -1
@@ -49,7 +49,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static void
tests/gem_cpu_reloc.c +1 -1
@@ -58,7 +58,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static uint32_t use_blt;
tests/gem_cs_prefetch.c +1 -1
@@ -48,7 +48,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;
tests/gem_cs_tlb.c +1 -1
@@ -49,7 +49,7 @@#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #define LOCAL_I915_EXEC_VEBOX (4<<0)#define BATCH_SIZE (1024*1024)
tests/gem_ctx_basic.c +1 -1
@@ -45,7 +45,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" /* options */
tests/gem_double_irq_loop.c +1 -1
@@ -38,7 +38,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "i830_reg.h" #include "intel_chipset.h"
tests/gem_dummy_reloc_loop.c +1 -1
@@ -38,7 +38,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "i830_reg.h" #include "intel_chipset.h"
tests/gem_exec_bad_domains.c +1 -1
@@ -38,7 +38,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" /* Testcase: Test whether the kernel rejects relocations with non-gpu domains
tests/gem_exec_blt.c +1 -1
@@ -40,7 +40,7 @@#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #define OBJECT_SIZE 16384
tests/gem_exec_faulting_reloc.c +1 -1
@@ -40,7 +40,7 @@#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "igt_debugfs.h" /* Testcase: Submit patches with relocations in memory that will fault
tests/gem_exec_nop.c +1 -1
@@ -39,7 +39,7 @@#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #define LOCAL_I915_EXEC_VEBOX (4<<0)
tests/gem_fenced_exec_thrash.c +1 -1
@@ -40,7 +40,7 @@#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #define WIDTH 1024#define HEIGHT 1024
tests/gem_gtt_cpu_tlb.c +1 -1
@@ -42,7 +42,7 @@#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #define OBJ_SIZE (1024*1024)
tests/gem_hang.c +1 -1
@@ -40,7 +40,7 @@#include "intel_bufmgr.h" #include "intel_chipset.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_hangcheck_forcewake.c +1 -1
@@ -38,7 +38,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" /*
tests/gem_linear_blits.c +1 -1
@@ -47,7 +47,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #define WIDTH 512#define HEIGHT 512
tests/gem_media_fill.c +1 -1
@@ -47,7 +47,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #define WIDTH 64
tests/gem_non_secure_batch.c +1 -1
@@ -39,7 +39,7 @@#include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "i830_reg.h" static drm_intel_bufmgr *bufmgr;
tests/gem_partial_pwrite_pread.c +1 -1
@@ -39,7 +39,7 @@#include "intel_chipset.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" /* * Testcase: pwrite/pread consistency when touching partial cachelines
tests/gem_persistent_relocs.c +1 -1
@@ -42,7 +42,7 @@#include "intel_bufmgr.h" #include "intel_chipset.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "igt_debugfs.h" /*
tests/gem_pin.c +1 -1
@@ -39,7 +39,7 @@#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #define COPY_BLT_CMD (2<<29|0x53<<22|0x6)#define BLT_WRITE_ALPHA (1<<21)
tests/gem_pipe_control_store_loop.c +1 -1
@@ -45,7 +45,7 @@#include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_pread_after_blit.c +1 -1
@@ -48,7 +48,7 @@#include "intel_chipset.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_pwrite_pread.c +1 -1
@@ -42,7 +42,7 @@#include "intel_chipset.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #define OBJECT_SIZE 16384
tests/gem_reloc_overflow.c +1 -1
@@ -46,7 +46,7 @@#include "ioctl_wrappers.h" #include "intel_chipset.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" /* * Testcase: Kernel relocation overflows are caught.
tests/gem_reloc_vs_gpu.c +1 -1
@@ -42,7 +42,7 @@#include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "igt_debugfs.h" /*
tests/gem_render_copy.c +1 -1
@@ -47,7 +47,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #define WIDTH 512
tests/gem_render_linear_blits.c +1 -1
@@ -52,7 +52,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #define WIDTH 512
tests/gem_render_tiled_blits.c +1 -1
@@ -48,7 +48,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #define WIDTH 512
tests/gem_reset_stats.c +1 -1
@@ -46,7 +46,7 @@#include "intel_bufmgr.h" #include "intel_chipset.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #define RS_NO_ERROR 0#define RS_BATCH_ACTIVE (1 << 0)
tests/gem_ring_sync_loop.c +1 -1
@@ -38,7 +38,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "i830_reg.h" #include "intel_chipset.h"
tests/gem_ringfill.c +1 -1
@@ -47,7 +47,7 @@#include "intel_bufmgr.h" #include "intel_chipset.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" struct bo {const char *ring;
tests/gem_seqno_wrap.c +1 -1
@@ -48,7 +48,7 @@#include "igt_core.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static int devid;
tests/gem_set_tiling_vs_blt.c +1 -1
@@ -59,7 +59,7 @@#include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_set_tiling_vs_gtt.c +1 -1
@@ -37,7 +37,7 @@#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #define OBJECT_SIZE (1024*1024)
tests/gem_set_tiling_vs_pwrite.c +1 -1
@@ -37,7 +37,7 @@#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #define OBJECT_SIZE (1024*1024)#define TEST_STRIDE (1024*4)
tests/gem_storedw_batches_loop.c +1 -1
@@ -40,7 +40,7 @@#include "intel_bufmgr.h" #include "intel_chipset.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" static drm_intel_bufmgr *bufmgr;static drm_intel_bo *target_bo;
tests/gem_storedw_loop_blt.c +1 -1
@@ -39,7 +39,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;
tests/gem_storedw_loop_bsd.c +1 -1
@@ -39,7 +39,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;
tests/gem_storedw_loop_render.c +1 -1
@@ -39,7 +39,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;
tests/gem_storedw_loop_vebox.c +1 -1
@@ -38,7 +38,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #define LOCAL_I915_EXEC_VEBOX (4<<0)
tests/gem_stress.c +1 -1
@@ -64,7 +64,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #define CMD_POLY_STIPPLE_OFFSET 0x7906
tests/gem_tiled_blits.c +1 -1
@@ -55,7 +55,7 @@#include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_tiled_fence_blits.c +1 -1
@@ -54,7 +54,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;
tests/gem_tiled_partial_pwrite_pread.c +1 -1
@@ -39,7 +39,7 @@#include "intel_bufmgr.h" #include "intel_chipset.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" /* * Testcase: pwrite/pread consistency when touching partial cachelines
tests/gem_tiled_pread.c +1 -1
@@ -47,7 +47,7 @@#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #define WIDTH 512
tests/gem_tiled_pread_pwrite.c +1 -1
@@ -56,7 +56,7 @@#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #define WIDTH 512#define HEIGHT 512
tests/gem_tiled_swapping.c +1 -1
@@ -56,7 +56,7 @@#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #define WIDTH 512#define HEIGHT 512
tests/gem_tiling_max_stride.c +1 -1
@@ -38,7 +38,7 @@#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static void do_test_invalid_tiling (int fd,uint32_t handle,int tiling,int stride)
tests/gem_unfence_active_buffers.c +1 -1
@@ -52,7 +52,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;
tests/gem_unref_active_buffers.c +1 -1
@@ -45,7 +45,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static drm_intel_bufmgr *bufmgr;
tests/gem_vmap_blits.c +1 -1
@@ -49,7 +49,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #if !defined(I915_PARAM_HAS_VMAP )#pragma message("No vmap support in drm, skipping")
tests/gem_wait_render_timeout.c +1 -1
@@ -42,7 +42,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #define MSEC_PER_SEC 1000L
tests/gem_write_read_ring_switch.c +1 -1
@@ -39,7 +39,7 @@#include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "i830_reg.h" #define LOCAL_I915_EXEC_VEBOX (4<<0)
tests/gen3_mixed_blits.c +1 -1
@@ -45,7 +45,7 @@#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #include "i915_reg.h"
tests/gen3_render_linear_blits.c +1 -1
@@ -44,7 +44,7 @@#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #include "i915_reg.h"
tests/gen3_render_mixed_blits.c +1 -1
@@ -45,7 +45,7 @@#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #include "i915_reg.h"
tests/gen3_render_tiledx_blits.c +1 -1
@@ -45,7 +45,7 @@#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #include "i915_reg.h"
tests/gen3_render_tiledy_blits.c +1 -1
@@ -45,7 +45,7 @@#include "drm.h" #include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #include "i915_reg.h"
tests/gen7_forcewake_mt.c +1 -1
@@ -38,7 +38,7 @@#include "ioctl_wrappers.h" #include "i915_pciids.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #define FORCEWAKE_MT 0xa188
tests/kms_render.c +1 -1
@@ -36,7 +36,7 @@#include "testdisplay.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #include "igt_kms.h" #include "ioctl_wrappers.h"
tests/kms_setmode.c +1 -1
@@ -36,7 +36,7 @@#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "igt_kms.h" #define MAX_CONNECTORS 10
tests/pm_lpsp.c +1 -1
@@ -31,7 +31,7 @@#include "drmtest.h" #include "igt_kms.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" /* We know that if we don't enable audio runtime PM, snd_hda_intel will never
tests/pm_pc8.c +1 -1
@@ -43,7 +43,7 @@#include "drm.h" #include "drmtest.h" #include "intel_batchbuffer.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #include "ioctl_wrappers.h" #include "igt_kms.h"
tests/pm_rps.c +1 -1
@@ -37,7 +37,7 @@#include <errno.h> #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_chipset.h"
tests/prime_nv_api.c +1 -1
@@ -16,7 +16,7 @@#include "intel_bufmgr.h" #include "nouveau.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_batchbuffer.h" #include "drmtest.h" #include "intel_chipset.h"
tests/prime_nv_pcopy.c +1 -1
@@ -26,7 +26,7 @@#include "ioctl_wrappers.h" #include "intel_bufmgr.h" #include "nouveau.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_batchbuffer.h" #include "intel_chipset.h" #include "drmtest.h"
tests/prime_nv_test.c +1 -1
@@ -25,7 +25,7 @@#include "ioctl_wrappers.h" #include "intel_bufmgr.h" #include "nouveau.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_batchbuffer.h" #include "intel_chipset.h" #include "drmtest.h"
tests/prime_udl.c +1 -1
@@ -28,7 +28,7 @@#include "ioctl_wrappers.h" #include "intel_bufmgr.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_batchbuffer.h" #include "drmtest.h" #include "intel_chipset.h"
tools/intel_audio_dump.c +1 -1
@@ -33,7 +33,7 @@#include <string.h> #include <err.h> #include <arpa/inet.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_reg.h" #include "intel_chipset.h" #include "drmtest.h"
tools/intel_backlight.c +1 -1
@@ -30,7 +30,7 @@#include <stdio.h> #include <string.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #include "intel_reg.h"
tools/intel_bios_reader.c +1 -1
@@ -36,7 +36,7 @@#include <sys/types.h> #include "intel_bios.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #include "drmtest.h"
tools/intel_dpio_read.c +1 -1
@@ -30,7 +30,7 @@#include <stdio.h> #include <err.h> #include <string.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static void usage (char *cmdname)
tools/intel_dpio_write.c +1 -1
@@ -30,7 +30,7 @@#include <stdio.h> #include <err.h> #include <string.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static void usage (char *cmdname)
tools/intel_error_decode.c +1 -1
@@ -53,7 +53,7 @@#include <intel_bufmgr.h> #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "instdone.h" #include "intel_reg.h"
tools/intel_forcewaked.c +1 -1
@@ -34,7 +34,7 @@#include <stdlib.h> #include <syslog.h> #include <unistd.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" bool daemonized;
tools/intel_framebuffer_dump.c +1 -1
@@ -35,7 +35,7 @@#include <i915_drm.h> #include <cairo.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "drmtest.h" int main (int argc,char **argv)
tools/intel_gpu_time.c +1 -1
@@ -34,7 +34,7 @@#include <sys/resource.h> #include <sys/wait.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #include "intel_reg.h"
tools/intel_gpu_top.c +1 -1
@@ -42,7 +42,7 @@#ifdef HAVE_TERMIOS_H #include <termios.h> #endif -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "instdone.h" #include "intel_reg.h" #include "intel_chipset.h"
tools/intel_gtt.c +1 -1
@@ -34,7 +34,7 @@#include <pciaccess.h> #include <unistd.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #define KB (x) ((x) * 1024)
tools/intel_infoframes.c +1 -1
@@ -30,7 +30,7 @@#include <stdlib.h> #include <string.h> #include <getopt.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #include "drmtest.h"
tools/intel_l3_parity.c +1 -1
@@ -36,7 +36,7 @@#include <unistd.h> #include <getopt.h> #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "drmtest.h" #ifdef HAVE_CONFIG_H #include "config.h"
tools/intel_lid.c +1 -1
@@ -37,7 +37,7 @@#include <sys/stat.h> #include <sys/types.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_reg.h" #include "intel_bios.h" #include "intel_chipset.h"
tools/intel_nc_read.c +1 -1
@@ -30,7 +30,7 @@#include <stdio.h> #include <err.h> #include <string.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static void usage (char *cmdname)
tools/intel_nc_write.c +1 -1
@@ -30,7 +30,7 @@#include <stdio.h> #include <err.h> #include <string.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static void usage (char *cmdname)
tools/intel_opregion_decode.c +1 -1
@@ -37,7 +37,7 @@#include <sys/stat.h> #include <sys/types.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "drmtest.h" #define OPREGION_HEADER_OFFSET 0
tools/intel_panel_fitter.c +1 -1
@@ -30,7 +30,7 @@#include <unistd.h> #include <stdlib.h> #include <string.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #include "intel_reg.h"
tools/intel_perf_counters.c +1 -1
@@ -45,7 +45,7 @@#include "drm.h" #include "i915_drm.h" #include "drmtest.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_chipset.h"
tools/intel_punit_read.c +1 -1
@@ -30,7 +30,7 @@#include <stdio.h> #include <err.h> #include <string.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static void usage (char *cmdname)
tools/intel_punit_write.c +1 -1
@@ -30,7 +30,7 @@#include <stdio.h> #include <err.h> #include <string.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static void usage (char *cmdname)
tools/intel_reg_checker.c +1 -1
@@ -26,7 +26,7 @@#include <err.h> #include <string.h> #include <stdbool.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static uint32_t devid;
tools/intel_reg_dumper.c +1 -1
@@ -33,7 +33,7 @@#include <string.h> #include <err.h> #include <unistd.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" #include "intel_reg.h" #include "drmtest.h"
tools/intel_reg_read.c +1 -1
@@ -30,7 +30,7 @@#include <stdio.h> #include <err.h> #include <string.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static void bit_decode (uint32_t reg)
tools/intel_reg_snapshot.c +1 -1
@@ -26,7 +26,7 @@#include <unistd.h> #include <assert.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" int main (int argc,char ** argv)
tools/intel_reg_write.c +1 -1
@@ -29,7 +29,7 @@#include <stdlib.h> #include <stdio.h> #include <err.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" int main (int argc,char ** argv)
tools/intel_stepping.c +1 -1
@@ -32,7 +32,7 @@#include <pciaccess.h> #include <err.h> #include "intel_chipset.h" -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_reg.h" static void
tools/intel_vga_read.c +1 -1
@@ -31,7 +31,7 @@#include <stdio.h> #include <unistd.h> #include <sys/io.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static uint8_t read_reg (uint32_t reg,bool use_mmio)
tools/intel_vga_write.c +1 -1
@@ -31,7 +31,7 @@#include <stdio.h> #include <unistd.h> #include <sys/io.h> -#include "intel_gpu_tools.h" +#include "intel_io.h" #include "intel_chipset.h" static void write_reg (uint32_t reg,uint8_t val,bool use_mmio)
Signature · 6 lines
1.8.5.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 20/28 lib/intel_io: rename mmio setup functions
In reply to Daniel VetterMakes their intent a bit clearer.
--- lib/intel_io.h | 4 ++-- lib/intel_mmio.c | 6 +++--- tools/intel_audio_dump.c | 4 ++-- tools/intel_backlight.c | 2 +- tools/intel_gpu_time.c | 2 +- tools/intel_gpu_top.c | 2 +- tools/intel_lid.c | 2 +- tools/intel_reg_checker.c | 2 +- tools/intel_reg_dumper.c | 2 +- tools/intel_reg_snapshot.c | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-)
lib/intel_io.h +2 -2
@@ -33,8 +33,8 @@/* register access helpers from intel_mmio.c */ extern void *mmio; -void intel_get_mmio (struct pci_device *pci_dev); -void intel_map_file (char *); +void intel_mmio_use_pci_bar (struct pci_device *pci_dev); +void intel_mmio_use_dump_file (char *);int intel_register_access_init (struct pci_device *pci_dev,int safe);void intel_register_access_fini (void );
lib/intel_mmio.c +3 -3
@@ -58,7 +58,7 @@ static struct _mmio_data { } mmio_data;void -intel_map_file (char *file) +intel_mmio_use_dump_file (char *file) {int fd;struct stat st;
@@ -80,7 +80,7 @@ intel_map_file(char *file) }void -intel_get_mmio (struct pci_device *pci_dev) +intel_mmio_use_pci_bar (struct pci_device *pci_dev) {uint32_t devid, gen;int mmio_bar, mmio_size;
@@ -132,7 +132,7 @@ intel_register_access_init(struct pci_device *pci_dev, int safe)/* after old API is deprecated, remove this */ if (mmio ==NULL ) -intel_get_mmio (pci_dev); +intel_mmio_use_pci_bar (pci_dev);assert (mmio !=NULL );
tools/intel_audio_dump.c +2 -2
@@ -2277,9 +2277,9 @@ int main(int argc, char **argv)do_self_tests ();if (argc ==2 ) -intel_map_file (argv[1 ]); +intel_mmio_use_dump_file (argv[1 ]);else -intel_get_mmio (pci_dev); +intel_mmio_use_pci_bar (pci_dev);if (IS_VALLEYVIEW (devid)) {printf ("Valleyview audio registers:\n\n" );
tools/intel_backlight.c +1 -1
@@ -50,7 +50,7 @@ int main(int argc, char** argv) {uint32_t current, max; -intel_get_mmio (intel_get_pci_device ()); +intel_mmio_use_pci_bar (intel_get_pci_device ()); current =reg_read (BLC_PWM_CPU_CTL ) &BACKLIGHT_DUTY_CYCLE_MASK ; max =reg_read (BLC_PWM_PCH_CTL2 ) >>16 ;
tools/intel_gpu_time.c +1 -1
@@ -67,7 +67,7 @@ int main(int argc, char **argv)static struct rusage rusage;int status; -intel_get_mmio (intel_get_pci_device ()); +intel_mmio_use_pci_bar (intel_get_pci_device ());if (argc ==1 ) {fprintf (stderr,"usage: %s cmd [args...]\n" , argv[0 ]);
tools/intel_gpu_top.c +1 -1
@@ -473,7 +473,7 @@ int main(int argc, char **argv) pci_dev =intel_get_pci_device (); devid = pci_dev->device_id; -intel_get_mmio (pci_dev); +intel_mmio_use_pci_bar (pci_dev);init_instdone_definitions (devid);/* Do we have a command to run? */
tools/intel_lid.c +1 -1
@@ -118,7 +118,7 @@ int main(int argc, char **argv) {int swf14, acpi_lid; -intel_get_mmio (intel_get_pci_device ()); +intel_mmio_use_pci_bar (intel_get_pci_device ());while (1 ) { swf14 =INREG (SWF14 );
tools/intel_reg_checker.c +1 -1
@@ -350,7 +350,7 @@ int main(int argc, char** argv) dev =intel_get_pci_device (); devid = dev->device_id; -intel_get_mmio (dev); +intel_mmio_use_pci_bar (dev);if (IS_GEN7 (devid)) gen =7 ;
tools/intel_reg_dumper.c +1 -1
@@ -2931,7 +2931,7 @@ int main(int argc, char** argv) }if (file) { -intel_map_file (file); +intel_mmio_use_dump_file (file);if (devid) {if (IS_GEN5 (devid)) intel_pch =PCH_IBX ;
tools/intel_reg_snapshot.c +1 -1
@@ -38,7 +38,7 @@ int main(int argc, char** argv) pci_dev =intel_get_pci_device (); devid = pci_dev->device_id; -intel_get_mmio (pci_dev); +intel_mmio_use_pci_bar (pci_dev);if (IS_GEN2 (devid)) mmio_bar =1 ;
Signature · 1 line
1.8.5.2
PATCH 21/28 lib/intel_io: api documentation
In reply to Daniel VetterAs usual de-inline functions for gtkdoc to see them.
I've decided to exclude the register map stuff since that's not terribly interesting.
Aside: gtkdoc falls over when the title of a section contains a slash, hence why it reads "IO" instead of "I/O". The fun ...
--- lib/intel_io.h | 18 +++----- lib/intel_iosf.c | 58 ++++++++++++++++++++++++++ lib/intel_mmio.c | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 185 insertions(+), 16 deletions(-)
lib/intel_io.h +6 -12
@@ -34,7 +34,7 @@/* register access helpers from intel_mmio.c */ extern void *mmio;void intel_mmio_use_pci_bar (struct pci_device *pci_dev); -void intel_mmio_use_dump_file (char *); +void intel_mmio_use_dump_file (char *file);int intel_register_access_init (struct pci_device *pci_dev,int safe);void intel_register_access_fini (void );
@@ -42,17 +42,8 @@ uint32_t intel_register_read(uint32_t reg);void intel_register_write (uint32_t reg,uint32_t val);int intel_register_access_needs_fakewake (void ); -static inline uint32_t -INREG (uint32_t reg) -{ -return *(volatile uint32_t *)((volatile char *)mmio + reg); -} - -static inline void -OUTREG (uint32_t reg,uint32_t val) -{ - *(volatile uint32_t *)((volatile char *)mmio + reg) = val; -} +uint32_t INREG (uint32_t reg); +void OUTREG (uint32_t reg,uint32_t val);/* sideband access functions from intel_iosf.c */ uint32_t intel_dpio_reg_read (uint32_t reg,int phy);
@@ -64,6 +55,8 @@ int intel_nc_read(uint8_t addr, uint32_t *val);int intel_nc_write (uint8_t addr,uint32_t val);/* register maps from intel_reg_map.c */ +#ifndef __GTK_DOC_IGNORE__ +#define INTEL_RANGE_RSVD (0<<0)/* Shouldn't be read or written */ #define INTEL_RANGE_READ (1<<0)#define INTEL_RANGE_WRITE (1<<1)
@@ -83,5 +76,6 @@ struct intel_register_map { };struct intel_register_map intel_get_register_map (uint32_t devid);struct intel_register_range *intel_get_register_range (struct intel_register_map map,uint32_t offset,uint32_t mode); +#endif /* __GTK_DOC_IGNORE__ */ #endif /* INTEL_GPU_TOOLS_H */
lib/intel_iosf.c +58 -0
90 lines not on this page · raw message
lib/intel_mmio.c +121 -4
184 lines not on this page · raw message
Signature · 1 line
1.8.5.2
PATCH 22/28 lib: s/drmtest_dumb_aub/igt_aub_dump_enabled/
In reply to Daniel VetterThis is prep work to extract a new igt aux library with all kinds of random stuff. Also give it a bit a more suitable name to indicate that this is just a flag and doesn't do the aub dumping itself.
--- lib/drmtest.c | 2 +- lib/drmtest.h | 2 +- lib/rendercopy_gen8.c | 2 +- tests/gem_render_copy.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
lib/drmtest.c +1 -1
@@ -329,7 +329,7 @@ bool igt_env_set(const char *env_var, bool default_value)return atoi (val) !=0 ; } -bool drmtest_dump_aub (void ) +bool igt_aub_dump_enabled (void ) {static int dump_aub =-1 ;
lib/drmtest.h +1 -1
@@ -66,7 +66,7 @@ void igt_permute_array(void *array, unsigned size,void igt_progress (const char *header,uint64_t i,uint64_t total);bool igt_env_set (const char *env_var,bool default_value); -bool drmtest_dump_aub (void ); +bool igt_aub_dump_enabled (void );/* helpers based upon the libdrm buffer manager */ void igt_init_aperture_trashers (drm_intel_bufmgr *bufmgr);
lib/rendercopy_gen8.c +1 -1
@@ -120,7 +120,7 @@ static void annotation_add_state(struct annotations_context *ctx,static void annotation_flush (struct annotations_context *ctx,struct intel_batchbuffer *batch) { -if (!drmtest_dump_aub ()) +if (!igt_aub_dump_enabled ())return ; drm_intel_bufmgr_gem_set_aub_annotations(batch->bo,
tests/gem_render_copy.c +1 -1
@@ -127,7 +127,7 @@ int main(int argc, char **argv)igt_render_copyfunc_t render_copy =NULL ;int opt;int opt_dump_png = false; -int opt_dump_aub =drmtest_dump_aub (); +int opt_dump_aub =igt_aub_dump_enabled ();igt_simple_init ();
Signature · 1 line
1.8.5.2
PATCH 23/28 lib: extract igt_aux.[hc]
In reply to Daniel VetterAnd shovel all the various helpers in there.
Also move igt_set_vt_graphics_mode to igt_kms.h since the function is implemented in igt_kms.c. And it fits better. I kinda missed this in the prep work.
--- lib/Makefile.sources | 2 + lib/drmtest.c | 188 ------------------------- lib/drmtest.h | 36 +---- lib/igt_aux.c | 249 +++++++++++++++++++++++++++++++++ lib/igt_aux.h | 67 +++++++++ lib/igt_core.c | 1 + lib/igt_kms.c | 1 + lib/igt_kms.h | 3 + lib/intel_os.c | 2 +- lib/rendercopy_gen8.c | 7 +- tests/drv_suspend.c | 5 +- tests/eviction_common.c | 1 + tests/gem_caching.c | 5 +- tests/gem_concurrent_blit.c | 5 +- tests/gem_cpu_reloc.c | 5 +- tests/gem_cs_prefetch.c | 5 +- tests/gem_cs_tlb.c | 5 +- tests/gem_ctx_exec.c | 6 +- tests/gem_evict_alignment.c | 5 +- tests/gem_fd_exhaustion.c | 2 + tests/gem_fenced_exec_thrash.c | 1 + tests/gem_linear_blits.c | 7 +- tests/gem_partial_pwrite_pread.c | 7 +- tests/gem_persistent_relocs.c | 7 +- tests/gem_pin.c | 5 +- tests/gem_pread_after_blit.c | 7 +- tests/gem_reloc_vs_gpu.c | 7 +- tests/gem_render_copy.c | 5 +- tests/gem_render_linear_blits.c | 5 +- tests/gem_render_tiled_blits.c | 5 +- tests/gem_reset_stats.c | 3 +- tests/gem_ringfill.c | 6 +- tests/gem_seqno_wrap.c | 1 + tests/gem_stress.c | 5 +- tests/gem_tiled_blits.c | 7 +- tests/gem_tiled_fence_blits.c | 5 +- tests/gem_tiled_partial_pwrite_pread.c | 7 +- tests/gem_tiled_pread_pwrite.c | 5 +- tests/gem_tiled_swapping.c | 5 +- tests/gem_wait_render_timeout.c | 5 +- tests/gem_write_read_ring_switch.c | 7 +- tests/igt_fork_helper.c | 1 + tests/kms_flip.c | 1 + 43 files changed, 443 insertions(+), 271 deletions(-) create mode 100644 lib/igt_aux.c create mode 100644 lib/igt_aux.h
lib/Makefile.sources +2 -0
@@ -10,6 +10,8 @@ libintel_tools_la_SOURCES = \ igt_debugfs.h \ igt_display.c \ igt_display.h \ + igt_aux.c \ + igt_aux.h \ instdone.c \ instdone.h \ intel_batchbuffer.c \
lib/drmtest.c +0 -188
191 lines not on this page · raw message
lib/drmtest.h +2 -34
@@ -34,7 +34,8 @@#include <sys/mman.h> #include <xf86drm.h> -#include <intel_batchbuffer.h> + +#include "intel_batchbuffer.h" #ifdef ANDROID #ifndef HAVE_MMAP64
@@ -55,40 +56,7 @@ int drm_open_any_render(void);void gem_quiescent_gpu (int fd); -/* generally useful helpers */ -void igt_fork_signal_helper (void ); -void igt_stop_signal_helper (void ); -void igt_exchange_int (void *array,unsigned i,unsigned j); -void igt_permute_array (void *array,unsigned size, -void (*exchange_func)(void *array, -unsigned i, -unsigned j)); -void igt_progress (const char *header,uint64_t i,uint64_t total); -bool igt_env_set (const char *env_var,bool default_value); - -bool igt_aub_dump_enabled (void ); - -/* helpers based upon the libdrm buffer manager */ -void igt_init_aperture_trashers (drm_intel_bufmgr *bufmgr); -void igt_trash_aperture (void ); -void igt_cleanup_aperture_trashers (void ); -#define do_or_die (x) igt_assert((x) == 0)#define do_ioctl (fd, ptr, sz) igt_assert(drmIoctl((fd), (ptr), (sz)) == 0) -/* set vt into graphics mode, required to prevent fbcon from interfering */ -void igt_set_vt_graphics_mode (void ); - -/* suspend and auto-resume system */ -void igt_system_suspend_autoresume (void ); - -/* dropping priviledges */ -void igt_drop_root (void ); - -void igt_wait_for_keypress (void ); - -/* sysinfo cross-arch wrappers from intel_os.c */ -uint64_t intel_get_total_ram_mb (void ); -uint64_t intel_get_total_swap_mb (void ); -#endif /* DRMTEST_H */
lib/igt_aux.c new file +249 -0
249 lines not on this page · raw message
lib/igt_aux.h new file +67 -0
67 lines not on this page · raw message
lib/igt_core.c +1 -0
@@ -58,6 +58,7 @@#include "config.h" #include "igt_core.h" +#include "igt_aux.h" /** * SECTION:igt_core
lib/igt_kms.c +1 -0
@@ -38,6 +38,7 @@#include "drmtest.h" #include "igt_kms.h" +#include "igt_aux.h" #include "ioctl_wrappers.h" /* helpers to create nice-looking framebuffers */
lib/igt_kms.h +3 -0
@@ -164,6 +164,9 @@ struct igt_display {igt_pipe_t pipes[I915_MAX_PIPES ]; }; +/* set vt into graphics mode, required to prevent fbcon from interfering */ +void igt_set_vt_graphics_mode (void ); +void igt_display_init (igt_display_t *display,int drm_fd);void igt_display_fini (igt_display_t *display);int igt_display_commit (igt_display_t *display);
lib/intel_os.c +1 -1
@@ -48,8 +48,8 @@#endif #include "intel_io.h" -#include "i915_drm.h" #include "drmtest.h" +#include "igt_aux.h" uint64_t intel_get_total_ram_mb (void )
lib/rendercopy_gen8.c +5 -2
@@ -10,8 +10,10 @@#include <sys/stat.h> #include <sys/time.h> #include <getopt.h> -#include "drm.h" -#include "i915_drm.h" + +#include <drm.h> +#include <i915_drm.h> +#include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h"
@@ -19,6 +21,7 @@#include "rendercopy.h" #include "gen8_render.h" #include "intel_reg.h" +#include "igt_aux.h" #include <intel_aub.h>
tests/drv_suspend.c +4 -1
@@ -34,10 +34,13 @@#include <errno.h> #include <sys/stat.h> #include <sys/ioctl.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "igt_debugfs.h" +#include "igt_aux.h" #define OBJECT_SIZE (16*1024*1024)
tests/eviction_common.c +1 -0
@@ -30,6 +30,7 @@#include <stdlib.h> #include "drmtest.h" +#include "igt_aux.h" struct igt_eviction_test_ops {
tests/gem_caching.c +4 -1
@@ -34,13 +34,16 @@#include <errno.h> #include <sys/stat.h> #include <sys/time.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_io.h" #include "intel_chipset.h" +#include "igt_aux.h" /* * Testcase: snoop consistency when touching partial cachelines
tests/gem_concurrent_blit.c +4 -1
@@ -44,13 +44,16 @@#include <sys/stat.h> #include <sys/time.h> #include <sys/wait.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_io.h" #include "intel_chipset.h" +#include "igt_aux.h" static void prw_set_bo (drm_intel_bo *bo,uint32_t val,int width,int height)
tests/gem_cpu_reloc.c +4 -1
@@ -53,13 +53,16 @@#include <errno.h> #include <sys/stat.h> #include <sys/time.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_io.h" #include "intel_chipset.h" +#include "igt_aux.h" static uint32_t use_blt;
tests/gem_cs_prefetch.c +4 -1
@@ -43,13 +43,16 @@#include <errno.h> #include <sys/stat.h> #include <sys/time.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_io.h" #include "intel_chipset.h" +#include "igt_aux.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_cs_tlb.c +4 -1
@@ -46,10 +46,13 @@#include <sys/stat.h> #include <sys/ioctl.h> #include <sys/time.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_io.h" +#include "igt_aux.h" #define LOCAL_I915_EXEC_VEBOX (4<<0)#define BATCH_SIZE (1024*1024)
tests/gem_ctx_exec.c +5 -1
@@ -40,9 +40,12 @@#include <sys/stat.h> #include <sys/ioctl.h> #include <sys/time.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" +#include "igt_aux.h" struct local_drm_i915_gem_context_destroy {__u32 ctx_id;
@@ -56,6 +59,7 @@ static void context_destroy(int fd, uint32_t ctx_id)struct local_drm_i915_gem_context_destroy destroy; destroy.ctx_id = ctx_id;do_ioctl (fd,CONTEXT_DESTROY_IOCTL , &destroy); +#include "igt_aux.h" }/* Copied from gem_exec_nop.c */
tests/gem_evict_alignment.c +4 -1
@@ -41,10 +41,13 @@#include <sys/stat.h> #include <sys/ioctl.h> #include <sys/time.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_chipset.h" +#include "igt_aux.h" #define HEIGHT 256#define WIDTH 1024
tests/gem_fd_exhaustion.c +2 -0
@@ -31,8 +31,10 @@#include <sys/time.h> #include <fcntl.h> #include <limits.h> +#include "drmtest.h" #include "ioctl_wrappers.h" +#include "igt_aux.h" #define FD_ARR_SZ 100
tests/gem_fenced_exec_thrash.c +1 -0
@@ -41,6 +41,7 @@#include "drmtest.h" #include "intel_chipset.h" #include "intel_io.h" +#include "igt_aux.h" #define WIDTH 1024#define HEIGHT 1024
tests/gem_linear_blits.c +4 -3
@@ -41,13 +41,14 @@#include <errno.h> #include <sys/stat.h> #include <sys/time.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "intel_chipset.h" #include "drmtest.h" -#include "intel_bufmgr.h" -#include "intel_batchbuffer.h" #include "intel_io.h" +#include "igt_aux.h" #define WIDTH 512#define HEIGHT 512
tests/gem_partial_pwrite_pread.c +4 -3
@@ -33,13 +33,14 @@#include <errno.h> #include <sys/stat.h> #include <sys/time.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_chipset.h" -#include "intel_bufmgr.h" -#include "intel_batchbuffer.h" #include "intel_io.h" +#include "igt_aux.h" /* * Testcase: pwrite/pread consistency when touching partial cachelines
tests/gem_persistent_relocs.c +4 -3
@@ -36,14 +36,15 @@#include <sys/time.h> #include <signal.h> #include <sys/wait.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_bufmgr.h" #include "intel_chipset.h" -#include "intel_batchbuffer.h" #include "intel_io.h" #include "igt_debugfs.h" +#include "igt_aux.h" /* * Testcase: Persistent relocations as used by uxa/libva
tests/gem_pin.c +4 -1
@@ -35,11 +35,14 @@#include <errno.h> #include <sys/stat.h> #include <sys/time.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_chipset.h" #include "intel_io.h" +#include "igt_aux.h" #define COPY_BLT_CMD (2<<29|0x53<<22|0x6)#define BLT_WRITE_ALPHA (1<<21)
tests/gem_pread_after_blit.c +4 -3
@@ -42,13 +42,14 @@#include <errno.h> #include <sys/stat.h> #include <sys/time.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_chipset.h" -#include "intel_bufmgr.h" -#include "intel_batchbuffer.h" #include "intel_io.h" +#include "igt_aux.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_reloc_vs_gpu.c +4 -3
@@ -36,14 +36,15 @@#include <sys/time.h> #include <signal.h> #include <sys/wait.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_bufmgr.h" -#include "intel_batchbuffer.h" #include "intel_chipset.h" #include "intel_io.h" #include "igt_debugfs.h" +#include "igt_aux.h" /* * Testcase: Kernel relocations vs. gpu races
tests/gem_render_copy.c +4 -1
@@ -42,13 +42,16 @@#include <sys/stat.h> #include <sys/time.h> #include <getopt.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_io.h" #include "intel_chipset.h" +#include "igt_aux.h" #define WIDTH 512#define STRIDE (WIDTH*4)
tests/gem_render_linear_blits.c +4 -1
@@ -47,13 +47,16 @@#include <sys/stat.h> #include <sys/time.h> #include <getopt.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_io.h" #include "intel_chipset.h" +#include "igt_aux.h" #define WIDTH 512#define STRIDE (WIDTH*4)
tests/gem_render_tiled_blits.c +4 -1
@@ -43,13 +43,16 @@#include <sys/stat.h> #include <sys/time.h> #include <getopt.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_io.h" #include "intel_chipset.h" +#include "igt_aux.h" #define WIDTH 512#define STRIDE (WIDTH*4)
tests/gem_reset_stats.c +1 -2
@@ -43,10 +43,9 @@#include "ioctl_wrappers.h" #include "drmtest.h" #include "igt_debugfs.h" -#include "intel_bufmgr.h" #include "intel_chipset.h" -#include "intel_batchbuffer.h" #include "intel_io.h" +#include "igt_aux.h" #define RS_NO_ERROR 0#define RS_BATCH_ACTIVE (1 << 0)
tests/gem_ringfill.c +3 -3
@@ -41,13 +41,13 @@#include <sys/stat.h> #include <sys/time.h> -#include "drm.h" +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_bufmgr.h" #include "intel_chipset.h" -#include "intel_batchbuffer.h" #include "intel_io.h" +#include "igt_aux.h" struct bo {const char *ring;
tests/gem_seqno_wrap.c +1 -0
@@ -46,6 +46,7 @@#include "ioctl_wrappers.h" #include "drmtest.h" #include "igt_core.h" +#include "igt_aux.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_io.h"
tests/gem_stress.c +4 -1
@@ -59,13 +59,16 @@#include <sys/stat.h> #include <sys/time.h> #include <getopt.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_io.h" #include "intel_chipset.h" +#include "igt_aux.h" #define CMD_POLY_STIPPLE_OFFSET 0x7906
tests/gem_tiled_blits.c +4 -3
@@ -49,13 +49,14 @@#include <errno.h> #include <sys/stat.h> #include <sys/time.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_bufmgr.h" -#include "intel_batchbuffer.h" #include "intel_chipset.h" #include "intel_io.h" +#include "igt_aux.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_tiled_fence_blits.c +4 -1
@@ -49,13 +49,16 @@#include <errno.h> #include <sys/stat.h> #include <sys/time.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_io.h" #include "intel_chipset.h" +#include "igt_aux.h" static drm_intel_bufmgr *bufmgr;struct intel_batchbuffer *batch;
tests/gem_tiled_partial_pwrite_pread.c +4 -3
@@ -33,13 +33,14 @@#include <errno.h> #include <sys/stat.h> #include <sys/time.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_bufmgr.h" #include "intel_chipset.h" -#include "intel_batchbuffer.h" #include "intel_io.h" +#include "igt_aux.h" /* * Testcase: pwrite/pread consistency when touching partial cachelines
tests/gem_tiled_pread_pwrite.c +4 -1
@@ -53,10 +53,13 @@#include <sys/stat.h> #include <sys/time.h> #include <sys/ioctl.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_io.h" +#include "igt_aux.h" #define WIDTH 512#define HEIGHT 512
tests/gem_tiled_swapping.c +4 -1
@@ -53,10 +53,13 @@#include <sys/stat.h> #include <sys/time.h> #include <sys/ioctl.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_io.h" +#include "igt_aux.h" #define WIDTH 512#define HEIGHT 512
tests/gem_wait_render_timeout.c +4 -1
@@ -37,13 +37,16 @@#include <sys/stat.h> #include <sys/time.h> #include <getopt.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" #include "intel_bufmgr.h" #include "intel_batchbuffer.h" #include "intel_io.h" #include "intel_chipset.h" +#include "igt_aux.h" #define MSEC_PER_SEC 1000L#define USEC_PER_MSEC 1000L
tests/gem_write_read_ring_switch.c +4 -3
@@ -33,14 +33,15 @@#include <errno.h> #include <sys/stat.h> #include <sys/time.h> -#include "drm.h" + +#include <drm.h> +#include "ioctl_wrappers.h" #include "drmtest.h" -#include "intel_bufmgr.h" -#include "intel_batchbuffer.h" #include "intel_chipset.h" #include "intel_io.h" #include "i830_reg.h" +#include "igt_aux.h" #define LOCAL_I915_EXEC_VEBOX (4<<0)
tests/igt_fork_helper.c +1 -0
@@ -26,6 +26,7 @@*/ #include "drmtest.h" +#include "igt_aux.h" int main (int argc,char **argv) {
tests/kms_flip.c +1 -0
@@ -43,6 +43,7 @@#include "intel_chipset.h" #include "intel_batchbuffer.h" #include "igt_kms.h" +#include "igt_aux.h" #define TEST_DPMS (1 << 0)#define TEST_WITH_DUMMY_BCS (1 << 1)
Signature · 6 lines
1.8.5.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 24/28 lib/igt_aux: api documentation
In reply to Daniel VetterI'm not really happy with the name of the igt_env_set function, I'll follow up with a patch to change it.
--- .../intel-gpu-tools/intel-gpu-tools-docs.xml | 1 + lib/igt_aux.c | 129 ++++++++++++++++++++- lib/intel_os.c | 12 ++ 3 files changed, 139 insertions(+), 3 deletions(-)
docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml +1 -0
@@ -20,6 +20,7 @@ <xi:include href="xml/igt_debugfs.xml"/> <xi:include href="xml/igt_display.xml"/> <xi:include href="xml/igt_kms.xml"/> + <xi:include href="xml/igt_aux.xml"/> <xi:include href="xml/ioctl_wrappers.xml"/> <xi:include href="xml/intel_batchbuffer.xml"/> <xi:include href="xml/intel_chipset.xml"/>
lib/igt_aux.c +126 -3
214 lines not on this page · raw message
lib/intel_os.c +12 -0
@@ -51,6 +51,12 @@#include "drmtest.h" #include "igt_aux.h" +/** +* intel_get_total_ram_mb: +* +* Returns: +* The total amount of system RAM available in MB. +*/ uint64_t intel_get_total_ram_mb (void ) {
@@ -79,6 +85,12 @@ intel_get_total_ram_mb(void)return retval / (1024 *1024 ); } +/** +* intel_get_total_swap_mb: +* +* Returns: +* The total amount of swap space available in MB. +*/ uint64_t intel_get_total_swap_mb (void ) {
Signature · 1 line
1.8.5.2
PATCH 25/28 lib: s/igt_env_set/igt_check_boolean_env_var
In reply to Daniel VetterSo I wasn't really happy with env_set since it's way too close to setenv(), whic actually _sets_ and environment variable. So use check instead of set as the verb (well adjective for env_set).
Also sprinkle in some hints that we talk about a boolean setting here.
--- lib/igt_aux.c | 6 +++--- lib/igt_aux.h | 2 +- lib/igt_core.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
lib/igt_aux.c +3 -3
@@ -134,7 +134,7 @@ void igt_stop_signal_helper(void) }/** -* igt_env_set: +* igt_check_boolean_env_var: * @env_var: environment variable name * @default_value: default value for the environment variable *
@@ -144,7 +144,7 @@ void igt_stop_signal_helper(void)* The boolean value of the environment variable @env_var as decoded by atoi() * if it is set and @default_value if the variable is not set. */ -bool igt_env_set (const char *env_var,bool default_value) +bool igt_check_boolean_env_var (const char *env_var,bool default_value) {char *val;
@@ -167,7 +167,7 @@ bool igt_aub_dump_enabled(void)static int dump_aub =-1 ;if (dump_aub ==-1 ) - dump_aub =igt_env_set ("IGT_DUMP_AUB" , false); + dump_aub =igt_check_boolean_env_var ("IGT_DUMP_AUB" , false);return dump_aub; }
lib/igt_aux.h +1 -1
@@ -40,7 +40,7 @@ void igt_permute_array(void *array, unsigned size,unsigned i, unsigned j));void igt_progress (const char *header,uint64_t i,uint64_t total); -bool igt_env_set (const char *env_var,bool default_value); +bool igt_check_boolean_env_var (const char *env_var,bool default_value);bool igt_aub_dump_enabled (void );
lib/igt_core.c +1 -1
@@ -1111,7 +1111,7 @@ bool igt_run_in_simulation(void)static int simulation =-1 ;if (simulation ==-1 ) - simulation =igt_env_set ("INTEL_SIMULATION" , false); + simulation =igt_check_boolean_env_var ("INTEL_SIMULATION" , false);return simulation; }
Signature · 1 line
1.8.5.2
PATCH 26/28 lib: Use @include tag for include files
In reply to Daniel VetterOccasionally useful to read documentation ...
--- lib/igt_aux.c | 1 + lib/igt_core.c | 3 +-- lib/igt_debugfs.c | 3 +-- lib/intel_batchbuffer.c | 3 +-- lib/intel_chipset.c | 3 +-- lib/intel_mmio.c | 3 +-- lib/ioctl_wrappers.c | 3 +-- 7 files changed, 7 insertions(+), 12 deletions(-)
lib/igt_aux.c +1 -0
@@ -63,6 +63,7 @@* SECTION:igt_aux * @short_description: Auxiliary libararies and support functions * @title: i-g-t aux +* @include: igt_aux.h * * > #include "igt_aux.h" *
lib/igt_core.c +1 -2
@@ -64,8 +64,7 @@* SECTION:igt_core * @short_description: Core i-g-t testing support * @title: i-g-t core -* -* > #include "igt_core.h" +* @include: igt_core.h * * This libary implements the core of the i-g-t test support infrastructure. * Main features are the subtest enumeration, cmdline option parsing helpers for
lib/igt_debugfs.c +1 -2
@@ -40,8 +40,7 @@* SECTION:igt_debugfs * @short_description: Support code for debugfs features * @title: i-g-t debugfs -* -* > #include "igt_debugfs.h" +* @include: igt_debugfs.h * * This library provides helpers to access debugfs features. On top of some * basic functions to access debugfs files with e.g. igt_debugfs_open() it also
lib/intel_batchbuffer.c +1 -2
@@ -45,8 +45,7 @@* SECTION:intel_batchbuffer * @short_description: Batchbuffer and blitter support * @title: intel batchbuffer -* -* > #include "intel_batchbuffer.h" +* @include: intel_batchbuffer.h * * This library provides some basic support for batchbuffers and using the * blitter engine based upon libdrm. A new batchbuffer is allocated with
lib/intel_chipset.c +1 -2
@@ -44,8 +44,7 @@* SECTION:intel_chipset * @short_description: Feature macros and chipset helpers * @title: intel chipset -* -* > #include "intel_chipset.h" +* @include: intel_chipset.h * * This library mostly provides feature macros which use raw pci device ids. It * also provides a few more helper functions to handle pci devices, chipset
lib/intel_mmio.c +1 -2
@@ -49,8 +49,7 @@* SECTION:intel_io * @short_description: Register access and sideband I/O libraray * @title: intel io -* -* > #include "intel_io.h" +* @include: intel_io.h * * This library provides register I/O helpers in both a basic version and a more * fancy version which also handles forcewak and can optionally check registers
lib/ioctl_wrappers.c +1 -2
@@ -63,8 +63,7 @@* SECTION:ioctl_wrappers * @short_description: ioctl wrappers and related functions * @title: ioctl wrappers -* -* > #include "ioctl_wrappers.h" +* @include: ioctl_wrappers.h * * This helper library contains simple functions to wrap the raw drm/i915 kernel * ioctls. The normal versions never pass any error codes to the caller and use
Signature · 1 line
1.8.5.2
PATCH 27/28 lib/drmtest: api documentation
In reply to Daniel VetterAlso rename the arguments of do_ioctl a bit for better clarity.
I haven't figured out a way to reference other section headers, hence the links to igt_core and intel_batchbuffer are a bit fragile unfortunately. It gets the job done though.
--- lib/drmtest.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++----- lib/drmtest.h | 26 +++++++++++++++++++++++++- 2 files changed, 71 insertions(+), 6 deletions(-)
lib/drmtest.c +46 -5
@@ -58,8 +58,20 @@#include "intel_reg.h" #include "ioctl_wrappers.h" -/* This file contains a bunch of wrapper functions to directly use gem ioctls. -* Mostly useful to write kernel tests. */ +/** +* SECTION:drmtest +* @short_description: Base library for drm tests and tools +* @title: drmtest +* @include: drmtest.h +* +* This library contains the basic support for writing tests, with the most +* important part being the helper function to open drm device nodes. +* +* But there's also a bit of other assorted stuff here. +* +* Note that this library's header pulls in the [i-g-t core](intel-gpu-tools-i-g-t-core.html) +* and [batchbuffer](intel-gpu-tools-intel-batchbuffer.html) libraries as depencies. +*/ static int is_intel (int fd)
@@ -77,7 +89,18 @@ is_intel(int fd) }#define LOCAL_I915_EXEC_VEBOX (4 << 0) -/* Ensure the gpu is idle by launching a nop execbuf and stalling for it. */ +/** +* gem_quiescent_gpu: +* @fd: open i915 drm file descriptor +* +* Ensure the gpu is idle by launching a nop execbuf and stalling for it. This +* is automatically run when opening a drm device node and is also installed as +* an exit handler to have the best assurance that the test is run in a pristine +* and controlled environment. +* +* This function simply allows tests to make additional calls in-between, if so +* desired. +*/ void gem_quiescent_gpu (int fd) {uint32_t batch[2 ] = {MI_BATCH_BUFFER_END ,0 };
@@ -134,9 +157,11 @@ void gem_quiescent_gpu(int fd)/** * drm_get_card: * -* Get an intel card number for use in /dev or /sys +* Get an i915 drm card index number for use in /dev or /sys. The minor index of +* the legacy node is returned, not of the control or render node. * -* Returns: -1 on error +* Returns: +* The i915 drm index or -1 on error */ int drm_get_card (void ) {
@@ -242,6 +267,14 @@ static void quiescent_gpu_at_exit_render(int sig) at_exit_drm_render_fd =-1 ; } +/** +* drm_open_any: +* +* Open an i915 drm legacy device node. +* +* Returns: +* The i915 drm file descriptor or -1 on error +*/ int drm_open_any (void ) {static int open_count;
@@ -259,6 +292,14 @@ int drm_open_any(void)return fd; } +/** +* drm_open_any: +* +* Open an i915 drm render device node. +* +* Returns: +* The i915 drm file descriptor or -1 on error +*/ int drm_open_any_render (void ) {static int open_count;
lib/drmtest.h +25 -1
@@ -48,6 +48,12 @@ static inline void *mmap64(void *addr, size_t length, int prot, int flags,#endif #endif +/** +* ARRAY_SIZE: +* @arr: static array +* +* Macro to compute the size of the static array @arr. +*/ #define ARRAY_SIZE (arr) (sizeof(arr)/sizeof(arr[0]))int drm_get_card (void );
@@ -56,7 +62,25 @@ int drm_open_any_render(void);void gem_quiescent_gpu (int fd); +/** +* do_or_die: +* @x: command +* +* Simple macro to execute x and check that it's return value is 0. Presumes +* that in any failure case the return value is non-zero and a precise error is +* logged into errno. Uses igt_assert() internally. +*/ #define do_or_die (x) igt_assert((x) == 0) -#define do_ioctl (fd, ptr, sz) igt_assert(drmIoctl((fd), (ptr), (sz)) == 0) + +/** +* do_ioctl: +* @fd: open i915 drm file descriptor +* @ioc: ioctl op definition from drm headers +* @ioc_data: data pointer for the ioctl operation +* +* This macro wraps drmIoctl() and uses igt_assert to check that it has been +* successfully executed. +*/ +#define do_ioctl (fd, ioc, ioc_data) igt_assert(drmIoctl((fd), (ioc), (ioc_data)) == 0)#endif /* DRMTEST_H */
Signature · 1 line
1.8.5.2
PATCH 28/28 lib/intel_batchbuffer: document header dependencies
In reply to Daniel VetterAt least with the core library headers the situation is now fairly sane. There's still fun stuff going on around *_reg.h and most of the source files just have a cargo-culted list of headers ...
--- lib/intel_batchbuffer.c | 3 +++ 1 file changed, 3 insertions(+)
lib/intel_batchbuffer.c +3 -0
@@ -56,6 +56,9 @@* batchbuffers. All those macros presume that a pointer to a #intel_batchbuffer * structure called batch is in scope. The basic macros are #BEGIN_BATCH, * #OUT_BATCH, #OUT_RELOC and #ADVANCE_BATCH. +* +* Note that this library's header pulls in the [i-g-t core](intel-gpu-tools-i-g-t-core.html) +* library as a depency. */ /**
Signature · 1 line
1.8.5.2
Quoted 42 lines · Daniel Vetter
Hi all,
So this thing turned out to be fairly ugly overall, and I don't think it's worth the effort to polish the series through some giant rebasing. make distcheck still works so I don't think I've fumbled this too badly and will hence just push the patches as-is.
I'm still very much interested in feedback, I'll simply apply that as follow-up patches.
For those who want a peak at what the i-g-t docs look like now:
http://people.freedesktop.org/~danvet/igt/
Everything but the modeset helpers is now neatly documented, with some intro texts where useful. I think for the igt_display/kms libraries we first need to give the apis a bit more polish before documentation makes sense. There's still an awful lot of boilerplate going on in kms tests ...
Cheers, Daniel
Daniel Vetter (28):
lib: renameintel_pci.ctointel_chipset.c
lib: consolidate chipset helpers in intel_chipset.[hc]lib/intel_chipset:intel_prefix for pch globallib/intel_chipset: api docs
lib: makerendercopy.han internal header
lib: makemedia_fill.han internal headerlib/intel_batchbuffer: un-inline buf_height/widthlib/intel_batchbuffer:igt_namespace for the buffer structurelib/intel_batchbuffer:igt_prefix for rendercopy/mediafill funcslib/intel_batchbuffer: dropcpu_mappingfromigt_buflib/intel_batchbuffer: api documentation for render copy/media fill
lib: Move non-register things out ofintel-gpu-tools.htests|lib: removeassert.hincludes
lib: add #include "foo.h" lines like in manpages
lib: remove uncessary #includes from headers
lib: more unecessary header removal
lib: unnecessary header removal fordrmtest.h, part 1
lib: unnecessary header removal fordrmtest.h, part 2
lib: renameintel_gpu_tools.htointel_io.hlib/intel_io: rename mmio setup functions
Quoted 8 lines
lib/intel_io: api documentation
lib: s/drmtest_dumb_aub/igt_aub_dump_enabled/
lib: extract igt_aux.[hc]
lib/igt_aux: api documentation
lib: s/igt_env_set/igt_check_boolean_env_var
lib: Use @include tag for include files lib/drmtest: api documentationlib/intel_batchbuffer: document header dependencies
Note that the quick_dump automake rules seem to be a bit fragile and fall over a few of the renames in here. Running git clean -dfx and rebuilding everything fixes that.
Unfortunately my autofoo isn't up to snuff to fix this. -Daniel
Quoted 219 lines
benchmarks/intel_upload_blit_large.c | 9 +- benchmarks/intel_upload_blit_large_gtt.c | 3 +- benchmarks/intel_upload_blit_large_map.c | 3 +- benchmarks/intel_upload_blit_small.c | 3 +- debugger/debug_rdata.c | 3 +- debugger/eudb.c | 2 +- demos/intel_sprite_on.c | 7 +- .../intel-gpu-tools/intel-gpu-tools-docs.xml | 5 +- lib/Makefile.sources | 9 +- lib/drmtest.c | 243 +++----------- lib/drmtest.h | 80 +++-- lib/gen6_render.h | 8 - lib/gen7_media.h | 2 + lib/gen8_media.h | 2 + lib/igt_aux.c | 373 +++++++++++++++++++++ lib/igt_aux.h | 67 ++++ lib/igt_core.c | 9 +- lib/igt_core.h | 7 + lib/igt_debugfs.c | 3 + lib/igt_debugfs.h | 3 +- lib/igt_kms.c | 14 +- lib/igt_kms.h | 10 +- lib/intel_batchbuffer.c | 93 ++++- lib/intel_batchbuffer.h | 96 +++++- lib/intel_chipset.c | 215 ++++++++++++ lib/intel_chipset.h | 26 ++ lib/intel_drm.c | 200 ----------- lib/intel_gpu_tools.h | 126 ------- lib/intel_io.h | 81 +++++ lib/intel_iosf.c | 61 +++- lib/intel_mmio.c | 133 +++++++- lib/intel_os.c | 171 ++++++++++ lib/intel_pci.c | 123 ------- lib/intel_reg_map.c | 3 +- lib/ioctl_wrappers.c | 6 +- lib/ioctl_wrappers.h | 5 + lib/media_fill.c | 14 - lib/media_fill.h | 49 +-- lib/media_fill_gen7.c | 16 +- lib/media_fill_gen8.c | 16 +- lib/rendercopy.h | 71 +--- lib/rendercopy_gen6.c | 51 ++- lib/rendercopy_gen7.c | 44 ++- lib/rendercopy_gen8.c | 58 ++-- lib/rendercopy_i830.c | 64 ++-- lib/rendercopy_i915.c | 30 +- tests/core_get_client_auth.c | 2 +- tests/core_getclient.c | 3 + tests/core_getstats.c | 5 + tests/ddi_compute_wrpll.c | 3 +- tests/drm_vma_limiter.c | 5 +- tests/drm_vma_limiter_cached.c | 5 +- tests/drm_vma_limiter_cpu.c | 5 +- tests/drm_vma_limiter_gtt.c | 5 +- tests/drv_suspend.c | 11 +- tests/eviction_common.c | 1 + tests/gem_bad_address.c | 5 +- tests/gem_bad_batch.c | 5 +- tests/gem_bad_blit.c | 5 +- tests/gem_bad_length.c | 2 +- tests/gem_basic.c | 2 +- tests/gem_caching.c | 10 +- tests/gem_close_race.c | 3 +- tests/gem_concurrent_blit.c | 10 +- tests/gem_cpu_reloc.c | 10 +- tests/gem_cs_prefetch.c | 10 +- tests/gem_cs_tlb.c | 9 +- tests/gem_ctx_bad_destroy.c | 4 +- tests/gem_ctx_bad_exec.c | 2 +- tests/gem_ctx_basic.c | 24 +- tests/gem_ctx_create.c | 4 +- tests/gem_ctx_exec.c | 8 +- tests/gem_double_irq_loop.c | 5 +- tests/gem_dummy_reloc_loop.c | 5 +- tests/gem_evict_alignment.c | 8 +- tests/gem_evict_everything.c | 3 +- tests/gem_exec_bad_domains.c | 5 +- tests/gem_exec_big.c | 2 +- tests/gem_exec_blt.c | 4 +- tests/gem_exec_faulting_reloc.c | 4 +- tests/gem_exec_lut_handle.c | 2 +- tests/gem_exec_nop.c | 4 +- tests/gem_fd_exhaustion.c | 3 + tests/gem_fence_thrash.c | 34 +- tests/gem_fenced_exec_thrash.c | 8 +- tests/gem_flink.c | 2 +- tests/gem_flink_race.c | 3 +- tests/gem_gtt_cpu_tlb.c | 4 +- tests/gem_gtt_hog.c | 3 +- tests/gem_gtt_speed.c | 2 +- tests/gem_hang.c | 5 +- tests/gem_hangcheck_forcewake.c | 5 +- tests/gem_largeobject.c | 2 +- tests/gem_linear_blits.c | 12 +- tests/gem_lut_handle.c | 2 +- tests/gem_madvise.c | 2 +- tests/gem_media_fill.c | 29 +- tests/gem_mmap.c | 2 +- tests/gem_mmap_gtt.c | 2 +- tests/gem_mmap_offset_exhaustion.c | 2 +- tests/gem_non_secure_batch.c | 5 +- tests/gem_partial_pwrite_pread.c | 12 +- tests/gem_persistent_relocs.c | 12 +- tests/gem_pin.c | 9 +- tests/gem_pipe_control_store_loop.c | 5 +- tests/gem_pread.c | 2 +- tests/gem_pread_after_blit.c | 12 +- tests/gem_pwrite.c | 2 +- tests/gem_pwrite_pread.c | 5 +- tests/gem_readwrite.c | 2 +- tests/gem_reg_read.c | 4 +- tests/gem_reloc_overflow.c | 5 +- tests/gem_reloc_vs_gpu.c | 12 +- tests/gem_render_copy.c | 40 ++- tests/gem_render_linear_blits.c | 31 +- tests/gem_render_tiled_blits.c | 27 +- tests/gem_reset_stats.c | 11 +- tests/gem_ring_sync_copy.c | 21 +- tests/gem_ring_sync_loop.c | 5 +- tests/gem_ringfill.c | 26 +- tests/gem_seqno_wrap.c | 22 +- tests/gem_set_tiling_vs_blt.c | 5 +- tests/gem_set_tiling_vs_gtt.c | 5 +- tests/gem_set_tiling_vs_pwrite.c | 4 +- tests/gem_storedw_batches_loop.c | 7 +- tests/gem_storedw_loop_blt.c | 5 +- tests/gem_storedw_loop_bsd.c | 5 +- tests/gem_storedw_loop_render.c | 5 +- tests/gem_storedw_loop_vebox.c | 5 +- tests/gem_stress.c | 87 +++-- tests/gem_threaded_access_tiled.c | 2 +- tests/gem_tiled_blits.c | 12 +- tests/gem_tiled_fence_blits.c | 10 +- tests/gem_tiled_partial_pwrite_pread.c | 12 +- tests/gem_tiled_pread.c | 5 +- tests/gem_tiled_pread_pwrite.c | 9 +- tests/gem_tiled_swapping.c | 9 +- tests/gem_tiling_max_stride.c | 5 +- tests/gem_unfence_active_buffers.c | 5 +- tests/gem_unref_active_buffers.c | 5 +- tests/gem_vmap_blits.c | 5 +- tests/gem_wait_render_timeout.c | 22 +- tests/gem_write_read_ring_switch.c | 12 +- tests/gen3_mixed_blits.c | 5 +- tests/gen3_render_linear_blits.c | 5 +- tests/gen3_render_mixed_blits.c | 5 +- tests/gen3_render_tiledx_blits.c | 5 +- tests/gen3_render_tiledy_blits.c | 5 +- tests/gen7_forcewake_mt.c | 5 +- tests/igt_fork_helper.c | 1 + tests/igt_simulation.c | 2 + tests/kms_addfb.c | 2 +- tests/kms_cursor_crc.c | 1 + tests/kms_fbc_crc.c | 12 +- tests/kms_flip.c | 17 +- tests/kms_pipe_crc_basic.c | 1 + tests/kms_plane.c | 1 + tests/kms_render.c | 7 +- tests/kms_setmode.c | 27 +- tests/pm_lpsp.c | 2 + tests/pm_pc8.c | 5 +- tests/pm_psr.c | 2 + tests/pm_rc6_residency.c | 2 + tests/pm_rps.c | 8 +- tests/prime_nv_api.c | 3 +- tests/prime_nv_pcopy.c | 5 +- tests/prime_nv_test.c | 5 +- tests/prime_self_import.c | 2 +- tests/prime_udl.c | 8 +- tests/testdisplay.c | 6 +- tools/intel_audio_dump.c | 9 +- tools/intel_backlight.c | 6 +- tools/intel_bios_reader.c | 4 +- tools/intel_dpio_read.c | 3 +- tools/intel_dpio_write.c | 3 +- tools/intel_error_decode.c | 3 +- tools/intel_forcewaked.c | 3 +- tools/intel_framebuffer_dump.c | 2 +- tools/intel_gpu_time.c | 6 +- tools/intel_gpu_top.c | 6 +- tools/intel_gtt.c | 3 +- tools/intel_infoframes.c | 8 +- tools/intel_l3_parity.c | 3 +- tools/intel_lid.c | 5 +- tools/intel_nc_read.c | 3 +- tools/intel_nc_write.c | 3 +- tools/intel_opregion_decode.c | 3 +- tools/intel_panel_fitter.c | 4 +- tools/intel_perf_counters.c | 3 +- tools/intel_punit_read.c | 3 +- tools/intel_punit_write.c | 3 +- tools/intel_reg_checker.c | 5 +- tools/intel_reg_dumper.c | 17 +- tools/intel_reg_read.c | 3 +- tools/intel_reg_snapshot.c | 5 +- tools/intel_reg_write.c | 3 +- tools/intel_stepping.c | 3 +- tools/intel_vga_read.c | 3 +- tools/intel_vga_write.c | 3 +- tools/quick_dump/Makefile.am | 6 +- tools/quick_dump/chipset_macro_wrap.c | 33 ++ tools/quick_dump/intel_chipset.c | 33 -- 202 files changed, 2401 insertions(+), 1398 deletions(-) create mode 100644 lib/igt_aux.c create mode 100644 lib/igt_aux.h create mode 100644 lib/intel_chipset.c delete mode 100644 lib/intel_drm.c delete mode 100644 lib/intel_gpu_tools.h create mode 100644 lib/intel_io.h create mode 100644 lib/intel_os.c delete mode 100644 lib/intel_pci.c delete mode 100644 lib/media_fill.c create mode 100644 tools/quick_dump/chipset_macro_wrap.c delete mode 100644 tools/quick_dump/intel_chipset.cSignature · 1 line
1.8.5.2
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 10 lines · Daniel Vetter
Quoted 9 lines · Daniel Vetter
Hi all,
So this thing turned out to be fairly ugly overall, and I don't think it's worth the effort to polish the series through some giant rebasing. make distcheck still works so I don't think I've fumbled this too badly and will hence just push the patches as-is.
I'm still very much interested in feedback, I'll simply apply that as follow-up patches.
Documenting the tools is far more important IMO (or does this exist already somewhere).
Quoted 277 lines
Quoted 33 lines
For those who want a peak at what the i-g-t docs look like now:
http://people.freedesktop.org/~danvet/igt/
Everything but the modeset helpers is now neatly documented, with some intro texts where useful. I think for the igt_display/kms libraries we first need to give the apis a bit more polish before documentation makes sense. There's still an awful lot of boilerplate going on in kms tests ...
Cheers, Daniel
Daniel Vetter (28):
lib: renameintel_pci.ctointel_chipset.c
lib: consolidate chipset helpers in intel_chipset.[hc]lib/intel_chipset:intel_prefix for pch globallib/intel_chipset: api docs
lib: makerendercopy.han internal header
lib: makemedia_fill.han internal headerlib/intel_batchbuffer: un-inline buf_height/widthlib/intel_batchbuffer:igt_namespace for the buffer structurelib/intel_batchbuffer:igt_prefix for rendercopy/mediafill funcslib/intel_batchbuffer: dropcpu_mappingfromigt_buflib/intel_batchbuffer: api documentation for render copy/media fill
lib: Move non-register things out ofintel-gpu-tools.htests|lib: removeassert.hincludes
lib: add #include "foo.h" lines like in manpages
lib: remove uncessary #includes from headers
lib: more unecessary header removal
lib: unnecessary header removal fordrmtest.h, part 1
lib: unnecessary header removal fordrmtest.h, part 2
lib: renameintel_gpu_tools.htointel_io.hlib/intel_io: rename mmio setup functionsQuoted 8 lines
lib/intel_io: api documentation
lib: s/drmtest_dumb_aub/igt_aub_dump_enabled/
lib: extract igt_aux.[hc]
lib/igt_aux: api documentation
lib: s/igt_env_set/igt_check_boolean_env_var
lib: Use @include tag for include files lib/drmtest: api documentationlib/intel_batchbuffer: document header dependenciesNote that the
quick_dumpautomake rules seem to be a bit fragile and fall over a few of the renames in here. Running git clean -dfx and rebuilding everything fixes that.Unfortunately my autofoo isn't up to snuff to fix this. -Daniel
Quoted 219 lines
benchmarks/intel_upload_blit_large.c | 9 +- benchmarks/intel_upload_blit_large_gtt.c | 3 +- benchmarks/intel_upload_blit_large_map.c | 3 +- benchmarks/intel_upload_blit_small.c | 3 +- debugger/debug_rdata.c | 3 +- debugger/eudb.c | 2 +- demos/intel_sprite_on.c | 7 +- .../intel-gpu-tools/intel-gpu-tools-docs.xml | 5 +- lib/Makefile.sources | 9 +- lib/drmtest.c | 243 +++----------- lib/drmtest.h | 80 +++-- lib/gen6_render.h | 8 - lib/gen7_media.h | 2 + lib/gen8_media.h | 2 + lib/igt_aux.c | 373 +++++++++++++++++++++ lib/igt_aux.h | 67 ++++ lib/igt_core.c | 9 +- lib/igt_core.h | 7 + lib/igt_debugfs.c | 3 + lib/igt_debugfs.h | 3 +- lib/igt_kms.c | 14 +- lib/igt_kms.h | 10 +- lib/intel_batchbuffer.c | 93 ++++- lib/intel_batchbuffer.h | 96 +++++- lib/intel_chipset.c | 215 ++++++++++++ lib/intel_chipset.h | 26 ++ lib/intel_drm.c | 200 ----------- lib/intel_gpu_tools.h | 126 ------- lib/intel_io.h | 81 +++++ lib/intel_iosf.c | 61 +++- lib/intel_mmio.c | 133 +++++++- lib/intel_os.c | 171 ++++++++++ lib/intel_pci.c | 123 ------- lib/intel_reg_map.c | 3 +- lib/ioctl_wrappers.c | 6 +- lib/ioctl_wrappers.h | 5 + lib/media_fill.c | 14 - lib/media_fill.h | 49 +-- lib/media_fill_gen7.c | 16 +- lib/media_fill_gen8.c | 16 +- lib/rendercopy.h | 71 +--- lib/rendercopy_gen6.c | 51 ++- lib/rendercopy_gen7.c | 44 ++- lib/rendercopy_gen8.c | 58 ++-- lib/rendercopy_i830.c | 64 ++-- lib/rendercopy_i915.c | 30 +- tests/core_get_client_auth.c | 2 +- tests/core_getclient.c | 3 + tests/core_getstats.c | 5 + tests/ddi_compute_wrpll.c | 3 +- tests/drm_vma_limiter.c | 5 +- tests/drm_vma_limiter_cached.c | 5 +- tests/drm_vma_limiter_cpu.c | 5 +- tests/drm_vma_limiter_gtt.c | 5 +- tests/drv_suspend.c | 11 +- tests/eviction_common.c | 1 + tests/gem_bad_address.c | 5 +- tests/gem_bad_batch.c | 5 +- tests/gem_bad_blit.c | 5 +- tests/gem_bad_length.c | 2 +- tests/gem_basic.c | 2 +- tests/gem_caching.c | 10 +- tests/gem_close_race.c | 3 +- tests/gem_concurrent_blit.c | 10 +- tests/gem_cpu_reloc.c | 10 +- tests/gem_cs_prefetch.c | 10 +- tests/gem_cs_tlb.c | 9 +- tests/gem_ctx_bad_destroy.c | 4 +- tests/gem_ctx_bad_exec.c | 2 +- tests/gem_ctx_basic.c | 24 +- tests/gem_ctx_create.c | 4 +- tests/gem_ctx_exec.c | 8 +- tests/gem_double_irq_loop.c | 5 +- tests/gem_dummy_reloc_loop.c | 5 +- tests/gem_evict_alignment.c | 8 +- tests/gem_evict_everything.c | 3 +- tests/gem_exec_bad_domains.c | 5 +- tests/gem_exec_big.c | 2 +- tests/gem_exec_blt.c | 4 +- tests/gem_exec_faulting_reloc.c | 4 +- tests/gem_exec_lut_handle.c | 2 +- tests/gem_exec_nop.c | 4 +- tests/gem_fd_exhaustion.c | 3 + tests/gem_fence_thrash.c | 34 +- tests/gem_fenced_exec_thrash.c | 8 +- tests/gem_flink.c | 2 +- tests/gem_flink_race.c | 3 +- tests/gem_gtt_cpu_tlb.c | 4 +- tests/gem_gtt_hog.c | 3 +- tests/gem_gtt_speed.c | 2 +- tests/gem_hang.c | 5 +- tests/gem_hangcheck_forcewake.c | 5 +- tests/gem_largeobject.c | 2 +- tests/gem_linear_blits.c | 12 +- tests/gem_lut_handle.c | 2 +- tests/gem_madvise.c | 2 +- tests/gem_media_fill.c | 29 +- tests/gem_mmap.c | 2 +- tests/gem_mmap_gtt.c | 2 +- tests/gem_mmap_offset_exhaustion.c | 2 +- tests/gem_non_secure_batch.c | 5 +- tests/gem_partial_pwrite_pread.c | 12 +- tests/gem_persistent_relocs.c | 12 +- tests/gem_pin.c | 9 +- tests/gem_pipe_control_store_loop.c | 5 +- tests/gem_pread.c | 2 +- tests/gem_pread_after_blit.c | 12 +- tests/gem_pwrite.c | 2 +- tests/gem_pwrite_pread.c | 5 +- tests/gem_readwrite.c | 2 +- tests/gem_reg_read.c | 4 +- tests/gem_reloc_overflow.c | 5 +- tests/gem_reloc_vs_gpu.c | 12 +- tests/gem_render_copy.c | 40 ++- tests/gem_render_linear_blits.c | 31 +- tests/gem_render_tiled_blits.c | 27 +- tests/gem_reset_stats.c | 11 +- tests/gem_ring_sync_copy.c | 21 +- tests/gem_ring_sync_loop.c | 5 +- tests/gem_ringfill.c | 26 +- tests/gem_seqno_wrap.c | 22 +- tests/gem_set_tiling_vs_blt.c | 5 +- tests/gem_set_tiling_vs_gtt.c | 5 +- tests/gem_set_tiling_vs_pwrite.c | 4 +- tests/gem_storedw_batches_loop.c | 7 +- tests/gem_storedw_loop_blt.c | 5 +- tests/gem_storedw_loop_bsd.c | 5 +- tests/gem_storedw_loop_render.c | 5 +- tests/gem_storedw_loop_vebox.c | 5 +- tests/gem_stress.c | 87 +++-- tests/gem_threaded_access_tiled.c | 2 +- tests/gem_tiled_blits.c | 12 +- tests/gem_tiled_fence_blits.c | 10 +- tests/gem_tiled_partial_pwrite_pread.c | 12 +- tests/gem_tiled_pread.c | 5 +- tests/gem_tiled_pread_pwrite.c | 9 +- tests/gem_tiled_swapping.c | 9 +- tests/gem_tiling_max_stride.c | 5 +- tests/gem_unfence_active_buffers.c | 5 +- tests/gem_unref_active_buffers.c | 5 +- tests/gem_vmap_blits.c | 5 +- tests/gem_wait_render_timeout.c | 22 +- tests/gem_write_read_ring_switch.c | 12 +- tests/gen3_mixed_blits.c | 5 +- tests/gen3_render_linear_blits.c | 5 +- tests/gen3_render_mixed_blits.c | 5 +- tests/gen3_render_tiledx_blits.c | 5 +- tests/gen3_render_tiledy_blits.c | 5 +- tests/gen7_forcewake_mt.c | 5 +- tests/igt_fork_helper.c | 1 + tests/igt_simulation.c | 2 + tests/kms_addfb.c | 2 +- tests/kms_cursor_crc.c | 1 + tests/kms_fbc_crc.c | 12 +- tests/kms_flip.c | 17 +- tests/kms_pipe_crc_basic.c | 1 + tests/kms_plane.c | 1 + tests/kms_render.c | 7 +- tests/kms_setmode.c | 27 +- tests/pm_lpsp.c | 2 + tests/pm_pc8.c | 5 +- tests/pm_psr.c | 2 + tests/pm_rc6_residency.c | 2 + tests/pm_rps.c | 8 +- tests/prime_nv_api.c | 3 +- tests/prime_nv_pcopy.c | 5 +- tests/prime_nv_test.c | 5 +- tests/prime_self_import.c | 2 +- tests/prime_udl.c | 8 +- tests/testdisplay.c | 6 +- tools/intel_audio_dump.c | 9 +- tools/intel_backlight.c | 6 +- tools/intel_bios_reader.c | 4 +- tools/intel_dpio_read.c | 3 +- tools/intel_dpio_write.c | 3 +- tools/intel_error_decode.c | 3 +- tools/intel_forcewaked.c | 3 +- tools/intel_framebuffer_dump.c | 2 +- tools/intel_gpu_time.c | 6 +- tools/intel_gpu_top.c | 6 +- tools/intel_gtt.c | 3 +- tools/intel_infoframes.c | 8 +- tools/intel_l3_parity.c | 3 +- tools/intel_lid.c | 5 +- tools/intel_nc_read.c | 3 +- tools/intel_nc_write.c | 3 +- tools/intel_opregion_decode.c | 3 +- tools/intel_panel_fitter.c | 4 +- tools/intel_perf_counters.c | 3 +- tools/intel_punit_read.c | 3 +- tools/intel_punit_write.c | 3 +- tools/intel_reg_checker.c | 5 +- tools/intel_reg_dumper.c | 17 +- tools/intel_reg_read.c | 3 +- tools/intel_reg_snapshot.c | 5 +- tools/intel_reg_write.c | 3 +- tools/intel_stepping.c | 3 +- tools/intel_vga_read.c | 3 +- tools/intel_vga_write.c | 3 +- tools/quick_dump/Makefile.am | 6 +- tools/quick_dump/chipset_macro_wrap.c | 33 ++ tools/quick_dump/intel_chipset.c | 33 -- 202 files changed, 2401 insertions(+), 1398 deletions(-) create mode 100644 lib/igt_aux.c create mode 100644 lib/igt_aux.h create mode 100644 lib/intel_chipset.c delete mode 100644 lib/intel_drm.c delete mode 100644 lib/intel_gpu_tools.h create mode 100644 lib/intel_io.h create mode 100644 lib/intel_os.c delete mode 100644 lib/intel_pci.c delete mode 100644 lib/media_fill.c create mode 100644 tools/quick_dump/chipset_macro_wrap.c delete mode 100644 tools/quick_dump/intel_chipset.cSignature · 1 line
1.8.5.2Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
Quoted 9 lines · Ben Widawsky
Quoted 8 lines · Daniel Vetter
Quoted 7 lines · Daniel Vetter
Hi all,
So this thing turned out to be fairly ugly overall, and I don't think it's worth the effort to polish the series through some giant rebasing. make distcheck still works so I don't think I've fumbled this too badly and will hence just push the patches as-is.
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
I'm still very much interested in feedback, I'll simply apply that as follow-up patches.
Documenting the tools is far more important IMO (or does this exist already somewhere).
There are manpages which are semi-maintained. The goal here is to reduce excuses for not writing testcases or not using i-g-t ;-) -Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch