1. 07 Mar, 2017 2 commits
  2. 06 Mar, 2017 6 commits
    • Chris Wilson's avatar
      drm/i915: Take rpm wakelock for releasing the fence on unbind · 181df2d4
      Chris Wilson authored
      Unbind the vma may happen at any time, outside of the normal GT wakeref.
      As such it relies on having a wakeref of its own. However, we can forgo
      clearing the register whilst the device is asleep and just mark it as
      unused - so that when we do wake up the device, we will clear the unused
      fence register (see i915_gem_restore_fences).
      
      [22423.944631] WARNING: CPU: 3 PID: 26178 at drivers/gpu/drm/i915/intel_drv.h:1739 i915_vma_put_fence+0xf3/0x100 [i915]
      [22423.946053] RPM wakelock ref not held during HW access
      [22423.946056] Modules linked in: vgem(E) i915(E) nls_ascii(E) nls_cp437(E) vfat(E) fat(E) x86_pkg_temp_thermal(E) crct10dif_pclmul(E) crc32_pclmul(E) crc32c_intel(E) ghash_clmulni_intel(E) intel_gtt(E) i2c_algo_bit(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) evdev(E) aesni_intel(E) aes_x86_64(E) crypto_simd(E) cryptd(E) glue_helper(E) sysimgblt(E) fb_sys_fops(E) prime_numbers(E) drm(E) efivars(E) mei_me(E) lpc_ich(E) mei(E) mfd_core(E) battery(E) video(E) acpi_pad(E) button(E) tpm_tis(E) tpm_tis_core(E) tpm(E) autofs4(E) i2c_i801(E) thermal(E) fan(E) i2c_designware_platform(E) i2c_designware_core(E)
      [22423.946438] CPU: 2 PID: 26178 Comm: gem_concurrent_ Tainted: G            E   4.10.0+ #101
      [22423.946513] Hardware name: ��������������������������������� ���������������������������������/���������������������������������, BIOS RYBDWi35.86A.0246.2
      [22423.946600] Call Trace:
      [22423.946641]  dump_stack+0x68/0x9f
      [22423.946703]  __warn+0x107/0x130
      [22423.946763]  warn_slowpath_fmt+0xa8/0xe0
      [22423.946825]  ? __warn+0x130/0x130
      [22423.946868]  ? free_hot_cold_page_list+0x53/0x70
      [22423.946942]  ? mark_lock+0xcc/0x7f0
      [22423.946997]  ? __lock_is_held+0x84/0x100
      [22423.947115]  ? i915_vma_put_fence+0x64/0x100 [i915]
      [22423.947224]  i915_vma_put_fence+0xf3/0x100 [i915]
      [22423.947335]  i915_vma_unbind+0x4da/0x560 [i915]
      [22423.947387]  ? rb_erase+0x812/0x8a0
      [22423.947439]  ? kfree+0xa2/0xd0
      [22423.947562]  i915_vma_close+0x159/0x180 [i915]
      [22423.947674]  intel_ring_free+0x31/0x50 [i915]
      [22423.947776]  i915_gem_context_free+0x1ff/0x3d0 [i915]
      [22423.947887]  context_close+0x106/0x110 [i915]
      [22423.947989]  context_idr_cleanup+0xc/0x10 [i915]
      [22423.948041]  idr_for_each+0x14d/0x1d0
      [22423.948158]  ? context_close+0x110/0x110 [i915]
      [22423.948206]  ? get_from_free_list+0x70/0x70
      [22423.948261]  ? __lock_is_held+0x84/0x100
      [22423.948325]  ? __mutex_unlock_slowpath+0xd4/0x400
      [22423.948448]  i915_gem_context_close+0x4b/0x90 [i915]
      [22423.948544]  i915_driver_preclose+0x28/0x50 [i915]
      [22423.948620]  drm_release+0x175/0x690 [drm]
      [22423.948681]  ? fcntl_setlk+0x5e0/0x5e0
      [22423.948746]  __fput+0x17d/0x300
      [22423.948807]  ____fput+0x9/0x10
      [22423.948859]  task_work_run+0xa7/0xe0
      [22423.948924]  do_exit+0x4d2/0x13e0
      [22423.948986]  ? mm_update_next_owner+0x320/0x320
      [22423.949051]  ? __do_page_fault+0x209/0x5c0
      [22423.949110]  ? mark_held_locks+0x23/0xc0
      [22423.949166]  ? entry_SYSCALL_64_fastpath+0x5/0xb1
      [22423.949232]  do_group_exit+0x93/0x160
      [22423.949289]  SyS_exit_group+0x18/0x20
      [22423.949350]  entry_SYSCALL_64_fastpath+0x1c/0xb1
      [22423.949403] RIP: 0033:0x7f9cc2e154c8
      [22423.949484] RSP: 002b:00007ffd7e81b448 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
      [22423.949557] RAX: ffffffffffffffda RBX: ffffffff810ef1f0 RCX: 00007f9cc2e154c8
      [22423.949617] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
      [22423.949677] RBP: ffff880367e9ff98 R08: 00000000000000e7 R09: ffffffffffffff88
      [22423.949741] R10: 00007f9cc1d5c000 R11: 0000000000000246 R12: 00007f9cc30f6c30
      [22423.949798] R13: 0000000000000000 R14: 00007f9cc30f6c20 R15: 0000000000000003
      [22423.949868]  ? trace_hardirqs_off_caller+0xc0/0x110
      
      v2: Move the rpm check down a layer so that we still perform the
      vma/fence update required for the deferred mmio write on resume.
      v3: Don't touch i915_gem_object_set_cache_level() and leave the rpm to
      the low level routines (such as i915_vma_put_fence).
      v4: vma may be null in fence_write, so extract drm_i915_private from
      fence->i915
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170306092916.11623-3-chris@chris-wilson.co.ukReviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      181df2d4
    • Chris Wilson's avatar
      drm/i915: Wake up all waiters before idling · e1c0c91b
      Chris Wilson authored
      When we idle, we wakeup the first waiter (checking to see if it missed
      an earlier wakeup) and disarm the breadcrumbs. However, we now assert
      that there are no waiter when the interrupt is disabled, triggering an
      assert if there were multiple waiters when we idled.
      
      [  420.842275] invalid opcode: 0000 [#1] PREEMPT SMP
      [  420.842285] Modules linked in: vgem snd_hda_codec_realtek x86_pkg_temp_thermal snd_hda_codec_generic intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_hda_codec snd_hwdep mei_me snd_hda_core mei snd_pcm lpc_ich i915 r8169 mii prime_numbers
      [  420.842357] CPU: 4 PID: 8714 Comm: kms_pipe_crc_ba Tainted: G     U  W       4.10.0-CI-CI_DRM_2280+ #1
      [  420.842377] Hardware name: Hewlett-Packard HP Pro 3500 Series/2ABF, BIOS 8.11 10/24/2012
      [  420.842395] task: ffff880117ddce40 task.stack: ffffc90001114000
      [  420.842439] RIP: 0010:__intel_engine_remove_wait+0x1f4/0x200 [i915]
      [  420.842454] RSP: 0018:ffffc90001117b18 EFLAGS: 00010046
      [  420.842467] RAX: 0000000000000000 RBX: ffff88010c25c2a8 RCX: 0000000000000001
      [  420.842481] RDX: 0000000000000001 RSI: 00000000ffffffff RDI: ffffc90001117c50
      [  420.842495] RBP: ffffc90001117b58 R08: 0000000011e52352 R09: c4d16acc00000000
      [  420.842511] R10: ffffffff82789eb0 R11: ffff880117ddce40 R12: ffffc90001117c50
      [  420.842525] R13: ffffc90001117c50 R14: 0000000000000078 R15: 0000000000000000
      [  420.842540] FS:  00007fe47dda0a40(0000) GS:ffff88011fb00000(0000) knlGS:0000000000000000
      [  420.842559] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  420.842571] CR2: 00007fd6c0a2cec4 CR3: 000000010a5e5000 CR4: 00000000001406e0
      [  420.842586] Call Trace:
      [  420.842595]  ? do_raw_spin_lock+0xad/0xb0
      [  420.842635]  intel_engine_remove_wait.part.3+0x26/0x40 [i915]
      [  420.842678]  intel_engine_remove_wait+0xe/0x20 [i915]
      [  420.842721]  i915_wait_request+0x4f0/0x8c0 [i915]
      [  420.842736]  ? wake_up_q+0x70/0x70
      [  420.842747]  ? wake_up_q+0x70/0x70
      [  420.842787]  i915_gem_object_wait_fence+0x7d/0x1a0 [i915]
      [  420.842829]  i915_gem_object_wait+0x30d/0x520 [i915]
      [  420.842842]  ? __this_cpu_preempt_check+0x13/0x20
      [  420.842884]  i915_gem_wait_ioctl+0x12e/0x2e0 [i915]
      [  420.842924]  ? i915_gem_wait_ioctl+0x22/0x2e0 [i915]
      [  420.842939]  drm_ioctl+0x200/0x450
      [  420.842976]  ? i915_gem_set_wedged+0x90/0x90 [i915]
      [  420.842993]  do_vfs_ioctl+0x90/0x6e0
      [  420.843003]  ? entry_SYSCALL_64_fastpath+0x5/0xb1
      [  420.843017]  ? __this_cpu_preempt_check+0x13/0x20
      [  420.843030]  ? trace_hardirqs_on_caller+0xe7/0x200
      [  420.843042]  SyS_ioctl+0x3c/0x70
      [  420.843054]  entry_SYSCALL_64_fastpath+0x1c/0xb1
      [  420.843065] RIP: 0033:0x7fe47c4b9357
      [  420.843075] RSP: 002b:00007ffc3c0633c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      [  420.843094] RAX: ffffffffffffffda RBX: ffffffff81482393 RCX: 00007fe47c4b9357
      [  420.843109] RDX: 00007ffc3c063400 RSI: 00000000c010646c RDI: 0000000000000004
      [  420.843123] RBP: ffffc90001117f88 R08: 0000000000000008 R09: 0000000000000000
      [  420.843137] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
      [  420.843151] R13: 0000000000000004 R14: 00000000c010646c R15: 0000000000000000
      [  420.843168]  ? __this_cpu_preempt_check+0x13/0x20
      [  420.843180] Code: 81 48 c7 c1 40 6a 16 a0 48 c7 c2 47 29 15 a0 be 17 01 00 00 48 c7 c7 10 6a 16 a0 e8 c7 ea fe e0 e9 5d ff ff ff 0f 0b 0f 0b 0f 0b <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 e8 67 41 7e e1
      [  420.843325] RIP: __intel_engine_remove_wait+0x1f4/0x200 [i915] RSP: ffffc90001117b18
      
      Fixes: b66255f0 ("drm/i915: Refactor wakeup of the next breadcrumb waiter")
      Fixes: 67b807a8 ("drm/i915: Delay disabling the user interrupt for breadcrumbs")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170306092916.11623-2-chris@chris-wilson.co.ukReviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
      e1c0c91b
    • Maarten Lankhorst's avatar
      drm/i915: Complain if we take too long under vblank evasion. · e1edbd44
      Maarten Lankhorst authored
      Instead of only complaining when we actually miss a vblank, always
      complain if we take longer than 100 us. This will make it easier to
      find cases where we potentially miss vblanks.
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1488292128-14540-2-git-send-email-maarten.lankhorst@linux.intel.comReviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      [mlankhorst: Add commit message.]
      e1edbd44
    • Maarten Lankhorst's avatar
      drm/i915: Move updating color management to before vblank evasion · 567f0792
      Maarten Lankhorst authored
      This cannot be done reliably during vblank evasasion
      since the color management registers are not double buffered.
      
      The original commit that moved it always during vblank evasion was
      wrong, so revert it to before vblank evasion again.
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Fixes: 20a34e78 ("drm/i915: Update color management during vblank evasion.")
      Cc: stable@vger.kernel.org # v4.7+
      Link: http://patchwork.freedesktop.org/patch/msgid/1488292128-14540-1-git-send-email-maarten.lankhorst@linux.intel.comReviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      567f0792
    • Ander Conselvan de Oliveira's avatar
      drm/i915/glk: Remove MODULE_FIRMWARE() tag from Geminilake's DMC · d9321a03
      Ander Conselvan de Oliveira authored
      Geminilake's DMC is not yet available in the linux-firmware repository.
      To prevent userspace tools such as mkinitramfs to complain about
      missing firmware, remove the MODULE_FIRMWARE() tag for now.
      
      Fixes: dbb28b5c ("drm/i915/DMC/GLK: Load DMC on GLK")
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: <drm-intel-fixes@lists.freedesktop.org>
      Signed-off-by: default avatarAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Acked-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170306085651.14008-1-ander.conselvan.de.oliveira@intel.com
      d9321a03
    • Daniel Vetter's avatar
      505b6815
  3. 03 Mar, 2017 32 commits