2 Commits

Author SHA1 Message Date
Ville Syrjälä
1ecd91a8c6 Fix a bunch of printf types
igt_kms.c: In function ‘igt_crtc_set_background’:
igt_kms.c:1940:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ [-Wformat=]
  LOG(display, "%s.%d: crtc_set_background(%lu)\n",
  ^
intel_firmware_decode.c: In function ‘csr_open’:
intel_firmware_decode.c:169:2: warning: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 3 has type ‘__off_t’ [-Wformat=]
  printf("Firmware: %s (%zd bytes)\n", filename, st.st_size);
  ^
intel_gpu_top.c: In function ‘main’:
intel_gpu_top.c:683:10: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=]
          stats[i] - last_stats[i]);
          ^
hsw_compute_wrpll.c: In function ‘main’:
hsw_compute_wrpll.c:644:3: warning: format ‘%li’ expects argument of type ‘long int’, but argument 7 has type ‘long long int’ [-Wformat=]
   igt_fail_on_f(ref->r2 != r2 || ref->n2 != n2 || ref->p != p,
   ^
gem_gtt_hog.c: In function ‘__real_main155’:
gem_gtt_hog.c:177:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
  igt_info("Time to execute %lu children:  %7.3fms\n",
  ^
kms_flip.c: In function ‘run_test_step’:
kms_flip.c:985:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 10 has type ‘__time_t’ [-Wformat=]
   igt_assert_f(end - start > 0.9 * frame_time(o) &&
   ^
kms_flip.c:985:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 11 has type ‘__suseconds_t’ [-Wformat=]
kms_frontbuffer_tracking.c: In function ‘setup_sink_crc’:
kms_frontbuffer_tracking.c:1364:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘ssize_t’ [-Wformat=]
   igt_info("Unexpected sink CRC error, rc=:%ld errno:%d %s\n",
   ^
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-01-08 19:56:49 +02:00
Damien Lespiau
669b5da2bc tools: Add an intel_firmware_decode tool
So we can inspect fw headers. Sample output:

Firmware: skl_dmc_ver1_18.bin (7892 bytes)
CSS header (128 bytes)
    module_type: DMC (9)
    header_len: 32
    header_ver: 0x10000
    module_id: 0x0
    module_vendor: 0x0
    date: 0x7df060c
    size: 1973
    key_size: 0
    modulus_size: 0
    exponent_size: 0
    version: 1.18 (0x10012)
    kernel_header_info: 0x0
Package header (256 bytes)
    header_len: 64
    header_ver: 1
    num_entries: 3
Firmware #1
    stepping: A.*
    offset: 4294967295
Firmware #2
    stepping: B.*
    offset: 4294967295
Firmware #3
    stepping: *.*
    offset: 0
0x7f0867143000
0x7f0867143180
    signature: 0x40403e3e
    header_len: 128
    header_ver: 1
    dmcc_ver: 520
    project: 0x900
    fw_size: 1845
    fw_version: 0x10008
    mmio_count: 3
        write(0x0008f074, 0x00002fc0)
        write(0x0008f004, 0x02500204)
        write(0x0008f034, 0xc003b400)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-30 16:38:54 +01:00