Lines Matching +full:i915 +full:- +full:g33

45 IGT_TEST_DESCRIPTION("Test the i915 perf metrics streaming interface");
47 #define GEN6_MI_REPORT_PERF_COUNT ((0x28 << 23) | (3 - 2))
48 #define GEN8_MI_REPORT_PERF_COUNT ((0x28 << 23) | (4 - 2))
135 [I915_OA_FORMAT_C4_B8] = { /* HSW+ (header differs from HSW-Gen8+) */
183 static int drm_fd = -1;
184 static int sysfs = -1;
185 static int pm_fd = -1;
186 static int stream_fd = -1;
216 stream_fd = -1; in __perf_close()
220 pm_fd = -1; in __perf_close()
234 pm_fd = -1; in __perf_open()
357 return "GO 1->0 transition (enter RC6)"; in gen8_read_report_reason()
384 return max(0, i - 1); in max_oa_exponent_for_period_lte()
388 return -1; in max_oa_exponent_for_period_lte()
401 return max_oa_exponent_for_period_lte(period - 1); in max_oa_exponent_for_freq_gt()
420 uint32_t oa_exponent_mask = (1 << (oa_exponent + 1)) - 1; in oa_report_is_periodic()
464 ((uint32_t *)bo->virtual)[i] = color; in scratch_buf_memset()
483 buf->bo = bo; in scratch_buf_init()
484 buf->stride = stride; in scratch_buf_init()
485 buf->tiling = I915_TILING_NONE; in scratch_buf_init()
486 buf->size = size; in scratch_buf_init()
487 buf->bpp = 32; in scratch_buf_init()
520 uint32_t time_delta = timebase_scale(oa_report1[1] - oa_report0[1]); in hsw_sanity_check_render_basic_reports()
541 clock_delta = ticks1 - ticks0; in hsw_sanity_check_render_basic_reports()
569 uint32_t delta = a1[j] - a0[j]; in hsw_sanity_check_render_basic_reports()
583 uint32_t delta = b1[j] - b0[j]; in hsw_sanity_check_render_basic_reports()
594 uint32_t delta = c1[j] - c0[j]; in hsw_sanity_check_render_basic_reports()
617 return (1ULL << 40) + value1 - value0; in gen8_40bit_a_delta()
619 return value1 - value0; in gen8_40bit_a_delta()
631 *delta += (uint32_t)(value1 - value0); in accumulate_uint32()
652 struct oa_format format = get_oa_format(accumulator->format); in accumulate_reports()
653 uint64_t *deltas = accumulator->deltas; in accumulate_reports()
668 accumulate_uint40(i, start, end, accumulator->format, in accumulate_reports()
691 struct oa_format format = get_oa_format(accumulator->format); in accumulator_print()
692 uint64_t *deltas = accumulator->deltas; in accumulator_print()
724 uint32_t time_delta = timebase_scale(oa_report1[1] - oa_report0[1]); in gen8_sanity_check_test_oa_reports()
727 uint32_t clock_delta = ticks1 - ticks0; in gen8_sanity_check_test_oa_reports()
769 uint32_t delta = a1[j] - a0[j]; in gen8_sanity_check_test_oa_reports()
782 b = rpt1_b[0] - rpt0_b[0]; in gen8_sanity_check_test_oa_reports()
786 b = rpt1_b[1] - rpt0_b[1]; in gen8_sanity_check_test_oa_reports()
790 b = rpt1_b[2] - rpt0_b[2]; in gen8_sanity_check_test_oa_reports()
794 b = rpt1_b[3] - rpt0_b[3]; in gen8_sanity_check_test_oa_reports()
797 igt_assert(b >= ref - 1 && b <= ref + 1); in gen8_sanity_check_test_oa_reports()
799 b = rpt1_b[4] - rpt0_b[4]; in gen8_sanity_check_test_oa_reports()
802 igt_assert(b >= ref - 1 && b <= ref + 1); in gen8_sanity_check_test_oa_reports()
804 b = rpt1_b[5] - rpt0_b[5]; in gen8_sanity_check_test_oa_reports()
807 igt_assert(b >= ref - 1 && b <= ref + 1); in gen8_sanity_check_test_oa_reports()
809 b = rpt1_b[6] - rpt0_b[6]; in gen8_sanity_check_test_oa_reports()
812 igt_assert(b >= ref - 1 && b <= ref + 1); in gen8_sanity_check_test_oa_reports()
814 b = rpt1_b[7] - rpt0_b[7]; in gen8_sanity_check_test_oa_reports()
817 igt_assert(b >= ref - 1 && b <= ref + 1); in gen8_sanity_check_test_oa_reports()
825 uint32_t delta = c1[j] - c0[j]; in gen8_sanity_check_test_oa_reports()
843 igt_debug("Couldn't query CS timestamp frequency, trying to guess based on PCI-id\n"); in get_cs_timestamp_frequency()
872 test_set_uuid = "403d8832-1a27-4aa6-a64e-f5389ce7b212"; in init_sys_info()
898 test_set_uuid = "d6de6f55-e526-4f79-a6a6-d7315c09044e"; in init_sys_info()
900 test_set_uuid = "4a534b07-cba3-414d-8d60-874830e883aa"; in init_sys_info()
904 test_set_uuid = "1651949f-0ac0-4cb1-a06f-dafd74a407d1"; in init_sys_info()
907 test_set_uuid = "2b985803-d3c9-4629-8a4f-634bfecba0e8"; in init_sys_info()
910 test_set_uuid = "882fa433-1f4a-4a67-a962-c741888fe5f5"; in init_sys_info()
917 test_set_uuid = "5ee72f5c-092f-421e-8b70-225f7c3e9612"; in init_sys_info()
921 test_set_uuid = "baa3c7e4-52b6-4b85-801e-465a94b746dd"; in init_sys_info()
924 test_set_uuid = "f1792f32-6db2-4b50-b4b2-557128f1688d"; in init_sys_info()
931 test_set_uuid = "dd3fd789-e783-4204-8cd0-b671bbccb0cf"; in init_sys_info()
935 test_set_uuid = "74fb4902-d3d3-4237-9e90-cbdc68d0a446"; in init_sys_info()
938 test_set_uuid = "577e8e2c-3fa0-4875-8743-3538d585e3b0"; in init_sys_info()
945 test_set_uuid = "db41edd4-d8e7-4730-ad11-b9a2d6833503"; in init_sys_info()
947 test_set_uuid = "a291665e-244b-4b76-9b9a-01de9d3c8068"; in init_sys_info()
984 if ((max_size - total_len) < format_size) { in i915_read_reports_until_timestamp()
988 return -1; in i915_read_reports_until_timestamp()
992 max_size - total_len)) < 0 && in i915_read_reports_until_timestamp()
1002 return -1; in i915_read_reports_until_timestamp()
1014 if (header->type == DRM_I915_PERF_RECORD_SAMPLE) in i915_read_reports_until_timestamp()
1017 offset += header->size; in i915_read_reports_until_timestamp()
1025 * control parameter dev.i915.perf_stream_paranoid == 0 */
1046 write_u64_file("/proc/sys/dev/i915/perf_stream_paranoid", 1); in test_system_wide_paranoid()
1071 write_u64_file("/proc/sys/dev/i915/perf_stream_paranoid", 0); in test_system_wide_paranoid()
1082 write_u64_file("/proc/sys/dev/i915/perf_stream_paranoid", 1); in test_system_wide_paranoid()
1127 properties[ARRAY_SIZE(properties) - 1] = 0; /* ID 0 is also be reserved as invalid */ in test_invalid_oa_metric_set_id()
1131 properties[ARRAY_SIZE(properties) - 1] = test_metric_set_id; in test_invalid_oa_metric_set_id()
1136 param.num_properties--; in test_invalid_oa_metric_set_id()
1161 properties[ARRAY_SIZE(properties) - 1] = 0; /* ID 0 is also be reserved as invalid */ in test_invalid_oa_format_id()
1165 properties[ARRAY_SIZE(properties) - 1] = test_oa_format; in test_invalid_oa_format_id()
1170 param.num_properties--; in test_invalid_oa_format_id()
1205 uint32_t exponent_mask = (1 << (exponent + 1)) - 1; in read_2_oa_reports()
1219 * somewhat unpredictable but typically don't pose a problem - except in read_2_oa_reports()
1238 for (size_t offset = 0; offset < len; offset += header->size) { in read_2_oa_reports()
1243 igt_assert_eq(header->pad, 0); /* Reserved */ in read_2_oa_reports()
1249 igt_assert_neq(header->type, DRM_I915_PERF_RECORD_OA_BUFFER_LOST); in read_2_oa_reports()
1257 if (header->type == DRM_I915_PERF_RECORD_OA_REPORT_LOST) { in read_2_oa_reports()
1270 * i915-perf is extended in the future with additional in read_2_oa_reports()
1273 igt_assert_eq(header->type, DRM_I915_PERF_RECORD_SAMPLE); in read_2_oa_reports()
1275 igt_assert_eq(header->size, sample_size); in read_2_oa_reports()
1344 oa_report0[1], oa_report1[1], oa_report1[1] - oa_report0[1]); in print_reports()
1353 clock0, clock1, clock1 - clock0); in print_reports()
1371 ((int)slice_freq1 - (int)slice_freq0)); in print_reports()
1374 ((int)unslice_freq1 - (int)unslice_freq0)); in print_reports()
1398 uint32_t delta = a1[j] - a0[j]; in print_reports()
1412 uint32_t delta = b1[j] - b0[j]; in print_reports()
1423 uint32_t delta = c1[j] - c0[j]; in print_reports()
1613 /* MI_STORE_DATA can only use GTT address on gen4+/g33 and needs in load_helper_init()
1614 * snoopable mem on pre-gen6. Hence load-helper only works on gen6+, but in load_helper_init()
1731 offset += header->size) { in test_oa_exponents()
1736 if (header->type == DRM_I915_PERF_RECORD_OA_BUFFER_LOST) { in test_oa_exponents()
1741 if (header->type == DRM_I915_PERF_RECORD_OA_REPORT_LOST) in test_oa_exponents()
1744 if (header->type != DRM_I915_PERF_RECORD_SAMPLE) in test_oa_exponents()
1765 timer_reports[i].report[1] - timer_reports[i - 1].report[1]; in test_oa_exponents()
1776 igt_debug("matches=%u/%u\n", matches, n_timer_reports - 1); in test_oa_exponents()
1779 igt_assert_lte(n_timer_reports - 3, matches); in test_oa_exponents()
1789 * equates to > 40 thousand years and isn't exposed via the i915 perf interface.
1832 int max_freq = read_u64_file("/proc/sys/dev/i915/oa_max_sample_rate"); in test_low_oa_exponent_permissions()
1854 write_u64_file("/proc/sys/dev/i915/perf_stream_paranoid", 0); in test_low_oa_exponent_permissions()
1877 write_u64_file("/proc/sys/dev/i915/oa_max_sample_rate", oa_freq - 100); in test_low_oa_exponent_permissions()
1888 write_u64_file("/proc/sys/dev/i915/oa_max_sample_rate", 100000); in test_low_oa_exponent_permissions()
1889 write_u64_file("/proc/sys/dev/i915/perf_stream_paranoid", 1); in test_low_oa_exponent_permissions()
1914 write_u64_file("/proc/sys/dev/i915/perf_stream_paranoid", 1); in test_per_context_mode_unprivileged()
2046 * measurement might really be +- tick_ns (assuming we effectively get in test_blocking()
2056 for (/* nop */; ((end = get_time()) - start) < test_duration_ns; /* nop */) { in test_blocking()
2077 for (int offset = 0; offset < ret; offset += header->size) { in test_blocking()
2080 if (header->type == DRM_I915_PERF_RECORD_SAMPLE) { in test_blocking()
2100 /* Using nanosecond units is fairly silly here, given the tick in- in test_blocking()
2101 * precision - ah well, it's consistent with the get_time() units. in test_blocking()
2103 user_ns = (end_times.tms_utime - start_times.tms_utime) * tick_ns; in test_blocking()
2104 kernel_ns = (end_times.tms_stime - start_times.tms_stime) * tick_ns; in test_blocking()
2110 igt_debug("time in userspace = %"PRIu64"ns (+-%dns) (start utime = %d, end = %d)\n", in test_blocking()
2113 igt_debug("time in kernelspace = %"PRIu64"ns (+-%dns) (start stime = %d, end = %d)\n", in test_blocking()
2203 * measurement might really be +- tick_ns (assuming we effectively get in test_polling()
2213 for (/* nop */; ((end = get_time()) - start) < test_duration_ns; /* nop */) { in test_polling()
2220 while ((ret = poll(&pollfd, 1, -1)) < 0 && in test_polling()
2244 igt_assert_neq(ret, -1); in test_polling()
2255 for (int offset = 0; offset < ret; offset += header->size) { in test_polling()
2258 if (header->type == DRM_I915_PERF_RECORD_SAMPLE) { in test_polling()
2279 igt_assert_eq(ret, -1); in test_polling()
2287 /* Using nanosecond units is fairly silly here, given the tick in- in test_polling()
2288 * precision - ah well, it's consistent with the get_time() units. in test_polling()
2290 user_ns = (end_times.tms_utime - start_times.tms_utime) * tick_ns; in test_polling()
2291 kernel_ns = (end_times.tms_stime - start_times.tms_stime) * tick_ns; in test_polling()
2297 igt_debug("time in userspace = %"PRIu64"ns (+-%dns) (start utime = %d, end = %d)\n", in test_polling()
2300 igt_debug("time in kernelspace = %"PRIu64"ns (+-%dns) (start stime = %d, end = %d)\n", in test_polling()
2364 while ((len = read(stream_fd, buf, buf_size)) == -1 && errno == EINTR) in test_buffer_fill()
2367 igt_assert_neq(len, -1); in test_buffer_fill()
2370 for (int offset = 0; offset < len; offset += header->size) { in test_buffer_fill()
2373 if (header->type == DRM_I915_PERF_RECORD_OA_BUFFER_LOST) in test_buffer_fill()
2396 while (((last_timestamp - first_timestamp) * oa_period) < (fill_duration / 2)) { in test_buffer_fill()
2399 last_timestamp - first_timestamp, in test_buffer_fill()
2400 (last_timestamp - first_timestamp) * oa_period, in test_buffer_fill()
2403 while ((len = read(stream_fd, buf, buf_size)) == -1 && errno == EINTR) in test_buffer_fill()
2406 igt_assert_neq(len, -1); in test_buffer_fill()
2408 for (int offset = 0; offset < len; offset += header->size) { in test_buffer_fill()
2414 switch (header->type) { in test_buffer_fill()
2422 n_periodic_reports > 0 ? report[1] - last_periodic_report[1] : 0, in test_buffer_fill()
2510 while ((len = read(stream_fd, buf, buf_size)) == -1 && errno == EINTR) in test_enable_disable()
2513 igt_assert_eq(len, -1); in test_enable_disable()
2528 while (((last_timestamp - first_timestamp) * oa_period) < (fill_duration / 2)) { in test_enable_disable()
2530 while ((len = read(stream_fd, buf, buf_size)) == -1 && errno == EINTR) in test_enable_disable()
2533 igt_assert_neq(len, -1); in test_enable_disable()
2535 for (int offset = 0; offset < len; offset += header->size) { in test_enable_disable()
2541 switch (header->type) { in test_enable_disable()
2554 n_periodic_reports > 0 ? (report[1] - last_periodic_report[1]) : 0, in test_enable_disable()
2563 * periodic reports, ctx-switch in test_enable_disable()
2597 igt_assert_eq(len, -1); in test_enable_disable()
2635 igt_assert_neq(zero_fd, -1); in test_short_reads()
2637 zero_fd = -1; in test_short_reads()
2658 header = (void *)(pages + page_size - record_size); in test_short_reads()
2663 } while (header->type == DRM_I915_PERF_RECORD_OA_REPORT_LOST); in test_short_reads()
2670 ret = read(stream_fd, pages + page_size - 16, page_size); in test_short_reads()
2671 igt_assert_eq(ret, -1); in test_short_reads()
2680 header = (void *)(pages + page_size - record_size / 2); in test_short_reads()
2684 } while (ret > 0 && header->type == DRM_I915_PERF_RECORD_OA_REPORT_LOST); in test_short_reads()
2686 igt_assert_eq(ret, -1); in test_short_reads()
2720 igt_assert_eq(ret, -1); in test_non_sampling_read_error()
2758 igt_assert_eq(ret, -1); in test_disabled_read_error()
2776 igt_assert_eq(ret, -1); in test_disabled_read_error()
2831 memset(bo->virtual, 0x80, 4096); in test_mi_rpc()
2844 report32 = bo->virtual; in test_mi_rpc()
2872 OUT_BATCH(GFX_OP_PIPE_CONTROL | (6 - 2)); in emit_stall_timestamp_and_rpc()
2881 OUT_BATCH(GFX_OP_PIPE_CONTROL | (5 - 2)); in emit_stall_timestamp_and_rpc()
2894 * should be able to configure the OA unit for per-context metrics (for a
2900 * reports read via i915 perf can be filtered for a single context the counters
2901 * themselves always progress as global/system-wide counters affected by all
2928 write_u64_file("/proc/sys/dev/i915/perf_stream_paranoid", 1); in hsw_test_single_ctx_counters()
2968 * to measure to try and catch issues with i915-perf in hsw_test_single_ctx_counters()
2971 * We do this because i915-perf single context filtering had in hsw_test_single_ctx_counters()
2982 * Now a buggy version of i915-perf will fail to measure in hsw_test_single_ctx_counters()
3002 igt_debug("opening i915-perf stream\n"); in hsw_test_single_ctx_counters()
3010 memset(bo->virtual, 0x80, 4096); in hsw_test_single_ctx_counters()
3062 report0_32 = bo->virtual; in hsw_test_single_ctx_counters()
3074 n_samples_written = report1_32[43] - report0_32[43]; in hsw_test_single_ctx_counters()
3082 timestamp0_64 = *(uint64_t *)(((uint8_t *)bo->virtual) + 512); in hsw_test_single_ctx_counters()
3083 timestamp1_64 = *(uint64_t *)(((uint8_t *)bo->virtual) + 520); in hsw_test_single_ctx_counters()
3088 delta_ts64 = timestamp1_64 - timestamp0_64; in hsw_test_single_ctx_counters()
3089 delta_oa32 = report1_32[1] - report0_32[1]; in hsw_test_single_ctx_counters()
3106 (delta_ts64_ns - delta_oa32_ns) : in hsw_test_single_ctx_counters()
3107 (delta_oa32_ns - delta_ts64_ns); in hsw_test_single_ctx_counters()
3128 * should be able to configure the OA unit for per-context metrics (for a
3132 * For Gen8+ although reports read via i915 perf can be filtered for a single
3133 * context the counters themselves always progress as global/system-wide
3137 * account context-switch reports and factor out any counter progression not
3175 write_u64_file("/proc/sys/dev/i915/perf_stream_paranoid", 1); in gen8_test_single_ctx_render_target_writes_a_counter()
3222 * to measure to try and catch issues with i915-perf in gen8_test_single_ctx_render_target_writes_a_counter()
3225 * We do this because i915-perf single context filtering had in gen8_test_single_ctx_render_target_writes_a_counter()
3236 * Now a buggy version of i915-perf will fail to measure in gen8_test_single_ctx_render_target_writes_a_counter()
3254 igt_debug("opening i915-perf stream\n"); in gen8_test_single_ctx_render_target_writes_a_counter()
3262 memset(bo->virtual, 0x80, 4096); in gen8_test_single_ctx_render_target_writes_a_counter()
3318 report0_32 = bo->virtual; in gen8_test_single_ctx_render_target_writes_a_counter()
3342 timestamp0_64 = *(uint64_t *)(((uint8_t *)bo->virtual) + 512); in gen8_test_single_ctx_render_target_writes_a_counter()
3343 timestamp1_64 = *(uint64_t *)(((uint8_t *)bo->virtual) + 520); in gen8_test_single_ctx_render_target_writes_a_counter()
3348 delta_ts64 = timestamp1_64 - timestamp0_64; in gen8_test_single_ctx_render_target_writes_a_counter()
3349 delta_oa32 = report1_32[1] - report0_32[1]; in gen8_test_single_ctx_render_target_writes_a_counter()
3366 (delta_ts64_ns - delta_oa32_ns) : in gen8_test_single_ctx_render_target_writes_a_counter()
3367 (delta_oa32_ns - delta_ts64_ns); in gen8_test_single_ctx_render_target_writes_a_counter()
3383 for (size_t offset = 0; offset < len; offset += header->size) { in gen8_test_single_ctx_render_target_writes_a_counter()
3394 igt_assert_eq(header->pad, 0); /* Reserved */ in gen8_test_single_ctx_render_target_writes_a_counter()
3400 igt_assert_neq(header->type, DRM_I915_PERF_RECORD_OA_BUFFER_LOST); in gen8_test_single_ctx_render_target_writes_a_counter()
3408 if (header->type == DRM_I915_PERF_RECORD_OA_REPORT_LOST) { in gen8_test_single_ctx_render_target_writes_a_counter()
3415 * i915-perf is extended in the future with additional in gen8_test_single_ctx_render_target_writes_a_counter()
3418 igt_assert_eq(header->type, DRM_I915_PERF_RECORD_SAMPLE); in gen8_test_single_ctx_render_target_writes_a_counter()
3420 igt_assert_eq(header->size, sample_size); in gen8_test_single_ctx_render_target_writes_a_counter()
3432 uint32_t time_delta = report[1] - report0_32[1]; in gen8_test_single_ctx_render_target_writes_a_counter()
3435 skip_reason = "prior first mi-rpc"; in gen8_test_single_ctx_render_target_writes_a_counter()
3440 uint32_t time_delta = report[1] - report1_32[1]; in gen8_test_single_ctx_render_target_writes_a_counter()
3466 report_reason = "ctx-load"; in gen8_test_single_ctx_render_target_writes_a_counter()
3472 report_reason = "internal/go/clk-ratio"; in gen8_test_single_ctx_render_target_writes_a_counter()
3474 report_reason = "end-mi-rpc"; in gen8_test_single_ctx_render_target_writes_a_counter()
3495 igt_debug(" -> Accumulated deltas A0=%"PRIu64" A21=%"PRIu64", A26=%"PRIu64"\n", in gen8_test_single_ctx_render_target_writes_a_counter()
3500 igt_debug(" -> Skipping: %s\n", skip_reason); in gen8_test_single_ctx_render_target_writes_a_counter()
3504 /* Finally update current-ctx_id, only possible in gen8_test_single_ctx_render_target_writes_a_counter()
3534 ret = memcmp(src[0].bo->virtual, dst[0].bo->virtual, 4 * width * height); in gen8_test_single_ctx_render_target_writes_a_counter()
3604 igt_assert_eq(n_events_end - n_events_start, 0); in test_rc6_disable()
3612 igt_assert_neq(n_events_end - n_events_start, 0); in test_rc6_disable()
3619 ret = -errno; in __i915_perf_add_config()
3643 igt_assert_eq(ret, -1); in has_i915_perf_userspace_config()
3654 const char *uuid = "01234567-0123-0123-0123-0123456789ab"; in test_invalid_create_userspace_config()
3655 const char *invalid_uuid = "blablabla-wrong"; in test_invalid_create_userspace_config()
3670 igt_assert_eq(__i915_perf_add_config(drm_fd, &config), -EINVAL); in test_invalid_create_userspace_config()
3679 igt_assert_eq(__i915_perf_add_config(drm_fd, &config), -EINVAL); in test_invalid_create_userspace_config()
3688 igt_assert_eq(__i915_perf_add_config(drm_fd, &config), -EINVAL); in test_invalid_create_userspace_config()
3699 igt_assert_eq(__i915_perf_add_config(drm_fd, &config), -EINVAL); in test_invalid_create_userspace_config()
3708 igt_assert_eq(__i915_perf_add_config(drm_fd, &config), -EFAULT); in test_invalid_create_userspace_config()
3715 const char *uuid = "01234567-0123-0123-0123-0123456789ab"; in test_invalid_remove_userspace_config()
3757 const char *uuid = "01234567-0123-0123-0123-0123456789ab"; in test_create_destroy_userspace_config()
3810 igt_assert_eq(__i915_perf_add_config(drm_fd, &config), -EACCES); in test_create_destroy_userspace_config()
3818 igt_assert_eq(__i915_perf_add_config(drm_fd, &config), -EADDRINUSE); in test_create_destroy_userspace_config()
3844 const char *uuid = "01234567-0123-0123-0123-0123456789ab"; in test_whitelisted_registers_userspace_config()
3872 /* OASTARTTRIG[1-8] */ in test_whitelisted_registers_userspace_config()
3878 /* OAREPORTTRIG[1-8] */ in test_whitelisted_registers_userspace_config()
3967 if (strncmp(line, "i915 ", 5) == 0) { in read_i915_module_ref()
3983 /* check that an open i915 perf stream holds a reference on the drm i915 module
4010 igt_assert_eq(drm_fd, -1); in test_i915_ref_count()
4033 igt_debug("ref count after opening i915 perf stream = %u\n", ref_count1); in test_i915_ref_count()
4038 drm_fd = -1; in test_i915_ref_count()
4039 sysfs = -1; in test_i915_ref_count()
4053 igt_debug("ref count after closing i915 perf stream fd = %u\n", ref_count0); in test_i915_ref_count()
4060 int paranoid = read_u64_file("/proc/sys/dev/i915/perf_stream_paranoid"); in test_sysctl_defaults()
4061 int max_freq = read_u64_file("/proc/sys/dev/i915/oa_max_sample_rate"); in test_sysctl_defaults()
4074 igt_require(stat("/proc/sys/dev/i915/perf_stream_paranoid", &sb)
4076 igt_require(stat("/proc/sys/dev/i915/oa_max_sample_rate", &sb)
4080 igt_subtest("i915-ref-count")
4083 igt_subtest("sysctl-defaults")
4090 igt_assert_eq(drm_fd, -1);
4100 write_u64_file("/proc/sys/dev/i915/perf_stream_paranoid", 1);
4101 write_u64_file("/proc/sys/dev/i915/oa_max_sample_rate", 100000);
4106 igt_require_f(render_copy, "no render-copy function\n");
4109 igt_subtest("non-system-wide-paranoid")
4112 igt_subtest("invalid-open-flags")
4115 igt_subtest("invalid-oa-metric-set-id")
4118 igt_subtest("invalid-oa-format-id")
4121 igt_subtest("missing-sample-flags")
4124 igt_subtest("oa-formats")
4127 igt_subtest("invalid-oa-exponent")
4129 igt_subtest("low-oa-exponent-permissions")
4131 igt_subtest("oa-exponents")
4134 igt_subtest("per-context-mode-unprivileged") {
4139 igt_subtest("buffer-fill")
4142 igt_subtest("disabled-read-error")
4144 igt_subtest("non-sampling-read-error")
4147 igt_subtest("enable-disable")
4156 igt_subtest("short-reads")
4159 igt_subtest("mi-rpc")
4162 igt_subtest("unprivileged-single-ctx-counters") {
4167 igt_subtest("gen8-unprivileged-single-ctx-counters") {
4169 * for a specific context. Additionally the partial-replacement
4172 * system-wide data via MI_REPORT_PERF_COUNT commands.
4178 igt_subtest("rc6-disable")
4181 igt_subtest("invalid-create-userspace-config")
4184 igt_subtest("invalid-remove-userspace-config")
4187 igt_subtest("create-destroy-userspace-config")
4190 igt_subtest("whitelisted-registers-userspace-config")
4195 write_u64_file("/proc/sys/dev/i915/oa_max_sample_rate", 100000);
4196 write_u64_file("/proc/sys/dev/i915/perf_stream_paranoid", 1);