From: robert.foss@collabora.com
To: daniel.vetter@ffwll.ch, daniel.stone@collabora.com,
marius.c.vlad@intel.com, tomeu.vizoso@collabora.com,
emil.velikov@collabora.com
Cc: intel-gfx@lists.freedesktop.org
Subject: [RFC i-g-t 0/9] Remove compile time depencencies on libdrm_intel.
Date: Fri, 20 May 2016 18:59:24 -0400 [thread overview]
Message-ID: <1463785173-17557-1-git-send-email-robert.foss@collabora.com> (raw)
From: Robert Foss <robert.foss@collabora.com>
Hey,
I've been looking at the possibilty of removing the compile time depency on
libdrm_intel. There are two technical solutions to this problem as far as
I can see; stubs and conditional compilation.
I'd like to compare the two approaches to provide an overview.
Conditional compilation:
+ Programs that will not work on a given platform are not built.
+ Faster compilation (especially helpful on slow platforms like the RPi2).
- Combinatorial complexity of different environments (what to build if we
have libpciaccess and libdrm_vc4 but no libintel_drm for example), that
that quickly will get worse with more configurations.
- Currently some sources like igt_aux/igt_kms partially depend on
libdrm_intel, to avoid #ifdef hell, configuraiton specific functionality
should have to be extracted into new files.
Stubs:
+ Relatively straight forward to implement, as can be seen from these
patches.
+ Can easily be extended for any depency.
- Duplicating defines/structs/functions is a maintenance burden.
- Some built binaries will always skip, and are essentially useless.
- Little compilation speedup.
Robert Foss (9):
configure.ac: Test for libdrm_intel and build for it if present.
benchmarks/Makefile: Don't build benchmarks that depend on
libdrm_intel.
tools/Makefile: Don't build tools that depend on libdrm_intel.
demos/Makefile: Don't build tools that depend on libdrm_intel.
tests/gem_ppgtt: Switched to new aliases of intel specific functions.
tests/gem_render_tiled_blits: Switched to new aliases of intel
specific functions.
lib/intel_drm_stubs: Add stubs for functionality from libdrm_intel.
lib: Replace intel specific header includes with intel_drm_stubs.h.
tests: Replace intel specific header includes with intel_drm_stubs.h.
benchmarks/Makefile.sources | 15 +-
configure.ac | 14 +-
demos/Makefile.am | 5 +-
demos/Makefile.sources | 7 +
lib/Makefile.sources | 2 +
lib/drmtest.c | 2 +-
lib/gpgpu_fill.c | 7 +-
lib/igt_aux.c | 2 +-
lib/igt_aux.h | 3 +-
lib/igt_debugfs.c | 4 +-
lib/igt_draw.h | 3 +-
lib/igt_fb.h | 3 +-
lib/igt_kms.c | 3 +-
lib/intel_batchbuffer.c | 4 -
lib/intel_batchbuffer.h | 3 +-
lib/intel_chipset.c | 2 +-
lib/intel_drm_stubs.c | 258 +++++++++
lib/intel_drm_stubs.h | 999 +++++++++++++++++++++++++++++++++
lib/ioctl_wrappers.c | 1 -
lib/ioctl_wrappers.h | 4 +-
lib/media_fill_gen7.c | 3 +-
lib/media_fill_gen8.c | 4 +-
lib/media_fill_gen8lp.c | 6 +-
lib/media_fill_gen9.c | 4 +-
lib/media_spin.c | 2 -
lib/rendercopy_gen6.c | 5 +-
lib/rendercopy_gen7.c | 4 +-
lib/rendercopy_gen8.c | 4 +-
lib/rendercopy_gen9.c | 5 +-
lib/rendercopy_i830.c | 5 +-
lib/rendercopy_i915.c | 9 +-
tests/core_auth.c | 2 +-
tests/core_get_client_auth.c | 2 +-
tests/core_getclient.c | 3 +-
tests/drm_import_export.c | 7 +-
tests/drm_read.c | 5 +-
tests/drm_vma_limiter.c | 6 +-
tests/drm_vma_limiter_cached.c | 6 +-
tests/drm_vma_limiter_cpu.c | 6 +-
tests/drm_vma_limiter_gtt.c | 6 +-
tests/drv_getparams_basic.c | 6 +-
tests/gem_alive.c | 4 +-
tests/gem_bad_address.c | 6 +-
tests/gem_bad_batch.c | 6 +-
tests/gem_bad_blit.c | 6 +-
tests/gem_bad_length.c | 2 +-
tests/gem_bad_reloc.c | 2 +-
tests/gem_basic.c | 2 +-
tests/gem_caching.c | 5 +-
tests/gem_close_race.c | 2 +-
tests/gem_concurrent_all.c | 5 +-
tests/gem_cpu_reloc.c | 4 +-
tests/gem_create.c | 8 +-
tests/gem_ctx_bad_exec.c | 3 +-
tests/gem_ctx_basic.c | 8 +-
tests/gem_double_irq_loop.c | 7 +-
tests/gem_evict_everything.c | 2 +-
tests/gem_exec_bad_domains.c | 7 +-
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_exec_params.c | 2 +-
tests/gem_fence_thrash.c | 2 +-
tests/gem_fence_upload.c | 7 +-
tests/gem_flink_basic.c | 2 +-
tests/gem_flink_race.c | 4 +-
tests/gem_gpgpu_fill.c | 7 +-
tests/gem_gtt_cpu_tlb.c | 2 +-
tests/gem_gtt_speed.c | 2 +-
tests/gem_hang.c | 6 +-
tests/gem_hangcheck_forcewake.c | 7 +-
tests/gem_largeobject.c | 2 +-
tests/gem_lut_handle.c | 2 +-
tests/gem_madvise.c | 3 +-
tests/gem_media_fill.c | 7 +-
tests/gem_mmap.c | 2 +-
tests/gem_mmap_gtt.c | 2 +-
tests/gem_mmap_offset_exhaustion.c | 2 +-
tests/gem_mmap_wc.c | 2 +-
tests/gem_non_secure_batch.c | 5 +-
tests/gem_partial_pwrite_pread.c | 1 -
tests/gem_persistent_relocs.c | 1 -
tests/gem_pin.c | 1 -
tests/gem_pipe_control_store_loop.c | 7 +-
tests/gem_ppgtt.c | 24 +-
tests/gem_pread.c | 2 +-
tests/gem_pread_after_blit.c | 1 -
tests/gem_pwrite.c | 2 +-
tests/gem_pwrite_pread.c | 7 +-
tests/gem_pwrite_snooped.c | 2 +-
tests/gem_read_read_speed.c | 5 +-
tests/gem_readwrite.c | 2 +-
tests/gem_reloc_overflow.c | 2 +-
tests/gem_reloc_vs_gpu.c | 1 -
tests/gem_render_copy.c | 5 +-
tests/gem_render_copy_redux.c | 7 +-
tests/gem_render_linear_blits.c | 5 +-
tests/gem_render_tiled_blits.c | 9 +-
tests/gem_request_retire.c | 8 +-
tests/gem_seqno_wrap.c | 4 +-
tests/gem_set_tiling_vs_blt.c | 7 +-
tests/gem_set_tiling_vs_gtt.c | 2 +-
tests/gem_set_tiling_vs_pwrite.c | 2 +-
tests/gem_stolen.c | 14 +-
tests/gem_storedw_batches_loop.c | 7 +-
tests/gem_storedw_loop.c | 2 +-
tests/gem_streaming_writes.c | 2 +-
tests/gem_stress.c | 6 +-
tests/gem_threaded_access_tiled.c | 4 +-
tests/gem_tiled_blits.c | 1 -
tests/gem_tiled_fence_blits.c | 5 +-
tests/gem_tiled_partial_pwrite_pread.c | 1 -
tests/gem_tiled_pread_basic.c | 2 +-
tests/gem_tiled_pread_pwrite.c | 1 -
tests/gem_tiled_swapping.c | 1 -
tests/gem_tiled_wb.c | 2 +-
tests/gem_tiled_wc.c | 2 +-
tests/gem_tiling_max_stride.c | 2 +-
tests/gem_unfence_active_buffers.c | 7 +-
tests/gem_unref_active_buffers.c | 7 +-
tests/gem_userptr_blits.c | 8 +-
tests/gem_wait.c | 5 +-
tests/gem_write_read_ring_switch.c | 1 -
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 | 3 +-
tests/kms_addfb_basic.c | 3 +-
tests/kms_atomic.c | 5 +-
tests/kms_mmap_write_crc.c | 2 +-
tests/kms_psr_sink_crc.c | 4 +-
tests/kms_render.c | 4 +-
tests/kms_setmode.c | 4 +-
tests/kms_vblank.c | 5 +-
tests/pm_rpm.c | 1 -
tests/pm_rps.c | 4 +-
tests/pm_sseu.c | 6 +-
tests/prime_mmap.c | 5 +-
tests/prime_nv_api.c | 4 +-
tests/prime_nv_pcopy.c | 4 +-
tests/prime_nv_test.c | 4 +-
tests/prime_self_import.c | 3 +-
tests/prime_udl.c | 7 +-
tests/vc4_create_bo.c | 5 +-
tests/vc4_wait_bo.c | 5 +-
tests/vc4_wait_seqno.c | 3 +-
tools/Makefile.sources | 50 +-
151 files changed, 1588 insertions(+), 338 deletions(-)
create mode 100644 demos/Makefile.sources
create mode 100644 lib/intel_drm_stubs.c
create mode 100644 lib/intel_drm_stubs.h
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2016-05-20 22:59 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-20 22:59 robert.foss [this message]
2016-05-20 22:59 ` [RFC i-g-t 1/9] configure.ac: Test for libdrm_intel and build for it if present robert.foss
2016-05-21 7:55 ` Chris Wilson
2016-05-21 13:15 ` Robert Foss
2016-05-23 15:03 ` ?==?utf-8?q? ?==?utf-8?q? [RFC i-g-t 1/9]?==?utf-8?q? " Emil Velikov
2016-05-24 14:58 ` [RFC i-g-t 1/9] " Robert Foss
2016-05-20 22:59 ` [RFC i-g-t 2/9] benchmarks/Makefile: Don't build benchmarks that depend on libdrm_intel robert.foss
2016-05-23 14:04 ` ?==?utf-8?q? " Emil Velikov
2016-05-24 8:01 ` Daniel Vetter
2016-05-25 17:47 ` Robert Foss
2016-05-20 22:59 ` [RFC i-g-t 3/9] tools/Makefile: Don't build tools " robert.foss
2016-05-23 14:09 ` ?==?utf-8?q? " Emil Velikov
2016-05-20 22:59 ` [RFC i-g-t 4/9] demos/Makefile: " robert.foss
2016-05-20 22:59 ` [RFC i-g-t 5/9] tests/gem_ppgtt: Switched to new aliases of intel specific functions robert.foss
2016-05-23 14:14 ` ?==?utf-8?q? " Emil Velikov
2016-05-23 14:15 ` Emil Velikov
2016-05-24 8:03 ` Daniel Vetter
2016-05-20 22:59 ` [RFC i-g-t 6/9] tests/gem_render_tiled_blits: " robert.foss
2016-05-23 14:39 ` ?==?utf-8?q? " Emil Velikov
2016-05-24 8:04 ` Daniel Vetter
2016-05-20 22:59 ` [RFC i-g-t 7/9] lib/intel_drm_stubs: Add stubs for functionality from libdrm_intel robert.foss
2016-05-23 14:53 ` ?==?utf-8?q? " Emil Velikov
2016-05-24 8:05 ` Daniel Vetter
2016-05-25 17:48 ` Robert Foss
2016-05-20 22:59 ` [RFC i-g-t 8/9] lib: Replace intel specific header includes with intel_drm_stubs.h robert.foss
2016-05-23 14:57 ` ?==?utf-8?q? " Emil Velikov
2016-05-24 8:07 ` Daniel Vetter
2016-05-25 18:00 ` Robert Foss
2016-05-20 22:59 ` [RFC i-g-t 9/9] tests: " robert.foss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463785173-17557-1-git-send-email-robert.foss@collabora.com \
--to=robert.foss@collabora.com \
--cc=daniel.stone@collabora.com \
--cc=daniel.vetter@ffwll.ch \
--cc=emil.velikov@collabora.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=marius.c.vlad@intel.com \
--cc=tomeu.vizoso@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox