1. 02 3月, 2017 1 次提交
  2. 28 2月, 2017 2 次提交
    • C
      drm/i915: Delay disabling the user interrupt for breadcrumbs · 67b807a8
      Chris Wilson 提交于
      A significant cost in setting up a wait is the overhead of enabling the
      interrupt. As we disable the interrupt whenever the queue of waiters is
      empty, if we are frequently waiting on alternating batches, we end up
      re-enabling the interrupt on a frequent basis. We do want to disable the
      interrupt during normal operations as under high load it may add several
      thousand interrupts/s - we have been known in the past to occupy whole
      cores with our interrupt handler after accidentally leaving user
      interrupts enabled. As a compromise, leave the interrupt enabled until
      the next IRQ, or the system is idle. This gives a small window for a
      waiter to keep the interrupt active and not be delayed by having to
      re-enable the interrupt.
      
      v2: Restore hangcheck/missed-irq detection for continuations
      v3: Be more careful restoring the hangcheck timer after reset
      v4: Be more careful restoring the fake irq after reset (if required!)
      v5: Redo changes to intel_engine_wakeup()
      v6: Factor out __intel_engine_wakeup()
      v7: Improve commentary for declaring a missed wakeup
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170227205850.2828-4-chris@chris-wilson.co.uk
      67b807a8
    • C
      drm/i915: Signal first fence from irq handler if complete · 56299fb7
      Chris Wilson 提交于
      As execlists and other non-semaphore multi-engine devices coordinate
      between engines using interrupts, we can shave off a few 10s of
      microsecond of scheduling latency by doing the fence signaling from the
      interrupt as opposed to a RT kthread. (Realistically the delay adds
      about 1% to an individual cross-engine workload.) We only signal the
      first fence in order to limit the amount of work we move into the
      interrupt handler. We also have to remember that our breadcrumbs may be
      unordered with respect to the interrupt and so we still require the
      waiter process to perform some heavyweight coherency fixups, as well as
      traversing the tree of waiters.
      
      v2: No need for early exit in irq handler - it breaks the flow between
      patches and prevents the tracepoint
      v3: Restore rcu hold across irq signaling of request
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170227205850.2828-2-chris@chris-wilson.co.uk
      56299fb7
  3. 21 2月, 2017 1 次提交
  4. 17 2月, 2017 1 次提交
  5. 16 2月, 2017 2 次提交
    • I
      drm/i915/gen9+: Enable hotplug detection early · 2a57d9cc
      Imre Deak 提交于
      For LSPCON resume time initialization we need to sample the
      corresponding pin's HPD level, but this is only available when HPD
      detection is enabled. Currently we enable detection only when enabling
      HPD interrupts which is too late, so bring the enabling of detection
      earlier.
      
      This is needed by the next patch.
      
      Cc: Shashank Sharma <shashank.sharma@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: <stable@vger.kernel.org> # v4.9+
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NShashank Sharma <shashank.sharma@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1485509961-9010-2-git-send-email-imre.deak@intel.com
      (cherry picked from commit 7fff8126)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      2a57d9cc
    • C
      drm/i915: Only enable hotplug interrupts if the display interrupts are enabled · 262fd485
      Chris Wilson 提交于
      In order to prevent accessing the hpd registers outside of the display
      power wells, we should refrain from writing to the registers before the
      display interrupts are enabled.
      
      [    4.740136] WARNING: CPU: 1 PID: 221 at drivers/gpu/drm/i915/intel_uncore.c:795 __unclaimed_reg_debug+0x44/0x50 [i915]
      [    4.740155] Unclaimed read from register 0x1e1110
      [    4.740168] Modules linked in: i915(+) intel_gtt drm_kms_helper prime_numbers
      [    4.740190] CPU: 1 PID: 221 Comm: systemd-udevd Not tainted 4.10.0-rc6+ #384
      [    4.740203] Hardware name:                  /        , BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015
      [    4.740220] Call Trace:
      [    4.740236]  dump_stack+0x4d/0x6f
      [    4.740251]  __warn+0xc1/0xe0
      [    4.740265]  warn_slowpath_fmt+0x4a/0x50
      [    4.740281]  ? insert_work+0x77/0xc0
      [    4.740355]  ? fwtable_write32+0x90/0x130 [i915]
      [    4.740431]  __unclaimed_reg_debug+0x44/0x50 [i915]
      [    4.740507]  fwtable_read32+0xd8/0x130 [i915]
      [    4.740575]  i915_hpd_irq_setup+0xa5/0x100 [i915]
      [    4.740649]  intel_hpd_init+0x68/0x80 [i915]
      [    4.740716]  i915_driver_load+0xe19/0x1380 [i915]
      [    4.740784]  i915_pci_probe+0x32/0x90 [i915]
      [    4.740799]  pci_device_probe+0x8b/0xf0
      [    4.740815]  driver_probe_device+0x2b6/0x450
      [    4.740828]  __driver_attach+0xda/0xe0
      [    4.740841]  ? driver_probe_device+0x450/0x450
      [    4.740853]  bus_for_each_dev+0x5b/0x90
      [    4.740865]  driver_attach+0x19/0x20
      [    4.740878]  bus_add_driver+0x166/0x260
      [    4.740892]  driver_register+0x5b/0xd0
      [    4.740906]  ? 0xffffffffa0166000
      [    4.740920]  __pci_register_driver+0x47/0x50
      [    4.740985]  i915_init+0x5c/0x5e [i915]
      [    4.740999]  do_one_initcall+0x3e/0x160
      [    4.741015]  ? __vunmap+0x7c/0xc0
      [    4.741029]  ? kmem_cache_alloc+0xcf/0x120
      [    4.741045]  do_init_module+0x55/0x1c4
      [    4.741060]  load_module+0x1f3f/0x25b0
      [    4.741073]  ? __symbol_put+0x40/0x40
      [    4.741086]  ? kernel_read_file+0x100/0x190
      [    4.741100]  SYSC_finit_module+0xbc/0xf0
      [    4.741112]  SyS_finit_module+0x9/0x10
      [    4.741125]  entry_SYSCALL_64_fastpath+0x17/0x98
      [    4.741135] RIP: 0033:0x7f8559a140f9
      [    4.741145] RSP: 002b:00007fff7509a3e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
      [    4.741161] RAX: ffffffffffffffda RBX: 00007f855aba02d1 RCX: 00007f8559a140f9
      [    4.741172] RDX: 0000000000000000 RSI: 000055b6db0914f0 RDI: 0000000000000011
      [    4.741183] RBP: 0000000000020000 R08: 0000000000000000 R09: 000000000000000e
      [    4.741193] R10: 0000000000000011 R11: 0000000000000246 R12: 000055b6db0854d0
      [    4.741204] R13: 000055b6db091150 R14: 0000000000000000 R15: 000055b6db035924
      
      v2: Set dev_priv->display_irqs_enabled to true for all platforms other
      than vlv/chv that manually control the display power domain.
      
      Fixes: 19625e85 ("drm/i915: Enable polling when we don't have hpd")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97798Suggested-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Lyude <cpaul@redhat.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Hans de Goede <jwrdegoede@fedoraproject.org>
      Cc: stable@vger.kernel.org
      Link: http://patchwork.freedesktop.org/patch/msgid/20170215131547.5064-1-chris@chris-wilson.co.ukReviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      262fd485
  6. 15 2月, 2017 2 次提交
  7. 11 2月, 2017 1 次提交
    • L
      drm/i915/debugfs: Add i915_hpd_storm_ctl · 317eaa95
      Lyude 提交于
      This adds a file in i915's debugfs directory that allows userspace to
      manually control HPD storm detection. This is mainly for hotplugging
      tests, where we might want to test HPD storm functionality or disable
      storm detection to speed up hotplugging tests without breaking anything.
      
      Changes since v1:
      - Make HPD storm interval configurable
      - Misc code cleanup
      Signed-off-by: NLyude <lyude@redhat.com>
      Acked-by: NJani Nikula <jani.nikula@linux.intel.com>
      Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
      317eaa95
  8. 06 2月, 2017 2 次提交
  9. 27 1月, 2017 1 次提交
  10. 24 1月, 2017 2 次提交
  11. 20 1月, 2017 1 次提交
  12. 12 1月, 2017 1 次提交
  13. 11 1月, 2017 2 次提交
  14. 02 12月, 2016 1 次提交
  15. 26 11月, 2016 1 次提交
  16. 17 11月, 2016 1 次提交
  17. 11 11月, 2016 2 次提交
  18. 02 11月, 2016 1 次提交
  19. 01 11月, 2016 4 次提交
    • V
      drm/i915: Always use intel_get_crtc_for_pipe() · 98187836
      Ville Syrjälä 提交于
      Replace the open coded dev_priv->pipe_to_crtc_mapping[] usage with
      intel_get_crtc_for_pipe().
      
      Mostly done with coccinelle, with a few manual tweaks
      
      @@
      expression E1, E2;
      @@
      (
      - E1->pipe_to_crtc_mapping[E2]
      + intel_get_crtc_for_pipe(E1, E2)
      |
      - E1->plane_to_crtc_mapping[E2]
      + intel_get_crtc_for_plane(E1, E2)
      )
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1477946245-14134-12-git-send-email-ville.syrjala@linux.intel.comReviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      98187836
    • V
    • V
      drm/i915: Store struct intel_crtc * in {pipe,plane}_to_crtc_mapping[] · e2af48c6
      Ville Syrjälä 提交于
      A lot of users of the {pipe,plane}_to_crtc_mapping[] will end up
      casting the result to intel_crtc, so let's just store the intel_crtc
      pointer in the first place.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1477946245-14134-7-git-send-email-ville.syrjala@linux.intel.comReviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      e2af48c6
    • C
      drm/i915: Avoid accessing request->timeline outside of its lifetime · cb399eab
      Chris Wilson 提交于
      Whilst waiting on a request, we may do so without holding any locks or
      any guards beyond a reference to the request. In order to avoid taking
      locks within request deallocation, we drop references to its timeline
      (via the context and ppgtt) upon retirement. We should avoid chasing
      such pointers outside of their control, in particular we inspect the
      request->timeline to see if we may restore the RPS waitboost for a
      client. If we instead look at the engine->timeline, we will have similar
      behaviour on both full-ppgtt and !full-ppgtt systems and reduce the
      amount of reward we give towards stalling clients (i.e. only if the
      client stalls and the GPU is uncontended does it reclaim its boost).
      This restores behaviour back to pre-timelines, whilst fixing:
      
      [  645.078485] BUG: KASAN: use-after-free in i915_gem_object_wait_fence+0x1ee/0x2e0 at addr ffff8802335643a0
      [  645.078577] Read of size 4 by task gem_exec_schedu/28408
      [  645.078638] CPU: 1 PID: 28408 Comm: gem_exec_schedu Not tainted 4.9.0-rc2+ #64
      [  645.078724] Hardware name:                  /        , BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015
      [  645.078816]  ffff88022daef9a0 ffffffff8143d059 ffff880235402a80 ffff880233564200
      [  645.078998]  ffff88022daef9c8 ffffffff81229c5c ffff88022daefa48 ffff880233564200
      [  645.079172]  ffff880235402a80 ffff88022daefa38 ffffffff81229ef0 000000008110a796
      [  645.079345] Call Trace:
      [  645.079404]  [<ffffffff8143d059>] dump_stack+0x68/0x9f
      [  645.079467]  [<ffffffff81229c5c>] kasan_object_err+0x1c/0x70
      [  645.079534]  [<ffffffff81229ef0>] kasan_report_error+0x1f0/0x4b0
      [  645.079601]  [<ffffffff8122a244>] kasan_report+0x34/0x40
      [  645.079676]  [<ffffffff81634f5e>] ? i915_gem_object_wait_fence+0x1ee/0x2e0
      [  645.079741]  [<ffffffff81229951>] __asan_load4+0x61/0x80
      [  645.079807]  [<ffffffff81634f5e>] i915_gem_object_wait_fence+0x1ee/0x2e0
      [  645.079876]  [<ffffffff816364bf>] i915_gem_object_wait+0x19f/0x590
      [  645.079944]  [<ffffffff81636320>] ? i915_gem_object_wait_priority+0x500/0x500
      [  645.080016]  [<ffffffff8110fb30>] ? debug_show_all_locks+0x1e0/0x1e0
      [  645.080084]  [<ffffffff8110abdc>] ? check_chain_key+0x14c/0x210
      [  645.080157]  [<ffffffff8110a796>] ? __lock_is_held+0x46/0xc0
      [  645.080226]  [<ffffffff8163bc61>] ? i915_gem_set_domain_ioctl+0x141/0x690
      [  645.080296]  [<ffffffff8163bcc2>] i915_gem_set_domain_ioctl+0x1a2/0x690
      [  645.080366]  [<ffffffff811f8f85>] ? __might_fault+0x75/0xe0
      [  645.080433]  [<ffffffff815a55f7>] drm_ioctl+0x327/0x640
      [  645.080508]  [<ffffffff8163bb20>] ? i915_gem_obj_prepare_shmem_write+0x3a0/0x3a0
      [  645.080603]  [<ffffffff815a52d0>] ? drm_ioctl_permit+0x120/0x120
      [  645.080670]  [<ffffffff8110abdc>] ? check_chain_key+0x14c/0x210
      [  645.080738]  [<ffffffff81275717>] do_vfs_ioctl+0x127/0xa20
      [  645.080804]  [<ffffffff8120268c>] ? do_mmap+0x47c/0x580
      [  645.080871]  [<ffffffff811da567>] ? vm_mmap_pgoff+0x117/0x140
      [  645.080938]  [<ffffffff812755f0>] ? ioctl_preallocate+0x150/0x150
      [  645.081011]  [<ffffffff81108c53>] ? up_write+0x23/0x50
      [  645.081078]  [<ffffffff811da567>] ? vm_mmap_pgoff+0x117/0x140
      [  645.081145]  [<ffffffff811da450>] ? vma_is_stack_for_current+0x90/0x90
      [  645.081214]  [<ffffffff8110d853>] ? mark_held_locks+0x23/0xc0
      [  645.082030]  [<ffffffff81288408>] ? __fget+0x168/0x250
      [  645.082106]  [<ffffffff819ad517>] ? entry_SYSCALL_64_fastpath+0x5/0xb1
      [  645.082176]  [<ffffffff81288592>] ? __fget_light+0xa2/0xc0
      [  645.082242]  [<ffffffff8127604c>] SyS_ioctl+0x3c/0x70
      [  645.082309]  [<ffffffff819ad52e>] entry_SYSCALL_64_fastpath+0x1c/0xb1
      [  645.082374] Object at ffff880233564200, in cache kmalloc-8192 size: 8192
      [  645.082431] Allocated:
      [  645.082480] PID = 28408
      [  645.082535]  [  645.082566] [<ffffffff8103ae66>] save_stack_trace+0x16/0x20
      [  645.082623]  [  645.082656] [<ffffffff81228b06>] save_stack+0x46/0xd0
      [  645.082716]  [  645.082756] [<ffffffff812292fd>] kasan_kmalloc+0xad/0xe0
      [  645.082817]  [  645.082848] [<ffffffff81631752>] i915_ppgtt_create+0x52/0x220
      [  645.082908]  [  645.082941] [<ffffffff8161db96>] i915_gem_create_context+0x396/0x560
      [  645.083027]  [  645.083059] [<ffffffff8161f857>] i915_gem_context_create_ioctl+0x97/0xf0
      [  645.083152]  [  645.083183] [<ffffffff815a55f7>] drm_ioctl+0x327/0x640
      [  645.083243]  [  645.083274] [<ffffffff81275717>] do_vfs_ioctl+0x127/0xa20
      [  645.083334]  [  645.083372] [<ffffffff8127604c>] SyS_ioctl+0x3c/0x70
      [  645.083432]  [  645.083464] [<ffffffff819ad52e>] entry_SYSCALL_64_fastpath+0x1c/0xb1
      [  645.083551] Freed:
      [  645.083599] PID = 27629
      [  645.083648]  [  645.083676] [<ffffffff8103ae66>] save_stack_trace+0x16/0x20
      [  645.083738]  [  645.083770] [<ffffffff81228b06>] save_stack+0x46/0xd0
      [  645.083830]  [  645.083862] [<ffffffff81229203>] kasan_slab_free+0x73/0xc0
      [  645.083922]  [  645.083961] [<ffffffff812279c9>] kfree+0xa9/0x170
      [  645.084021]  [  645.084053] [<ffffffff81629f60>] i915_ppgtt_release+0x100/0x180
      [  645.084139]  [  645.084171] [<ffffffff8161d414>] i915_gem_context_free+0x1b4/0x230
      [  645.084257]  [  645.084288] [<ffffffff816537b2>] intel_lr_context_unpin+0x192/0x230
      [  645.084380]  [  645.084413] [<ffffffff81645250>] i915_gem_request_retire+0x620/0x630
      [  645.084500]  [  645.085226] [<ffffffff816473d1>] i915_gem_retire_requests+0x181/0x280
      [  645.085313]  [  645.085352] [<ffffffff816352ba>] i915_gem_retire_work_handler+0xca/0xe0
      [  645.085440]  [  645.085471] [<ffffffff810c725b>] process_one_work+0x4fb/0x920
      [  645.085532]  [  645.085562] [<ffffffff810c770d>] worker_thread+0x8d/0x840
      [  645.085622]  [  645.085653] [<ffffffff810d21e5>] kthread+0x185/0x1b0
      [  645.085718]  [  645.085750] [<ffffffff819ad7a7>] ret_from_fork+0x27/0x40
      [  645.085811] Memory state around the buggy address:
      [  645.085869]  ffff880233564280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
      [  645.085956]  ffff880233564300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
      [  645.086053] >ffff880233564380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
      [  645.086138]                                ^
      [  645.086193]  ffff880233564400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
      [  645.086283]  ffff880233564480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
      
      v2: Add a comment to document the hint like nature of
       intel_engine_last_submit()
      
      Fixes: 73cb9701 ("drm/i915: Combine seqno + tracking into a global timeline struct")
      Fixes: 80b204bc ("drm/i915: Enable multiple timelines")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20161101100317.11129-1-chris@chris-wilson.co.uk
      cb399eab
  20. 29 10月, 2016 1 次提交
  21. 27 10月, 2016 1 次提交
  22. 25 10月, 2016 4 次提交
    • 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
    • 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: Add low level set of routines for programming PM IER/IIR/IMR register set · f4e9af4f
      Akash Goel 提交于
      So far PM IER/IIR/IMR registers were being used only for Turbo related
      interrupts. But interrupts coming from GuC also use the same set.
      As a precursor to supporting GuC interrupts, added new low level routines
      so as to allow sharing the programming of PM IER/IIR/IMR registers between
      Turbo & GuC.
      Also similar to PM IMR, maintaining a bitmask for PM IER register, to allow
      easy sharing of it between Turbo & GuC without involving a rmw operation.
      
      v2:
      - For appropriateness & avoid any ambiguity, rename old functions
        enable/disable pm_irq to mask/unmask pm_irq and rename new functions
        enable/disable pm_interrupts to enable/disable pm_irq. (Tvrtko)
      - Use u32 in place of uint32_t. (Tvrtko)
      
      v3:
      - Rename the fields pm_irq_mask & pm_ier_mask and do some cleanup. (Chris)
      - Rebase.
      
      v4: Fix the inadvertent disabling of User interrupt for VECS ring causing
          failure for certain IGTs.
      
      v5: Use dev_priv with HAS_VEBOX macro. (Tvrtko)
      Suggested-by: NChris Wilson <chris@chris-wilson.co.uk>
      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>
      f4e9af4f
  23. 20 10月, 2016 1 次提交
  24. 14 10月, 2016 4 次提交