1. 18 1月, 2017 2 次提交
  2. 05 1月, 2017 1 次提交
  3. 03 1月, 2017 1 次提交
  4. 28 12月, 2016 1 次提交
  5. 02 12月, 2016 1 次提交
  6. 29 11月, 2016 1 次提交
  7. 26 11月, 2016 4 次提交
  8. 23 11月, 2016 1 次提交
  9. 04 11月, 2016 1 次提交
  10. 25 10月, 2016 8 次提交
    • S
      drm/i915: Debugfs support for GuC logging control · 685534ef
      Sagar Arun Kamble 提交于
      This patch provides debugfs interface i915_guc_output_control for
      on the fly enabling/disabling of logging in GuC firmware and controlling
      the verbosity level of logs.
      The value written to the file, should have bit 0 set to enable logging and
      bits 4-7 should contain the verbosity info.
      
      v2: Add a forceful flush, to collect left over logs, on disabling logging.
          Useful for Validation.
      
      v3: Besides minor cleanup, implement read method for the debugfs file and
          set the guc_log_level to -1 when logging is disabled. (Tvrtko)
      
      v4: Minor cleanup & rebase. (Tvrtko)
      
      v5:
      - Lock struct_mutex after the NULL check for guc log buffer vma. (Chris)
      - Rebase.
      Signed-off-by: NSagar Arun Kamble <sagar.a.kamble@intel.com>
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      685534ef
    • S
      drm/i915: Support for forceful flush of GuC log buffer · 896a0cb0
      Sagar Arun Kamble 提交于
      GuC firmware sends a flush interrupt to Host when the log buffer is half
      full and at that time only it updates the log buffer state.
      But in certain cases, as described below, it could be useful to have all
      that even when log buffer is only partially full. For that there is a force
      log buffer flush Host2GuC action supported by GuC firmware.
      
      For Validation requirements, a forceful flush is needed to collect the
      left over logs on disabling logging. The same can be done before proceeding
      with GPU/GuC reset as there could be some data in log buffer which is yet
      to be captured and those logs would be particularly useful to understand
      that why the reset was initiated.
      Signed-off-by: NSagar Arun Kamble <sagar.a.kamble@intel.com>
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      896a0cb0
    • A
      drm/i915: Add stats for GuC log buffer flush interrupts · 5aa1ee4b
      Akash Goel 提交于
      GuC firmware sends an interrupt to flush the log buffer when it
      becomes half full. GuC firmware also tracks how many times the
      buffer overflowed.
      It would be useful to maintain a statistics of how many flush
      interrupts were received and for which type of log buffer,
      along with the overflow count of each buffer type.
      Augmented i915_log_info debugfs to report back these statistics.
      
      v2:
      - Update the logic to detect multiple overflows between the 2
        flush interrupts and also log a message for overflow (Tvrtko)
      - Track the number of times there was no free sub buffer to capture
        the GuC log buffer. (Tvrtko)
      
      v3:
      - Fix the printf field width for overflow counter, set it to 10 as per the
        max value of u32, which takes 10 digits in decimal form. (Tvrtko)
      
      v4:
      - Move the log buffer overflow handling to a new function for better
        readability. (Tvrtko)
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      5aa1ee4b
    • A
      drm/i915: New lock to serialize the Host2GuC actions · 5dd7989b
      Akash Goel 提交于
      With the addition of new Host2GuC actions related to GuC logging, there
      is a need of a lock to serialize them, as they can execute concurrently
      with each other and also with other existing actions.
      
      v2: Use mutex in place of spinlock to serialize, as sleep can happen
          while waiting for the action's response from GuC. (Tvrtko)
      
      v3: To conform to the general rules, acquire mutex before taking the
          forcewake. (Tvrtko)
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      5dd7989b
    • A
      drm/i915: Add a relay backed debugfs interface for capturing GuC logs · f8240835
      Akash Goel 提交于
      Added a new debugfs interface '/sys/kernel/debug/dri/guc_log' for the
      User to capture GuC firmware logs. Availed relay framework to implement
      the interface, where Driver will have to just use a relay API to store
      snapshots of the GuC log buffer in the buffer managed by relay.
      The snapshot will be taken when GuC firmware sends a log buffer flush
      interrupt and up to four snapshots could be stored in the relay buffer.
      The relay buffer will be operated in a mode where it will overwrite the
      data not yet collected by User.
      Besides mmap method, through which User can directly access the relay
      buffer contents, relay also supports the 'poll' method. Through the 'poll'
      call on log file, User can come to know whenever a new snapshot of the
      log buffer is taken by Driver, so can run in tandem with the Driver and
      capture the logs in a sustained/streaming manner, without any loss of data.
      
      v2: Defer the creation of relay channel & associated debugfs file, as
          debugfs setup is now done at the end of i915 Driver load. (Chris)
      
      v3:
      - Switch to no-overwrite mode for relay.
      - Fix the relay sub buffer switching sequence.
      
      v4:
      - Update i915 Kconfig to select RELAY config. (TvrtKo)
      - Log a message when there is no sub buffer available to capture
        the GuC log buffer. (Tvrtko)
      - Increase the number of relay sub buffers to 8 from 4, to have
        sufficient buffering for boot time logs
      
      v5:
      - Fix the alignment, indentation issues and some minor cleanup. (Tvrtko)
      - Update the comment to elaborate on why a relay channel has to be
        associated with the debugfs file. (Tvrtko)
      
      v6:
      - Move the write to 'is_global' after the NULL check on parent directory
        dentry pointer. (Tvrtko)
      
      v7: Add a BUG_ON to validate relay buffer allocation size. (Chris)
      
      Testcase: igt/tools/intel_guc_logger
      Suggested-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NSourab Gupta <sourab.gupta@intel.com>
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      f8240835
    • S
      drm/i915: Handle log buffer flush interrupt event from GuC · 4100b2ab
      Sagar Arun Kamble 提交于
      GuC ukernel sends an interrupt to Host to flush the log buffer
      and expects Host to correspondingly update the read pointer
      information in the state structure, once it has consumed the
      log buffer contents by copying them to a file or buffer.
      Even if Host couldn't copy the contents, it can still update the
      read pointer so that logging state is not disturbed on GuC side.
      
      v2:
      - Use a dedicated workqueue for handling flush interrupt. (Tvrtko)
      - Reduce the overall log buffer copying time by skipping the copy of
        crash buffer area for regular cases and copying only the state
        structure data in first page.
      
      v3:
       - Create a vmalloc mapping of log buffer. (Chris)
       - Cover the flush acknowledgment under rpm get & put.(Chris)
       - Revert the change of skipping the copy of crash dump area, as
         not really needed, will be covered by subsequent patch.
      
      v4:
       - Destroy the wq under the same condition in which it was created,
         pass dev_piv pointer instead of dev to newly added GuC function,
         add more comments & rename variable for clarity. (Tvrtko)
      
      v5:
      - Allocate & destroy the dedicated wq, for handling flush interrupt,
        from the setup/teardown routines of GuC logging. (Chris)
      - Validate the log buffer size value retrieved from state structure
        and do some minor cleanup. (Tvrtko)
      - Fix error/warnings reported by checkpatch. (Tvrtko)
      - Rebase.
      
      v6:
       - Remove the interrupts_enabled check from guc_capture_logs_work, need
         to process that last work item also, queued just before disabling the
         interrupt as log buffer flush interrupt handling is a bit different
         case where GuC is actually expecting an ACK from host, which should be
         provided to keep the logging going.
         Sync against the work will be done by caller disabling the interrupt.
       - Don't sample the log buffer size value from state structure, directly
         use the expected value to move the pointer & do the copy and that cannot
         go wrong (out of bounds) as Driver only allocated the log buffer and the
         relay buffers. Driver should refrain from interpreting the log packet,
         as much possible and let Userspace parser detect the anomaly. (Chris)
      
      v7:
      - Use switch statement instead of 'if else' for retrieving the GuC log
        buffer size. (Tvrtko)
      - Refactored the log buffer copying function and shortended the name of
        couple of variables for better readability. (Tvrtko)
      
      v8:
      - Make the dedicated wq as a high priority one to further reduce the
        turnaround time of handing log buffer flush event from GuC.
      Signed-off-by: NSagar Arun Kamble <sagar.a.kamble@intel.com>
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      4100b2ab
    • S
      drm/i915: Support for GuC interrupts · 26705e20
      Sagar Arun Kamble 提交于
      There are certain types of interrupts which Host can receive from GuC.
      GuC ukernel sends an interrupt to Host for certain events, like for
      example retrieve/consume the logs generated by ukernel.
      This patch adds support to receive interrupts from GuC but currently
      enables & partially handles only the interrupt sent by GuC ukernel.
      Future patches will add support for handling other interrupt types.
      
      v2:
      - Use common low level routines for PM IER/IIR programming (Chris)
      - Rename interrupt functions to gen9_xxx from gen8_xxx (Chris)
      - Replace disabling of wake ref asserts with rpm get/put (Chris)
      
      v3:
      - Update comments for more clarity. (Tvrtko)
      - Remove the masking of GuC interrupt, which was kept masked till the
        start of bottom half, its not really needed as there is only a
        single instance of work item & wq is ordered. (Tvrtko)
      
      v4:
      - Rebase.
      - Rename guc_events to pm_guc_events so as to be indicative of the
        register/control block it is associated with. (Chris)
      - Add handling for back to back log buffer flush interrupts.
      
      v5:
      - Move the read & clearing of register, containing Guc2Host message
        bits, outside the irq spinlock. (Tvrtko)
      
      v6:
      - Move the log buffer flush interrupt related stuff to the following
        patch so as to do only generic bits in this patch. (Tvrtko)
      - Rebase.
      
      v7:
      - Remove the interrupts_enabled check from gen9_guc_irq_handler, want to
        process that last interrupt also before disabling the interrupt, sync
        against the work queued by irq handler will be done by caller disabling
        the interrupt.
      Signed-off-by: NSagar Arun Kamble <sagar.a.kamble@intel.com>
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      26705e20
    • A
      drm/i915: New structure to contain GuC logging related fields · d6b40b4b
      Akash Goel 提交于
      So far there were 2 fields related to GuC logs in 'intel_guc' structure.
      For the support of capturing GuC logs & storing them in a local buffer,
      multiple new fields would have to be added. This warrants a separate
      structure to contain the fields related to GuC logging state.
      Added a new structure 'intel_guc_log' and instance of it inside
      'intel_guc' structure.
      
      v2: Rebase.
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      d6b40b4b
  11. 10 10月, 2016 1 次提交
  12. 07 10月, 2016 1 次提交
  13. 15 9月, 2016 1 次提交
  14. 09 9月, 2016 1 次提交
  15. 15 8月, 2016 1 次提交
  16. 10 8月, 2016 2 次提交
  17. 03 8月, 2016 1 次提交
  18. 21 6月, 2016 1 次提交
  19. 13 6月, 2016 1 次提交
  20. 24 5月, 2016 1 次提交
  21. 23 5月, 2016 4 次提交
  22. 20 4月, 2016 3 次提交
    • D
      drm/i915/guc: local optimisations and updating comments · 86e06cc0
      Dave Gordon 提交于
      Tidying up guc_init_proc_desc() and adding commentary to the client
      structure after the recent change in GuC page mapping strategy.
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1461078516-28678-1-git-send-email-david.s.gordon@intel.comReviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      86e06cc0
    • A
      drm/i915/guc: drop cached copy of 'wq_head' · a5916e8f
      Alex Dai 提交于
      Now that we keep the GuC client process descriptor permanently mapped,
      we don't really need to keep a local copy of the GuC's work-queue-head.
      So we can simplify the code a little by not doing this.
      Signed-off-by: NAlex Dai <yu.dai@intel.com>
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      a5916e8f
    • D
      drm/i915/guc: keep GuC doorbell & process descriptor mapped in kernel · 0d92a6a4
      Dave Gordon 提交于
      Don't use kmap_atomic() for doorbell & process descriptor access.
      This patch fixes the BUG shown below, where the thread could sleep
      while holding a kmap_atomic mapping. In order not to need to call
      kmap_atomic() in this code path, we now set up a permanent kernel
      mapping of the shared doorbell and process-descriptor page, and
      use that in all doorbell and process-descriptor related code.
      
        BUG: scheduling while atomic: gem_close_race/1941/0x00000002
        Modules linked in: hid_generic usbhid i915 asix usbnet libphy mii
          i2c_algo_bit drm_kms_helper cfbfillrect syscopyarea cfbimgblt
          sysfillrect sysimgblt fb_sys_fops cfbcopyarea drm coretemp i2c_hid
          hid video pinctrl_sunrisepoint pinctrl_intel acpi_pad nls_iso8859_1
          e1000e ptp psmouse pps_core ahci libahci
        CPU: 0 PID: 1941 Comm: gem_close_race Tainted: G     U 4.4.0-160121+ #123
        Hardware name: Intel Corporation Skylake Client platform/Skylake AIO
          DDR3L RVP10, BIOS SKLSE2R1.R00.X100.B01.1509220551 09/22/2015
          0000000000013e40 ffff880166c27a78 ffffffff81280d02 ffff880172c13e40
          ffff880166c27a88 ffffffff810c203a ffff880166c27ac8 ffffffff814ec808
          ffff88016b7c6000 ffff880166c28000 00000000000f4240 0000000000000001
        Call Trace:
          [<ffffffff81280d02>] dump_stack+0x4b/0x79
          [<ffffffff810c203a>] __schedule_bug+0x41/0x4f
          [<ffffffff814ec808>] __schedule+0x5a8/0x690
          [<ffffffff814ec927>] schedule+0x37/0x80
          [<ffffffff814ef3fd>] schedule_hrtimeout_range_clock+0xad/0x130
          [<ffffffff81090be0>] ? hrtimer_init+0x10/0x10
          [<ffffffff814ef3f1>] ?  schedule_hrtimeout_range_clock+0xa1/0x130
          [<ffffffff814ef48e>] schedule_hrtimeout_range+0xe/0x10
          [<ffffffff814eef9b>] usleep_range+0x3b/0x40
          [<ffffffffa01ec109>] i915_guc_wq_check_space+0x119/0x210 [i915]
          [<ffffffffa01da47c>] intel_logical_ring_alloc_request_extras+0x5c/0x70 [i915]
          [<ffffffffa01cdbf1>] i915_gem_request_alloc+0x91/0x170 [i915]
          [<ffffffffa01c1c07>] i915_gem_do_execbuffer.isra.25+0xbc7/0x12a0 [i915]
          [<ffffffffa01cb785>] ?  i915_gem_object_get_pages_gtt+0x225/0x3c0 [i915]
          [<ffffffffa01d1fb6>] ? i915_gem_pwrite_ioctl+0xd6/0x9f0 [i915]
          [<ffffffffa01c2e68>] i915_gem_execbuffer2+0xa8/0x250 [i915]
          [<ffffffffa00f65d8>] drm_ioctl+0x258/0x4f0 [drm]
          [<ffffffffa01c2dc0>] ? i915_gem_execbuffer+0x340/0x340 [i915]
          [<ffffffff8111590d>] do_vfs_ioctl+0x2cd/0x4a0
          [<ffffffff8111eac2>] ? __fget+0x72/0xb0
          [<ffffffff81115b1c>] SyS_ioctl+0x3c/0x70
          [<ffffffff814effd7>] entry_SYSCALL_64_fastpath+0x12/0x6a
        ------------[ cut here ]------------
      
      v4:
        Only tear down doorbell & kunmap() client object if we actually
        succeeded in allocating a client object (Tvrtko Ursulin)
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93847Original-version-by: NAlex Dai <yu.dai@intel.com>
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Cc: Tvtrko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      0d92a6a4
  23. 14 4月, 2016 1 次提交