[PATCH i-g-t 0/8] Add a bit operations library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These patches consolidate some of the handy bit macros and functions that
we have across igt. 

Note 1 - tools/intel_audio_dump has its own BIT macro, but since this tool
doesn't include igt.h, I didn't think is necessary to rename it.

Note 2 - using test_bit implies that the flags to test are not longer bits, but
normal numbers, e.g. 3 instead of BIT(3), so I decided against changing code
to use it.

Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> 

Michel Thierry (8):
  lib/igt: remove duplicate igt_core include
  lib/igt_draw: rename BIT macro to BIT_GET
  lib: Define a common bit operations library
  lib/intel_device_info: Use igt_bitops
  lib/igt_draw: Use igt_bitops
  lib/igt_gt: Define HANG_ALLOW_* as bit flags
  test/gem_create: import igt_bitops
  tests: Use BIT macro instead of (1<<x)

 lib/igt.h                           |  2 +-
 lib/igt_bitops.h                    | 70 +++++++++++++++++++++++++++++++++++
 lib/igt_draw.c                      | 15 ++++----
 lib/igt_gt.h                        |  5 ++-
 lib/igt_primes.c                    | 25 +------------
 lib/intel_device_info.c             |  3 +-
 tests/drm_vma_limiter_cached.c      |  2 +-
 tests/drv_missed_irq.c              |  4 +-
 tests/drv_module_reload.c           |  4 +-
 tests/eviction_common.c             |  8 ++--
 tests/gem_bad_address.c             |  2 +-
 tests/gem_bad_reloc.c               |  6 +--
 tests/gem_busy.c                    | 24 ++++++------
 tests/gem_close_race.c              |  8 ++--
 tests/gem_concurrent_all.c          |  2 +-
 tests/gem_cpu_reloc.c               |  4 +-
 tests/gem_create.c                  |  3 +-
 tests/gem_cs_prefetch.c             |  2 +-
 tests/gem_cs_tlb.c                  |  2 +-
 tests/gem_ctx_switch.c              |  4 +-
 tests/gem_ctx_thrash.c              |  2 +-
 tests/gem_double_irq_loop.c         |  4 +-
 tests/gem_exec_alignment.c          |  6 +--
 tests/gem_exec_async.c              |  8 ++--
 tests/gem_exec_blt.c                | 20 +++++-----
 tests/gem_exec_create.c             |  4 +-
 tests/gem_exec_faulting_reloc.c     | 14 +++----
 tests/gem_exec_fence.c              | 14 +++----
 tests/gem_exec_flush.c              | 10 ++---
 tests/gem_exec_gttfill.c            |  4 +-
 tests/gem_exec_latency.c            |  8 ++--
 tests/gem_exec_lut_handle.c         |  4 +-
 tests/gem_exec_nop.c                |  4 +-
 tests/gem_exec_parallel.c           |  6 +--
 tests/gem_exec_params.c             |  8 ++--
 tests/gem_exec_parse.c              |  4 +-
 tests/gem_exec_reloc.c              |  8 ++--
 tests/gem_exec_reuse.c              |  4 +-
 tests/gem_exec_schedule.c           |  6 +--
 tests/gem_exec_store.c              |  4 +-
 tests/gem_exec_suspend.c            |  6 +--
 tests/gem_exec_whisper.c            | 10 ++---
 tests/gem_fence_upload.c            |  4 +-
 tests/gem_fenced_exec_thrash.c      |  4 +-
 tests/gem_gtt_hog.c                 |  4 +-
 tests/gem_lut_handle.c              |  2 +-
 tests/gem_persistent_relocs.c       | 10 ++---
 tests/gem_pin.c                     |  6 +--
 tests/gem_pipe_control_store_loop.c | 18 ++++-----
 tests/gem_pwrite.c                  |  8 ++--
 tests/gem_pwrite_pread.c            | 12 +++---
 tests/gem_reloc_vs_gpu.c            | 12 +++---
 tests/gem_reset_stats.c             |  6 +--
 tests/gem_ringfill.c                |  6 +--
 tests/gem_shrink.c                  |  4 +-
 tests/gem_softpin.c                 | 12 +++---
 tests/gem_storedw_batches_loop.c    |  2 +-
 tests/gem_streaming_writes.c        | 10 ++---
 tests/gem_stress.c                  |  8 ++--
 tests/gem_sync.c                    | 10 ++---
 tests/gem_tiled_pread_basic.c       |  2 +-
 tests/gem_tiled_wb.c                |  2 +-
 tests/gem_tiled_wc.c                |  2 +-
 tests/gem_write_read_ring_switch.c  |  4 +-
 tests/gen3_mixed_blits.c            |  6 +--
 tests/gen3_render_linear_blits.c    |  6 +--
 tests/gen3_render_mixed_blits.c     |  6 +--
 tests/gen3_render_tiledx_blits.c    |  6 +--
 tests/gen3_render_tiledy_blits.c    |  6 +--
 tests/gen7_forcewake_mt.c           |  2 +-
 tests/kms_atomic.c                  |  6 +--
 tests/kms_atomic_transition.c       | 20 +++++-----
 tests/kms_ccs.c                     |  8 ++--
 tests/kms_cursor_crc.c              |  4 +-
 tests/kms_cursor_legacy.c           |  4 +-
 tests/kms_fbc_crc.c                 |  2 +-
 tests/kms_flip.c                    | 74 ++++++++++++++++++-------------------
 tests/kms_frontbuffer_tracking.c    | 26 ++++++-------
 tests/kms_pipe_color.c              |  6 +--
 tests/kms_pipe_crc_basic.c          |  4 +-
 tests/kms_plane.c                   | 10 ++---
 tests/kms_psr_sink_crc.c            |  2 +-
 tests/kms_render.c                  |  2 +-
 tests/kms_setmode.c                 | 11 +++---
 tests/perf.c                        | 52 +++++++++++++-------------
 tests/pm_rpm.c                      |  8 ++--
 tests/pm_rps.c                      |  4 +-
 tests/pm_sseu.c                     |  4 +-
 tests/prime_busy.c                  |  6 +--
 tests/prime_nv_pcopy.c              |  4 +-
 tests/prime_vgem.c                  |  8 ++--
 tests/sw_sync.c                     |  8 ++--
 tests/testdisplay.c                 |  2 +-
 tests/vgem_basic.c                  |  8 ++--
 94 files changed, 431 insertions(+), 385 deletions(-)
 create mode 100644 lib/igt_bitops.h

-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux