1. 19 Aug, 2016 3 commits
    • Chris Wilson's avatar
      drm/i915/fbc: Don't set an illegal fence if unfenced · 12ecf4b9
      Chris Wilson authored
      If the frontbuffer doesn't have an associated fence, it will have a
      fence reg of -1. If we attempt to OR in this register into the FBC
      control register we end up setting all control bits, oops!
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com>
      Reviwed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160819155428.1670-2-chris@chris-wilson.co.uk
      12ecf4b9
    • Chris Wilson's avatar
      drm/i915: Flush delayed fence releases after reset · 4fc788f5
      Chris Wilson authored
      What I never hit in testing, but Mika immediately did, was a GPU hang
      with a pending fence release (where a tiled object has been changed by
      the user to be untiled, and the update has not yet been committed to the
      fence register). As the stride/tiling is 0, this causes a divide-by-zero
      error when trying to write the new fence parameters:
      
      [   28.784518] drm/i915: Resetting chip after gpu hang
      [   28.784551] divide error: 0000 [#1] PREEMPT SMP
      [   28.784565] Modules linked in: nls_iso8859_1 nls_cp437 vfat fat mxm_wmi x86_pkg_temp_thermal snd_hda_codec_hdmi kvm irqbypass snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec serio_raw snd_hwdep snd_hda_core snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_timer snd_seq_device snd soundcore mac_hid wmi efivarfs autofs4 raid10 raid456 libcrc32c async_raid6_recov async_memcpy async_pq raid6_pq async_xor xor async_tx raid0 multipath linear psmouse e1000e ptp pps_core nvme nvme_core i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm video
      [   28.784738] CPU: 0 PID: 1692 Comm: kworker/0:2 Not tainted 4.8.0-rc2+ #895
      [   28.784752] Hardware name: System manufacturer System Product Name/Z170M-PLUS, BIOS 1803 05/09/2016
      [   28.784786] Workqueue: events_long i915_hangcheck_elapsed [i915]
      [   28.784814] task: ffff923c18f59d40 task.stack: ffff923c1b7e4000
      [   28.784827] RIP: 0010:[<ffffffffc0475b5f>]  [<ffffffffc0475b5f>] fence_write+0x9f/0x3b0 [i915]
      [   28.784854] RSP: 0018:ffff923c1b7e7b30  EFLAGS: 00010246
      [   28.784866] RAX: 00000000008ca000 RBX: ffff923c18540000 RCX: 0000000000000020
      [   28.784880] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000596d000
      [   28.784894] RBP: ffff923c1b7e7b68 R08: 0000000000000000 R09: 0000000000000000
      [   28.784908] R10: 0000000000000000 R11: 00000000008ca000 R12: ffff923c1ef9d600
      [   28.784921] R13: 0000000000100040 R14: 0000000000100044 R15: ffff923c18549908
      [   28.784935] FS:  0000000000000000(0000) GS:ffff923c36c00000(0000) knlGS:0000000000000000
      [   28.784951] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   28.784962] CR2: 00007f193373c893 CR3: 0000000419c78000 CR4: 00000000003406f0
      [   28.784976] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [   28.784990] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [   28.785004] Stack:
      [   28.785009]  000000000596c03b ffff923c1b7e7b68 ffff923c18549938 0000000000000009
      [   28.785026]  ffff923c18540000 ffff923c18549280 ffff923c18547ce8 ffff923c1b7e7b90
      [   28.785044]  ffffffffc04761f9 ffff923c18540000 ffff923c18547d00 ffff923c18548ff8
      [   28.785062] Call Trace:
      [   28.785078]  [<ffffffffc04761f9>] i915_gem_restore_fences+0x39/0x50 [i915]
      [   28.785102]  [<ffffffffc047fe89>] i915_gem_reset+0x179/0x300 [i915]
      Reported-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
      Fixes: 49ef5294 ("drm/i915: Move fence tracking from object to vma")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160819155428.1670-1-chris@chris-wilson.co.uk
      4fc788f5
    • Dave Gordon's avatar
      drm/i915: Reattach comment, complete type specification · 0be81156
      Dave Gordon authored
      In the recent patch
      bc3d6744 drm/i915: Allow userspace to request no-error-capture upon ...
      the final version moved the flags and the associated #defines around
      so they were adjacent; unfortunately, they ended up between a comment
      and the thing (hw_id) to which the comment applies :(
      
      So this patch reshuffles the comment and subject back together.
      
      Also, as we're touching 'hw_id', let's change it from just 'unsigned'
      to a fully-specified 'unsigned int', because some code checking tools
      (including checkpatch) object to plain 'unsigned'.
      
      Fixes: bc3d6744 ("drm/i915: Allow userspace to request no-error-capture...")
      Signed-off-by: default avatarDave Gordon <david.s.gordon@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/1471616622-6919-1-git-send-email-david.s.gordon@intel.comReviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      0be81156
  2. 18 Aug, 2016 37 commits