1. 25 Feb, 2019 2 commits
    • Tvrtko Ursulin's avatar
      tools/intel_gpu_top: Add file output capability · 06b0830f
      Tvrtko Ursulin authored
      A new -o command switch enables logging to a file.
      
      v2:
       * Support "-o -" for explicit stdout selection. (Chris Wilson)
      Signed-off-by: Tvrtko Ursulin's avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      References: https://bugs.freedesktop.org/show_bug.cgi?id=108689
      Cc: Eero Tamminen <eero.t.tamminen@intel.com>
      Cc: 3.14pi@ukr.net
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
      06b0830f
    • Tvrtko Ursulin's avatar
      tools/intel_gpu_top: Add support for stdout logging · 47e91cc2
      Tvrtko Ursulin authored
      Two new output modes are added: listing of text data to standard out (-l
      on the command line), and dumping of JSON formatted records (-J), also to
      standard out.
      
      The first mode is selected automatically when non-interactive standard out
      is detected.
      
      Example of text output:
      
       Freq MHz      IRQ RC6 Power     IMC MiB/s           RCS/0           BCS/0           VCS/0           VCS/1          VECS/0
       req  act       /s   %     W     rd     wr       %  se  wa       %  se  wa       %  se  wa       %  se  wa       %  se  wa
         0    0        0   0  0.00    360      0    0.00   0   0    0.00   0   0    0.00   0   0    0.00   0   0    0.00   0   0
       350  350        0 100  0.00     35      2    0.00   0   0    0.00   0   0    0.00   0   0    0.00   0   0    0.00   0   0
       350  350        0 100  0.00     34      2    0.00   0   0    0.00   0   0    0.00   0   0    0.00   0   0    0.00   0   0
       350  350        0 100  0.00    143      6    0.00   0   0    0.00   0   0    0.00   0   0    0.00   0   0    0.00   0   0
       350  350        0 100  0.00    169      7    0.00   0   0    0.00   0   0    0.00   0   0    0.00   0   0    0.00   0   0
       350  350        0 100  0.00    169      7    0.00   0   0    0.00   0   0    0.00   0   0    0.00   0   0    0.00   0   0
      
      Example of JSON output:
      
      {
              "period": {
                      "duration": 1002.525224,
                      "unit": "ms"
              },
              "frequency": {
                      "requested": 349.118398,
                      "actual": 349.118398,
                      "unit": "MHz"
              },
              "interrupts": {
                      "count": 0.000000,
                      "unit": "irq/s"
              },
              "rc6": {
                      "value": 99.897752,
                      "unit": "%"
              },
              "power": {
                      "value": 0.000000,
                      "unit": "W"
              },
              "imc-bandwidth": {
                      "reads": 149.683843,
                      "writes": 6.104093,
                      "unit": "MiB/s"
              },
              "engines": {
                      "Render/3D/0": {
                              "busy": 0.000000,
                              "sema": 0.000000,
                              "wait": 0.000000,
                              "unit": "%"
                      },
                      "Blitter/0": {
                              "busy": 0.000000,
                              "sema": 0.000000,
                              "wait": 0.000000,
                              "unit": "%"
                      },
                      "Video/0": {
                              "busy": 0.000000,
                              "sema": 0.000000,
                              "wait": 0.000000,
                              "unit": "%"
                      },
                      "Video/1": {
                              "busy": 0.000000,
                              "sema": 0.000000,
                              "wait": 0.000000,
                              "unit": "%"
                      },
                      "VideoEnhance/0": {
                              "busy": 0.000000,
                              "sema": 0.000000,
                              "wait": 0.000000,
                              "unit": "%"
                      }
              }
      }
      
      v2:
       * Show example output in commit message.
       * Install signal handler to complete output on SIGINT. (Chris Wilson)
      
      v3:
       * Use asprintf where possible. (Chris Wilson)
      
      v4:
       * Check asprintf return value, not the pointer.
       * Rename fmt_d/dd to fmt_width/precision. (Chris Wilson)
      Signed-off-by: Tvrtko Ursulin's avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      References: https://bugs.freedesktop.org/show_bug.cgi?id=108689
      Cc: Eero Tamminen <eero.t.tamminen@intel.com>
      Cc: 3.14pi@ukr.net
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: Chris Wilson's avatarChris Wilson <chris@chris-wilson.co.uk>
      47e91cc2
  2. 29 Jan, 2019 1 commit
  3. 11 Sep, 2018 1 commit
  4. 25 Jun, 2018 1 commit
    • Petri Latvala's avatar
      meson: Add options to control optional parts · 0e98bf69
      Petri Latvala authored
      Distributions want explicit control over optional parts so they can
      state runtime dependencies before building. Let's restore the
      functionality autotools used to provide.
      
      Where possible, the selection is done by choosing whether to build a
      particular item and the option name is build_$item. Example:
      build_overlay. Where not possible, the option name is
      with_$item. Example: with_valgrind.
      
      Array options require a bump of required meson version to 0.44. Debian
      stable has meson 0.37 which is already too old, stable-backports has
      0.45, CI uses 0.45. Mesa's meson requirement is 0.44.1, for a
      perspective.
      
      Note, the old hack for not building docs when cross-compiling is
      gone, as doc building can be explicitly controlled now.
      
      v2: glib not optional
      v3: bump meson version to 0.44
      Signed-off-by: Petri Latvala's avatarPetri Latvala <petri.latvala@intel.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
      Signed-off-by: Arkadiusz Hiler's avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Reviewed-by: Daniel Vetter's avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      0e98bf69
  5. 31 May, 2018 1 commit
    • Tvrtko Ursulin's avatar
      intel-gpu-top: Rewrite the tool to be safe to use · 63f0bf3d
      Tvrtko Ursulin authored
      intel-gpu-top is a dangerous tool which can hang machines due unsafe mmio
      register access. This patch rewrites it to use only PMU.
      
      Only overall command streamer busyness and GPU global data such as power
      and frequencies are included in this new version.
      
      For access to more GPU functional unit level data, an OA metric based tool
      like gpu-top should be used instead.
      
      v2:
       * Sort engines by class and instance.
       * Do not wait for one sampling period to display something on screen.
       * Move code out of the asserts. (Rinat Ibragimov)
       * Continuously adapt to terminal size. (Rinat Ibragimov)
      
      v3:
       * Change layout and precision of some field. (Chris Wilson)
       Eero Tamminen:
       * Use more user friendly engine names.
       * Don't error out if a counter is missing.
       * Add IMC read/write bandwidth.
       * Report minimum required kernel version.
      
      v4:
       * Really support 4.16 by skipping of missing engines.
       * Simpler and less hacky float printing.
       * Preserve copyright header. (Antonio Argenziano)
       * Simplify engines_ptr macro. (Rinat Ibragimov)
      
      v5:
       * Get RAPL unit from sysfs.
       * Consolidate sysfs paths with a macro.
       * Tidy error handling by carrying over and reporting errno.
       * Check against console height on all prints.
       * More readable minimum kernel version message. (Eero Tamminen)
       * Column banner for per engine stats. (Eero Tamminen)
      
      v6:
       * Man page update. (Eero Tamminen)
      Signed-off-by: Tvrtko Ursulin's avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
      Cc: Petri Latvala <petri.latvala@intel.com>
      Cc: Eero Tamminen <eero.t.tamminen@intel.com>
      Cc: Rinat Ibragimov <ibragimovrinat@mail.ru>
      Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> # v1
      Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> # v0.5
      Reviewed-by: Matthew Auld's avatarMatthew Auld <matthew.auld@intel.com>
      63f0bf3d
  6. 31 Jan, 2018 1 commit
    • Mika Kuoppala's avatar
      tools/intel_reg: Add reading and writing registers through engine · 7f0be0e7
      Mika Kuoppala authored
      Add option to specify engine for register read/write operation.
      If engine is specified, use MI_LOAD_REGISTER_IMM and MI_STORE_REGISTER_IMM
      to write and read register using a batch targeted at that engine.
      
      v2: no MI_NOOP after BBE (Chris)
      v3: use modern engine names (Chris), use global fd
      v4: strcasecmp (Chris)
      v5: use register definition format for engine (Jani)
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      CC: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v4)
      Acked-by: Jani Nikula's avatarJani Nikula <jani.nikula@intel.com>
      7f0be0e7
  7. 23 Jan, 2018 1 commit
  8. 17 Jan, 2018 1 commit
  9. 16 Jan, 2018 1 commit
  10. 02 Oct, 2017 1 commit
  11. 20 Sep, 2017 1 commit
  12. 08 Sep, 2017 1 commit
  13. 31 Jan, 2017 1 commit
  14. 12 May, 2016 1 commit
  15. 04 May, 2016 1 commit
  16. 03 Mar, 2016 2 commits
  17. 08 Sep, 2015 1 commit
  18. 17 Aug, 2015 1 commit
  19. 04 Aug, 2015 1 commit
  20. 31 Jul, 2015 1 commit
  21. 20 Jul, 2015 1 commit
  22. 30 Apr, 2015 1 commit
  23. 16 Jan, 2015 1 commit
  24. 12 Jan, 2015 1 commit
    • Ben Widawsky's avatar
      intel_gpu_frequency: A tool to manipulate Intel GPU frequency · 5fb26d14
      Ben Widawsky authored
      WARNING: very minimally tested
      
      In general you should not need this tool. Its primary purpose is for
      benchmarking, and for debugging performance issues.
      
      For many kernel releases now sysfs has supported reading and writing the GPU
      frequency. Therefore, this tool provides no new functionality. What it does
      provide is an easy to package (for distros) tool that handles the most common
      scenarios.
      
      v2:
      Get rid of -f from the usage message (Jordan)
      Add space before [-s (Jordan)
      Add a -c/--custom example (Jordan)
      Add a setting for resetting to hardware default (Ken)
      Replicate examples in commit message in the source code. (me)
      
      v3:
      Its not It's (me)
      Add --help/-h to usage
      Add Version + man page
      Rename tool to intel_gpu_frequency, from intel_frequency
      Remove "sudo" from the examples
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: Jordan Justen's avatarJordan Justen <jordan.l.justen@intel.com>
      Cc: Kenneth Graunke <kenneth@whitecape.org>
      
      Here are some sample usages:
      $ intel_gpu_frequency --get=cur,min,max,eff
      cur: 200 MHz
      min: 200 MHz
      RP1: 200 MHz
      max: 1200 MHz
      
      $ intel_gpu_frequency -g
      cur: 200 MHz
      min: 200 MHz
      RP1: 200 MHz
      max: 1200 MHz
      
      $ intel_gpu_frequency -geff
      RP1: 200 MHz
      
      $ intel_gpu_frequency --set min=300
      $ intel_gpu_frequency --get min
      cur: 300 MHz
      min: 300 MHz
      RP1: 200 MHz
      max: 1200 MHz
      
      $ intel_gpu_frequency --custom max=900
      $ intel_gpu_frequency --get max
      cur: 300 MHz
      min: 300 MHz
      RP1: 200 MHz
      max: 900 MHz
      
      $ intel_gpu_frequency --max
      $ intel_gpu_frequency -g
      cur: 1200 MHz
      min: 1200 MHz
      RP1: 200 MHz
      max: 1200 MHz
      
      $ intel_gpu_frequency -e
      $ intel_gpu_frequency -g
      cur: 200 MHz
      min: 200 MHz
      RP1: 200 MHz
      max: 200 MHz
      
      $ intel_gpu_frequency --max
      $ intel_gpu_frequency -g
      cur: 1200 MHz
      min: 1200 MHz
      RP1: 200 MHz
      max: 1200 MHz
      
      $ intel_gpu_frequency --min
      $ intel_gpu_frequency -g
      cur: 200 MHz
      min: 200 MHz
      RP1: 200 MHz
      max: 200 MHz
      5fb26d14
  25. 13 Sep, 2013 1 commit
  26. 25 Apr, 2012 1 commit
  27. 13 Apr, 2012 1 commit
  28. 15 Feb, 2012 2 commits
    • Paulo Zanoni's avatar
      Add intel_panel_fitter tool · 3b65f179
      Paulo Zanoni authored
      The tool allows you to change the panel fitter settings, so you can
      change the size of the screen being displayed on your monitor without
      changing the real pixel size of your desktop. The biggest use case for
      this tool is to work around overscan done by TVs and some monitors in
      interlaced mode.
      
      v2: reviews by Ben, Chris and Rodrigo
       - don't install
       - use intel_register_access_init
       - check for maximum X and Y values
       - add a disclaimer saying this is not the real solution
       - print less when pf is disabled and option '-l' is used
      Signed-off-by: Paulo Zanoni's avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: Daniel Vetter's avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      3b65f179
    • Paulo Zanoni's avatar
      reg_dumper: change and fix behavior when using dump files · ecad594e
      Paulo Zanoni authored
      Before this patch, handling dump files was wrong:
      - when HAS_PCH_SPLIT was specified, intel_reg_dumper segfaulted inside
        intel_check_pch()
      - the "devid" variable was used but not set
      - there was no way to specify the device id of the machine used to
        generate the dump file
      
      This patch fixes this behavior with the following changes:
      - the HAS_PCH_SPLIT variable is gone
      - there is now a '-d' argument that can be used to specify the device id
        used to interpret the results
      - when a dump file is used but the '-d' argument is not provided, an
        Ironlake machine is assumed
      Signed-off-by: Paulo Zanoni's avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: Daniel Vetter's avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      ecad594e
  29. 09 Feb, 2012 1 commit
  30. 04 Jan, 2012 2 commits
  31. 14 Oct, 2011 1 commit
    • Eugeni Dodonov's avatar
      Allow to output statistics to stdout. · 62c542fd
      Eugeni Dodonov authored
      This allows intel_gpu_top to run both in statistics-collecting mode
      (collecting the per-ring statistics in gnuplot-friendly format) and
      ncurses top-like mode at the same time.
      
      It also allows to output the statistics directly to stdout, by using "-o
      -", so the results can be parsed directly via a popen() parsing.
      
      If you are using intel_gpu_top as previously (without any command-line
      arguments), it should change nothing for you. If you were using its
      logging facilities (e.g., the '-o file'), note that the logging will keep
      running, but the detailed top-like interface will be on the screen at the
      same time.
      Signed-off-by: default avatarEugeni Dodonov <eugeni.dodonov@intel.com>
      62c542fd
  32. 13 Sep, 2011 2 commits
  33. 05 Sep, 2011 3 commits