1. 15 3月, 2018 1 次提交
  2. 14 3月, 2018 1 次提交
  3. 13 3月, 2018 2 次提交
  4. 10 3月, 2018 1 次提交
  5. 09 3月, 2018 2 次提交
  6. 08 3月, 2018 3 次提交
  7. 02 3月, 2018 1 次提交
  8. 22 2月, 2018 2 次提交
  9. 20 2月, 2018 1 次提交
    • C
      drm/i915: Track number of pending freed objects · c9c70471
      Chris Wilson 提交于
      During igt, we frequently call into the driver to reset both HW and
      driver state (idling the device, waiting for it to become idle and
      freeing off old objects) to ensure that we start each test/subtest/pass
      from known state. This process incurs an RCU barrier or two to ensure
      that any such pending frees are indeed flushed before we return.
      However, unconditionally waiting on the RCU barrier adds needless delay
      to many callers, which adds up to several seconds when repeated thousands
      of times. We can skip the rcu_barrier() if by tracking how many outstanding
      frees we have, we know there are none.
      
      The same path is used along suspend, where we may be able to save the
      unconditional RCU barrier.
      
      To put it into perspective with a completely meaningless
      microbenchmark, igt/gem_sync/idle is improved from 50ms to 30us on bdw.
      
      v2: Remove the extra synchronize_rcu() inside i915_drop_caches_set()
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180219220631.25001-1-chris@chris-wilson.co.uk
      c9c70471
  10. 16 2月, 2018 2 次提交
  11. 12 2月, 2018 1 次提交
  12. 09 2月, 2018 1 次提交
  13. 08 2月, 2018 2 次提交
  14. 25 1月, 2018 2 次提交
    • S
      drm/i915/guc: Update name and prototype of i915_guc_log_control · 065dd5ad
      Sagar Arun Kamble 提交于
      i915_guc_log_control is GuC interface and GuC APIs that are not user
      facing should be named with "intel_guc" prefix hence we change name to
      intel_guc_log_control. Also changed the parameter to intel_guc struct.
      
      v2: Move log vma check to intel_guc_log_control (Michal)
          Return -ENODEV when log isn't initialized. (Chris)
      Suggested-by: NMichal Wajdeczko <michal.wajdeczko@intel.com>
      Signed-off-by: NSagar Arun Kamble <sagar.a.kamble@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMichal Wajdeczko <michal.wajdeczko@intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/1516808821-3638-4-git-send-email-sagar.a.kamble@intel.com
      065dd5ad
    • S
      drm/i915/guc: Fix lockdep due to log relay channel handling under struct_mutex · 70deeadd
      Sagar Arun Kamble 提交于
      This patch fixes lockdep issue due to circular locking dependency of
      struct_mutex, i_mutex_key, mmap_sem, relay_channels_mutex.
      For GuC log relay channel we create debugfs file that requires i_mutex_key
      lock and we are doing that under struct_mutex. So we introduced newer
      dependency as:
          &dev->struct_mutex --> &sb->s_type->i_mutex_key#3 --> &mm->mmap_sem
      However, there is dependency from mmap_sem to struct_mutex. Hence we
      separate the relay create/destroy operation from under struct_mutex.
      Also added runtime check of relay buffer status.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      
      ======================================================
      WARNING: possible circular locking dependency detected
      4.15.0-rc6-CI-Patchwork_7614+ #1 Not tainted
      ------------------------------------------------------
      debugfs_test/1388 is trying to acquire lock:
       (&dev->struct_mutex){+.+.}, at: [<00000000d5e1d915>] i915_mutex_lock_interruptible+0x47/0x130 [i915]
      
      but task is already holding lock:
       (&mm->mmap_sem){++++}, at: [<0000000029a9c131>] __do_page_fault+0x106/0x560
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #3 (&mm->mmap_sem){++++}:
             _copy_to_user+0x1e/0x70
             filldir+0x8c/0xf0
             dcache_readdir+0xeb/0x160
             iterate_dir+0xdc/0x140
             SyS_getdents+0xa0/0x130
             entry_SYSCALL_64_fastpath+0x1c/0x89
      
      -> #2 (&sb->s_type->i_mutex_key#3){++++}:
             start_creating+0x59/0x110
             __debugfs_create_file+0x2e/0xe0
             relay_create_buf_file+0x62/0x80
             relay_late_setup_files+0x84/0x250
             guc_log_late_setup+0x4f/0x110 [i915]
             i915_guc_log_register+0x32/0x40 [i915]
             i915_driver_load+0x7b6/0x1720 [i915]
             i915_pci_probe+0x2e/0x90 [i915]
             pci_device_probe+0x9c/0x120
             driver_probe_device+0x2a3/0x480
             __driver_attach+0xd9/0xe0
             bus_for_each_dev+0x57/0x90
             bus_add_driver+0x168/0x260
             driver_register+0x52/0xc0
             do_one_initcall+0x39/0x150
             do_init_module+0x56/0x1ef
             load_module+0x231c/0x2d70
             SyS_finit_module+0xa5/0xe0
             entry_SYSCALL_64_fastpath+0x1c/0x89
      
      -> #1 (relay_channels_mutex){+.+.}:
             relay_open+0x12c/0x2b0
             intel_guc_log_runtime_create+0xab/0x230 [i915]
             intel_guc_init+0x81/0x120 [i915]
             intel_uc_init+0x29/0xa0 [i915]
             i915_gem_init+0x182/0x530 [i915]
             i915_driver_load+0xaa9/0x1720 [i915]
             i915_pci_probe+0x2e/0x90 [i915]
             pci_device_probe+0x9c/0x120
             driver_probe_device+0x2a3/0x480
             __driver_attach+0xd9/0xe0
             bus_for_each_dev+0x57/0x90
             bus_add_driver+0x168/0x260
             driver_register+0x52/0xc0
             do_one_initcall+0x39/0x150
             do_init_module+0x56/0x1ef
             load_module+0x231c/0x2d70
             SyS_finit_module+0xa5/0xe0
             entry_SYSCALL_64_fastpath+0x1c/0x89
      
      -> #0 (&dev->struct_mutex){+.+.}:
             __mutex_lock+0x81/0x9b0
             i915_mutex_lock_interruptible+0x47/0x130 [i915]
             i915_gem_fault+0x201/0x790 [i915]
             __do_fault+0x15/0x70
             __handle_mm_fault+0x677/0xdc0
             handle_mm_fault+0x14f/0x2f0
             __do_page_fault+0x2d1/0x560
             page_fault+0x4c/0x60
      
      other info that might help us debug this:
      
      Chain exists of:
        &dev->struct_mutex --> &sb->s_type->i_mutex_key#3 --> &mm->mmap_sem
      
       Possible unsafe locking scenario:
      
             CPU0                    CPU1
             ----                    ----
        lock(&mm->mmap_sem);
                                     lock(&sb->s_type->i_mutex_key#3);
                                     lock(&mm->mmap_sem);
        lock(&dev->struct_mutex);
      
       *** DEADLOCK ***
      
      1 lock held by debugfs_test/1388:
       #0:  (&mm->mmap_sem){++++}, at: [<0000000029a9c131>] __do_page_fault+0x106/0x560
      
      stack backtrace:
      CPU: 2 PID: 1388 Comm: debugfs_test Not tainted 4.15.0-rc6-CI-Patchwork_7614+ #1
      Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./J4205-ITX, BIOS P1.10 09/29/2016
      Call Trace:
       dump_stack+0x5f/0x86
       print_circular_bug.isra.18+0x1d0/0x2c0
       __lock_acquire+0x14ae/0x1b60
       ? lock_acquire+0xaf/0x200
       lock_acquire+0xaf/0x200
       ? i915_mutex_lock_interruptible+0x47/0x130 [i915]
       __mutex_lock+0x81/0x9b0
       ? i915_mutex_lock_interruptible+0x47/0x130 [i915]
       ? i915_mutex_lock_interruptible+0x47/0x130 [i915]
       ? i915_mutex_lock_interruptible+0x47/0x130 [i915]
       i915_mutex_lock_interruptible+0x47/0x130 [i915]
       ? __pm_runtime_resume+0x4f/0x80
       i915_gem_fault+0x201/0x790 [i915]
       __do_fault+0x15/0x70
       ? _raw_spin_unlock+0x29/0x40
       __handle_mm_fault+0x677/0xdc0
       handle_mm_fault+0x14f/0x2f0
       __do_page_fault+0x2d1/0x560
       ? page_fault+0x36/0x60
       page_fault+0x4c/0x60
      
      v2: Added lock protection to guc->log.runtime.relay_chan (Chris)
          Fixed locking inside guc_flush_logs uncovered by new lockdep.
      
      v3: Locking guc_read_update_log_buffer entirely with relay_lock. (Chris)
          Prepared intel_guc_init_early. Moved relay_lock inside relay_create
          relay_destroy, relay_file_create, guc_read_update_log_buffer. (Michal)
          Removed struct_mutex lock around guc_log_flush and removed usage
          of guc_log_has_relay() from runtime_create path as it needs
          struct_mutex lock.
      
      v4: Handle NULL relay sub buffer pointer earlier in read_update_log_buffer
          (Chris). Fixed comment suffix **/. (Michal)
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104693
      Testcase: igt/debugfs_test/read_all_entries # with enable_guc=1 and guc_log_level=1
      Signed-off-by: NSagar Arun Kamble <sagar.a.kamble@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Marta Lofstedt <marta.lofstedt@intel.com>
      Cc: Michal Winiarski <michal.winiarski@intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/1516808821-3638-3-git-send-email-sagar.a.kamble@intel.com
      70deeadd
  15. 24 1月, 2018 1 次提交
  16. 20 1月, 2018 1 次提交
  17. 13 1月, 2018 2 次提交
  18. 03 1月, 2018 1 次提交
  19. 29 12月, 2017 2 次提交
  20. 22 12月, 2017 2 次提交
  21. 19 12月, 2017 2 次提交
  22. 18 12月, 2017 1 次提交
  23. 12 12月, 2017 1 次提交
  24. 11 12月, 2017 2 次提交
  25. 09 12月, 2017 1 次提交
  26. 08 12月, 2017 1 次提交
  27. 22 11月, 2017 1 次提交