Skip to content
  1. Feb 08, 2018
  2. Feb 07, 2018
  3. Feb 06, 2018
    • Dave Airlie's avatar
      Merge branch 'linux-4.16' of git://github.com/skeggsb/linux into drm-next · b8a89f53
      Dave Airlie authored
      - initial kepler clock gating support
      - atomic gamma handling fixes
      - support for gp108 "secure boot" (enables acceleration, finally)
      
      * 'linux-4.16' of git://github.com/skeggsb/linux:
        drm/nouveau/clk: fix gcc-7 -Wint-in-bool-context warning
        drm/nouveau/mmu: Fix trailing semicolon
        drm/nouveau: Introduce NvPmEnableGating option
        drm/nouveau: Add support for SLCG for Kepler2
        drm/nouveau: Add support for BLCG on Kepler2
        drm/nouveau: Add support for BLCG on Kepler1
        drm/nouveau: Add support for basic clockgating on Kepler1
        drm/nouveau/kms/nv50: fix handling of gamma since atomic conversion
        drm/nouveau/kms/nv50: use INTERPOLATE_257_UNITY_RANGE LUT on newer chipsets
        drm/nouveau/kms/nv50: use "low res" lut for indexed mode
        drm/nouveau/kms/nv50: prepare for double-buffered LUTs
        drm/nouveau/bo: add helper functions for handling pinned+mapped buffers
        drm/nouveau/fbcon: add module parameter to select bits-per-pixel
        drm/nouveau/secboot/gp108: implement on top of acr_r370
        drm/nouveau/secboot/r370: implement support for booting LS SEC2 ucode
        drm/nouveau/secboot/r370: move a bunch of r375 stuff to a new implementation
        drm/nouveau: nouveau: use correct string length
        drm/nouveau/drm/nouveau/mmu: fix odd_ptr_err.cocci warnings
        drm/nouveau/pmu/fuc: don't use movw directly anymore
      b8a89f53
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-fixes-2018-02-01' of... · d6a841a4
      Dave Airlie authored
      Merge tag 'drm-intel-next-fixes-2018-02-01' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
      
      Fixes for GPU hangs and other bugs around hangcheck and result;
      Fix for regression on suspend case with vgaswitcheroo;
      Fixes for eDP and HDMI blank screens
      Fix for protecting WC allocation to avoid overflow on page vec;
      Cleanup around unpublished GLK firmware blobs, and other small fixes.
      
      This also contains GVT pull request mostly with regression
      fixes on vGPU display dmabuf, mmio switch and other misc changes.
      
      * tag 'drm-intel-next-fixes-2018-02-01' of git://anongit.freedesktop.org/drm/drm-intel: (21 commits)
        drm/i915/ppgtt: Pin page directories before allocation
        drm/i915: Always run hangcheck while the GPU is busy
        Revert "drm/i915: mark all device info struct with __initconst"
        drm/i915/edp: Do not do link training fallback or prune modes on EDP
        drm/i915: Check for fused or unused pipes
        drm/i915: Protect WC stash allocation against direct reclaim
        drm/i915: Only attempt to scan the requested number of shrinker slabs
        drm/i915: Always call to intel_display_set_init_power() in resume_early.
        drm/i915/gvt: cancel scheduler timer when no vGPU exists
        drm/i915/gvt: cancel virtual vblank timer when no vGPU exists
        drm/i915/gvt: Keep obj->dma_buf link NULL during exporting
        drm/i915/pmu: Reconstruct active state on starting busy-stats
        drm/i915: Stop getting the fault address from RING_FAULT_REG
        drm/i915/guc: Add uc_fini_wq in gem_init unwind path
        drm/i915: Fix using BIT_ULL() vs. BIT() for power domain masks
        drm/i915: Try EDID bitbanging on HDMI after failed read
        drm/i915/glk: Disable Guc and HuC on GLK
        drm/i915/gvt: Do not use I915_NUM_ENGINES to iterate over the mocs regs array
        drm/i915/gvt: validate gfn before set shadow page entry
        drm/i915/gvt: add PLANE_KEYMAX regs to mmio track list
        ...
      d6a841a4
  4. Feb 02, 2018
  5. Feb 01, 2018
    • Chris Wilson's avatar
      drm/i915/ppgtt: Pin page directories before allocation · 751b01cb
      Chris Wilson authored
      Commit e2b763ca ("drm/i915: Remove bitmap tracking for used-pdpes")
      believed that because it did not insert its freshly allocated page
      directory into the pd tree, it was safe from the shrinker. I failed to
      heed the lesson learnt from commit dd19674b
      
       ("drm/i915: Remove bitmap
      tracking for used-ptes") that we need to pin all the levels in the tree
      before hitting the shrinker or else the shrinker may free an upper layer
      as we proceed to allocate the tree. Thus leaving dangling pointers
      everywhere and a GPF should we hit direct reclaim at just the wrong
      moment.
      
      CPU: 0 PID: 7374 Comm: chromium Tainted: P           O    4.14.13-1-ARCH #1
      Hardware name: Apple Inc. MacBookPro12,1/Mac-E43C1C25D4880AD6, BIOS MBP121.88Z.0167.B33.1706181928 06/18/2017
      task: ffff994f696c2c40 task.stack: ffffb1a789d4c000
      RIP: 0010:gen8_ppgtt_set_pde.isra.40+0x48/0x70 [i915]
      RSP: 0018:ffffb1a789d4f940 EFLAGS: 00010206
      RAX: 81c1788cc4f68138 RBX: ffff994f54db8000 RCX: ffff994f696c2c40
      RDX: 000000023bc73003 RSI: ffff994d598b6b80 RDI: ffff994f54db8000
      RBP: ffff994d598b6b80 R08: 0000000000000000 R09: 0000000000000000
      R10: ffffb1a789d4f550 R11: ffff994eaf3c3208 R12: 0000000000000027
      R13: 0000000000005000 R14: 0000000004e8f000 R15: ffff994f54dba000
      FS:  00007f585886aa00(0000) GS:ffff994faec00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00000000004ac8e8 CR3: 00000002552c8004 CR4: 00000000003606f0
      Call Trace:
       gen8_ppgtt_alloc_pdp+0x178/0x320 [i915]
       gen8_ppgtt_alloc_4lvl+0x5f/0x150 [i915]
       ppgtt_bind_vma+0x30/0x70 [i915]
       i915_vma_bind+0x68/0xd0 [i915]
       __i915_vma_do_pin+0x2d6/0x3a0 [i915]
       eb_lookup_vmas+0x7a2/0xb50 [i915]
       i915_gem_do_execbuffer+0x4d7/0x10e0 [i915]
       ? sock_wfree+0x34/0x60
       ? unix_stream_read_generic+0x1f9/0x7e0
       ? import_iovec+0x37/0xd0
       ? i915_gem_execbuffer2+0x5d/0x390 [i915]
       i915_gem_execbuffer2+0x1b7/0x390 [i915]
       ? i915_gem_execbuffer+0x2d0/0x2d0 [i915]
       drm_ioctl_kernel+0x59/0xb0 [drm]
       drm_ioctl+0x2d5/0x370 [drm]
       ? i915_gem_execbuffer+0x2d0/0x2d0 [i915]
       ? __seccomp_filter+0x3b/0x260
       do_vfs_ioctl+0xa1/0x610
       ? syscall_trace_enter+0xdb/0x2b0
       SyS_ioctl+0x74/0x80
       do_syscall_64+0x55/0x110
       entry_SYSCALL64_slow_path+0x25/0x25
      RIP: 0033:0x7f584fa82d27
      RSP: 002b:00007ffee14a7828 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      RAX: ffffffffffffffda RBX: 000003b0126a1030 RCX: 00007f584fa82d27
      RDX: 00007ffee14a7870 RSI: 0000000040406469 RDI: 0000000000000080
      RBP: 00007ffee14a7870 R08: 0000000000000002 R09: 0000000000000077
      R10: 00007f5839f2b780 R11: 0000000000000246 R12: 0000000040406469
      R13: 0000000000000080 R14: 00007f5842b00040 R15: 0000000000000000
      Code: 01 00 83 81 58 0a 00 00 01 48 2b 05 13 9d fd c9 48 c1 f8 06 48 c1 e0 0c 48 8d 04 d0 48 8b 56 08 48 03 05 0c 9d fd c9 48 83 ca 03 <48> 89 10 83 a9 58 0a 00 00 01 65 ff 0d 37 03 fb 3e 74 02 f3 c3
      RIP: gen8_ppgtt_set_pde.isra.40+0x48/0x70 [i915] RSP: ffffb1a789d4f940
      
      Reported-by: default avatarEric Blau <eblau@eblau.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104773
      Fixes: e2b763ca ("drm/i915: Remove bitmap tracking for used-pdpes")
      References: dd19674b
      
       ("drm/i915: Remove bitmap tracking for used-ptes")
      Testcase: igt/drv_selftest/live_gtt (igt_ppgtt_shrink_boom)
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180131214440.7141-1-chris@chris-wilson.co.uk
      Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      (cherry picked from commit b715a2f0
      
      )
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      751b01cb
    • Chris Wilson's avatar
      drm/i915: Always run hangcheck while the GPU is busy · b26a32a8
      Chris Wilson authored
      Previously, we relied on only running the hangcheck while somebody was
      waiting on the GPU, in order to minimise the amount of time hangcheck
      had to run. (If nobody was watching the GPU, nobody would notice if the
      GPU wasn't responding -- eventually somebody would care and so kick
      hangcheck into action.) However, this falls apart from around commit
      4680816b ("drm/i915: Wait first for submission, before waiting for
      request completion"), as not all waiters declare themselves to hangcheck
      and so we could switch off hangcheck and miss GPU hangs even when
      waiting under the struct_mutex.
      
      If we enable hangcheck from the first request submission, and let it run
      until the GPU is idle again, we forgo all the complexity involved with
      only enabling around waiters. We just have to remember to be careful that
      we do not declare a GPU hang when idly waiting for the next request to
      be come ready, as we will run hangcheck continuously even when the
      engines are stalled waiting for external events. This should be true
      already as we should only be tracking requests submitted to hardware for
      execution as an indicator that the engine is busy.
      
      Fixes: 4680816b
      
       ("drm/i915: Wait first for submission, before waiting for request completion"
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104840
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180129144104.3921-1-chris@chris-wilson.co.uk
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      (cherry picked from commit 88923048
      
      )
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      b26a32a8
    • Lionel Landwerlin's avatar
      Revert "drm/i915: mark all device info struct with __initconst" · b5a756a7
      Lionel Landwerlin authored
      This reverts commit 5b54eddd
      
      .
      
       Conflicts:
      	drivers/gpu/drm/i915/i915_pci.c
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104805
      Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Fixes: 5b54eddd ("drm/i915: mark all device info struct with __initconst")
      Link: https://patchwork.freedesktop.org/patch/msgid/20180129083346.29173-1-lionel.g.landwerlin@intel.com
      (cherry picked from commit 5db47e37
      
      )
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      b5a756a7
    • Manasi Navare's avatar
      drm/i915/edp: Do not do link training fallback or prune modes on EDP · a306343b
      Manasi Navare authored
      
      
      In case of eDP because the panel has a fixed mode, the link rate
      and lane count at which it is trained corresponds to the link BW
      required to support the native resolution of the panel. In case of
      panles with lower resolutions where fewer lanes are hooked up internally,
      that number is reflected in the MAX_LANE_COUNT DPCD register of the panel.
      So it is pointless to fallback to lower link rate/lane count in case
      of link training failure on eDP connector since the lower link BW
      will not support the native resolution of the panel and we cannot
      prune the preferred mode on the eDP connector.
      
      In case of Link training failure on the eDP panel, something is wrong
      in the HW internally and hence driver errors out with a loud
      and clear DRM_ERROR message.
      
      v2:
      * Fix the DEBUG_ERROR and add {} in else (Ville Syrjala)
      
      Cc: Clinton Taylor <clinton.a.taylor@intel.com>
      Cc: Jim Bride <jim.bride@linux.intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarManasi Navare <manasi.d.navare@intel.com>
      Reviewed-by: default avatarVille Syrjala <ville.syrjala@linux.intel.com>
      Reference: https://bugs.freedesktop.org/show_bug.cgi?id=103369
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1507835618-23051-1-git-send-email-manasi.d.navare@intel.com
      (cherry picked from commit c0cfb10d
      
      )
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      a306343b
    • Mika Kahola's avatar
      drm/i915: Check for fused or unused pipes · 9965db26
      Mika Kahola authored
      
      
      We may have fused or unused pipes in our system. Let's check that the pipe
      in question is within limits of accessible pipes. In case, that we are not
      able to access the pipe, we return early with a warning.
      
      v2: Rephrasing of the commit message (Jani)
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103206
      Reported-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: default avatarJaswinder Singh Rajput <jaswinder@perfectintelligent.com>
      Suggested-by: default avatarJani Nikula <jani.nikula@intel.com>
      Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarMika Kahola <mika.kahola@intel.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1513584243-12607-1-git-send-email-mika.kahola@intel.com
      (cherry picked from commit 0b7029b7
      
      )
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: <stable@vger.kernel.org> # v4.10+
      9965db26
    • Chris Wilson's avatar
      drm/i915: Protect WC stash allocation against direct reclaim · 124804c4
      Chris Wilson authored
      As we attempt to allocate pages for use in a new WC stash, direct
      reclaim may run underneath us and fill up the WC stash. We have to be
      careful then not to overflow the pvec.
      
      Fixes: 66df1014
      
       ("drm/i915: Keep a small stash of preallocated WC pages")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103109
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180121173143.17090-1-chris@chris-wilson.co.uk
      (cherry picked from commit 073cd781
      
      )
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      124804c4
    • Chris Wilson's avatar
      drm/i915: Only attempt to scan the requested number of shrinker slabs · c5bd1fc9
      Chris Wilson authored
      Since commit 4e773c3a ("drm/i915: Wire up shrinkctl->nr_scanned"),
      we track the number of objects we scan and do not wish to exceed that as
      it will overly penalise our own slabs under mempressure. Given that we
      now know the target number of objects to scan, use that as our guide for
      deciding to shrink as opposed to the number of objects we manage to
      shrink (which doesn't correspond to the numbers we report to shrinkctl).
      
      Fixes: 4e773c3a
      
       ("drm/i915: Wire up shrinkctl->nr_scanned")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180115212455.24046-2-chris@chris-wilson.co.uk
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      (cherry picked from commit 29d384e3
      
      )
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      c5bd1fc9
    • Maarten Lankhorst's avatar
      drm/i915: Always call to intel_display_set_init_power() in resume_early. · d13a8479
      Maarten Lankhorst authored
      
      
      intel_power_domains_init_hw() calls set_init_power, but when using
      runtime power management this call is skipped. This prevents hw readout
      from taking place.
      
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104172
      Link: https://patchwork.freedesktop.org/patch/msgid/20180116155324.75120-1-maarten.lankhorst@linux.intel.com
      Fixes: bc87229f
      
       ("drm/i915/skl: enable PC9/10 power states during suspend-to-idle")
      Cc: Nivedita Swaminathan <nivedita.swaminathan@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: <stable@vger.kernel.org> # v4.5+
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      (cherry picked from commit ac25dfed
      
      )
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      d13a8479
    • Zhenyu Wang's avatar
      drm/i915/gvt: cancel scheduler timer when no vGPU exists · 61a66947
      Zhenyu Wang authored
      
      
      Stop gvt scheduler timer if no vGPU exists, otherwise it keeps
      gvt service thread busy to handle request schedule event but no
      actual schedule activity required.
      
      Reviewed-by: default avatarZhi Wang <zhi.a.wang@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      61a66947