1. 30 8月, 2017 1 次提交
  2. 23 8月, 2017 1 次提交
  3. 22 8月, 2017 1 次提交
  4. 21 8月, 2017 2 次提交
  5. 16 8月, 2017 4 次提交
  6. 15 8月, 2017 7 次提交
    • M
      drm/atomic: If the atomic check fails, return its value first · a0ffc51e
      Maarten Lankhorst 提交于
      The last part of drm_atomic_check_only is testing whether we need to
      fail with -EINVAL when modeset is not allowed, but forgets to return
      the value when atomic_check() fails first.
      
      This results in -EDEADLK being replaced by -EINVAL, and the sanity
      check in drm_modeset_drop_locks kicks in:
      
      [  308.531734] ------------[ cut here ]------------
      [  308.531791] WARNING: CPU: 0 PID: 1886 at drivers/gpu/drm/drm_modeset_lock.c:217 drm_modeset_drop_locks+0x33/0xc0 [drm]
      [  308.531828] Modules linked in:
      [  308.532050] CPU: 0 PID: 1886 Comm: kms_atomic Tainted: G     U  W 4.13.0-rc5-patser+ #5225
      [  308.532082] Hardware name: NUC5i7RYB, BIOS RYBDWi35.86A.0246.2015.0309.1355 03/09/2015
      [  308.532124] task: ffff8800cd9dae00 task.stack: ffff8800ca3b8000
      [  308.532168] RIP: 0010:drm_modeset_drop_locks+0x33/0xc0 [drm]
      [  308.532189] RSP: 0018:ffff8800ca3bf980 EFLAGS: 00010282
      [  308.532211] RAX: dffffc0000000000 RBX: ffff8800ca3bfaf8 RCX: 0000000013a171e6
      [  308.532235] RDX: 1ffff10019477f69 RSI: ffffffffa8ba4fa0 RDI: ffff8800ca3bfb48
      [  308.532258] RBP: ffff8800ca3bf998 R08: 0000000000000000 R09: 0000000000000003
      [  308.532281] R10: 0000000079dbe066 R11: 00000000f760b34b R12: 0000000000000001
      [  308.532304] R13: dffffc0000000000 R14: 00000000ffffffea R15: ffff880096889680
      [  308.532328] FS:  00007ff00959cec0(0000) GS:ffff8800d4e00000(0000) knlGS:0000000000000000
      [  308.532359] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  308.532380] CR2: 0000000000000008 CR3: 00000000ca2e3000 CR4: 00000000003406f0
      [  308.532402] Call Trace:
      [  308.532440]  drm_mode_atomic_ioctl+0x19fa/0x1c00 [drm]
      [  308.532488]  ? drm_atomic_set_property+0x1220/0x1220 [drm]
      [  308.532565]  ? avc_has_extended_perms+0xc39/0xff0
      [  308.532593]  ? lock_downgrade+0x610/0x610
      [  308.532640]  ? drm_atomic_set_property+0x1220/0x1220 [drm]
      [  308.532680]  drm_ioctl_kernel+0x154/0x1a0 [drm]
      [  308.532755]  drm_ioctl+0x624/0x8f0 [drm]
      [  308.532858]  ? drm_atomic_set_property+0x1220/0x1220 [drm]
      [  308.532976]  ? drm_getunique+0x210/0x210 [drm]
      [  308.533061]  do_vfs_ioctl+0xd92/0xe40
      [  308.533121]  ? ioctl_preallocate+0x1b0/0x1b0
      [  308.533160]  ? selinux_capable+0x20/0x20
      [  308.533191]  ? do_fcntl+0x1b1/0xbf0
      [  308.533219]  ? kasan_slab_free+0xa2/0xb0
      [  308.533249]  ? f_getown+0x4b/0xa0
      [  308.533278]  ? putname+0xcf/0xe0
      [  308.533309]  ? security_file_ioctl+0x57/0x90
      [  308.533342]  SyS_ioctl+0x4e/0x80
      [  308.533374]  entry_SYSCALL_64_fastpath+0x18/0xad
      [  308.533405] RIP: 0033:0x7ff00779e4d7
      [  308.533431] RSP: 002b:00007fff66a043d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      [  308.533481] RAX: ffffffffffffffda RBX: 000000e7c7ca5910 RCX: 00007ff00779e4d7
      [  308.533560] RDX: 00007fff66a04430 RSI: 00000000c03864bc RDI: 0000000000000003
      [  308.533608] RBP: 00007ff007a5fb00 R08: 000000e7c7ca4620 R09: 000000e7c7ca5e60
      [  308.533647] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000070
      [  308.533685] R13: 0000000000000000 R14: 0000000000000000 R15: 000000e7c7ca5930
      [  308.533770] Code: ff df 55 48 89 e5 41 55 41 54 53 48 89 fb 48 83 c7
      50 48 89 fa 48 c1 ea 03 80 3c 02 00 74 05 e8 94 d4 16 e7 48 83 7b 50 00
      74 02 <0f> ff 4c 8d 6b 58 48 b8 00 00 00 00 00 fc ff df 4c 89 ea 48 c1
      [  308.534086] ---[ end trace 77f11e53b1df44ad ]---
      
      Solve this by adding the missing return.
      
      This is also a bugfix because we could end up rejecting updates with
      -EINVAL because of a early -EDEADLK, while if atomic_check ran to
      completion it might have downgraded the modeset to a fastset.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Testcase: kms_atomic
      Link: https://patchwork.freedesktop.org/patch/msgid/20170815095706.23624-1-maarten.lankhorst@linux.intel.com
      Fixes: d34f20d6 ("drm: Atomic modeset ioctl")
      Cc: <stable@vger.kernel.org> # v4.0+
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a0ffc51e
    • D
      drm/i915: Avoid the gpu reset vs. modeset deadlock · 781cc76e
      Daniel Vetter 提交于
      ... using the biggest hammer we have. This is essentially a weaponized
      version of the timeout-based wedging Chris added in
      
      commit 36703e79
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Thu Jun 22 11:56:25 2017 +0100
      
          drm/i915: Break modeset deadlocks on reset
      
      Because defense-in-depth is good it's good to still have both. Also
      note that with the locking change we can now restrict this a lot (old
      gpus and special testing only), so this doesn't kill the TDR benefits
      on at least anything remotely modern.
      
      And futuremore with a few tricks it should be possible to make a much
      more educated guess about whether an atomic commit is stuck waiting on
      the gpu (atomic_t counting the pending i915_sw_fence used by the
      atomic modeset code should do it), so we can improve this.
      
      But for now just start with something that is guaranteed to recover
      faster, for much better CI througput.
      
      This defacto reverts TDR on these platforms, but there's not really a
      single commit to specify as the sole offender.
      
      v2: Add a debug message to explain what's going on. We can't DRM_ERROR
      because that spams CI. And the timeout based fallback still prints a
      DRM_ERROR, in case something goes wrong.
      
      v3: Fix comment layout (Michel)
      
      Fixes: 4680816b ("drm/i915: Wait first for submission, before waiting for request completion")
      Fixes: 221fe799 ("drm/i915: Perform a direct reset of the GPU from the waiter")
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v2)
      Cc: Michel Thierry <michel.thierry@intel.com>
      Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v2)
      Reviewed-by: NMichel Thierry <michel.thierry@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170808080828.23650-1-daniel.vetter@ffwll.ch
      (cherry picked from commit 97154ec2)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      781cc76e
    • C
      drm/i915: Suppress switch_mm emission between the same aliasing_ppgtt · 430ffaf4
      Chris Wilson 提交于
      When switching between contexts using the aliasing_ppgtt, the VM is
      shared. We don't need to reload the PD registers unless they are dirty.
      
      Martin Peres reported an issue that looks like corruption between
      Haswell context switches, bisecting to commit f9326be5 ("drm/i915:
      Rearrange switch_context to load the aliasing ppgtt on first use").
      Switching between the same mm (the aliasing_ppgtt is used for all
      contexts in this case) should be a nop, but appears to trigger some
      side-effects in the context switch. However, as we know the switch
      is redundant in this case, we can skip it and continue to ignore the
      issue until somebody feels strong enough to investigate full-ppgtt on
      gen7 again!
      
      Except.. Martin was using full-ppgtt which is not supported as it
      doesn't work correctly yet. So whilst the bisect did yield valuable
      information about the failures, the fix should not have any user impact
      under default settings, with the exception of a slightly lower
      throughput on xcs as the VM would always be reloaded.
      
      v2: Also remember to set the legacy_active_context following the switch
      on xcs (commit e8a9c58f ("drm/i915: Unify active context tracking
      between legacy/execlists/guc"))
      
      Fixes: f9326be5 ("drm/i915: Rearrange switch_context to load the aliasing ppgtt on first use")
      Fixes: e8a9c58f ("drm/i915: Unify active context tracking between legacy/execlists/guc")
      Reported-by: NMartin Peres <martin.peres@linux.intel.com>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Martin Peres <martin.peres@linux.intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170812152724.6883-1-chris@chris-wilson.co.uk
      (cherry picked from commit 12124bea)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      430ffaf4
    • M
      drm/i915: Return correct EDP voltage swing table for 0.85V · 7eceb9d0
      Matthias Kaehlcke 提交于
      For 0.85V cnl_get_buf_trans_edp() returns the DP table, instead of EDP.
      Use the correct table.
      
      The error was pointed out by this clang warning:
      
      drivers/gpu/drm/i915/intel_ddi.c:392:39: warning: variable
        'cnl_ddi_translations_edp_0_85V' is not needed and will not be emitted
        [-Wunneeded-internal-declaration]
          static const struct cnl_ddi_buf_trans cnl_ddi_translations_edp_0_85V[] = {
      
      Fixes: cf54ca8b ("drm/i915/cnl: Implement voltage swing sequence.")
      Signed-off-by: NMatthias Kaehlcke <mka@chromium.org>
      Reviewed-by: NManasi Navare <manasi.d.navare@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170717195854.192139-1-mka@chromium.org
      (cherry picked from commit 50946c89)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      7eceb9d0
    • R
      drm/i915/cnl: Add slice and subslice information to debugfs. · 1dd7a3e7
      Rodrigo Vivi 提交于
      A missing part to EU slice power gating is the
      debugfs interface. This patch actually should have been
      squashed to the initial EU slice power gating one.
      
      v2: Initial patch was merged without this part.
      
      Fixes: c7ae7e9a ("drm/i915/cnl: Configure EU slice power gating.")
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170809200702.11236-1-rodrigo.vivi@intel.com
      (cherry picked from commit 7ea1adf3)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      1dd7a3e7
    • C
      drm/i915: Perform an invalidate prior to executing golden renderstate · a0125a93
      Chris Wilson 提交于
      As we may have just bound the renderstate into the GGTT for execution, we
      need to ensure that the GTT TLB are also flushed.
      
      On snb-gt2, this would cause a random GPU hang at the start of a new
      context (e.g. boot) and on snb-gt1, it was causing the renderstate batch
      to take ~10s. It was the GPU hang that revealed the truth, as the CS
      gleefully executed beyond the end of the golden renderstate batch, a good
      indicator for a GTT TLB miss.
      
      Fixes: 20fe17aa ("drm/i915: Remove redundant TLB invalidate on switching contexts")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: stable@vger.kernel.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20170808131904.1385-1-chris@chris-wilson.co.ukReviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.12-rc1+
      (cherry picked from commit 802673d6)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      a0125a93
    • L
      drm/i915: remove unused function declaration · 26a72e8a
      Lionel Landwerlin 提交于
      This function is not part of the driver anymore.
      Signed-off-by: NLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Fixes: 90f4fcd5 ("drm/i915: Remove forced stop ring on suspend/unload")
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170804140348.24971-1-lionel.g.landwerlin@intel.com
      (cherry picked from commit fe29133d)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      26a72e8a
  7. 14 8月, 2017 2 次提交
  8. 11 8月, 2017 2 次提交
    • P
      drm/imx: ipuv3-plane: fix YUV framebuffer scanout on the base plane · 5be5dd38
      Philipp Zabel 提交于
      Historically, only RGB framebuffers could be assigned to the primary
      plane. This changed with universal plane support. Since no colorspace
      conversion was set up for the IPUv3 full plane, assigning YUV frame
      buffers to the primary plane caused incorrect output.
      Fix this by enabling color space conversion also for the primary plane.
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      5be5dd38
    • A
      gpu: ipu-v3: add DRM dependency · 2406b296
      Arnd Bergmann 提交于
      The new PRE/PRG driver code causes a link failure when IPUv3 is built-in,
      but DRM is built as a module:
      
      drivers/gpu/ipu-v3/ipu-pre.o: In function `ipu_pre_configure':
      ipu-pre.c:(.text.ipu_pre_configure+0x18): undefined reference to `drm_format_info'
      drivers/gpu/ipu-v3/ipu-prg.o: In function `ipu_prg_format_supported':
      ipu-prg.c:(.text.ipu_prg_format_supported+0x8): undefined reference to `drm_format_info'
      
      Adding a Kconfig dependency on DRM means we don't run into this problem
      any more. If DRM is disabled altogether, the IPUv3 driver is built
      without PRE/PRG support.
      
      Fixes: ea9c2605 ("gpu: ipu-v3: add driver for Prefetch Resolve Gasket")
      Link: https://patchwork.kernel.org/patch/9636665/Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      [p.zabel@pengutronix.de: changed the dependency from DRM to DRM || !DRM,
       since the link failure only happens when DRM=m and IPUV3_CORE=y.
       Modified the commit message to reflect this.]
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      2406b296
  9. 10 8月, 2017 3 次提交
  10. 09 8月, 2017 1 次提交
  11. 08 8月, 2017 1 次提交
  12. 07 8月, 2017 5 次提交
  13. 04 8月, 2017 5 次提交
  14. 03 8月, 2017 2 次提交
  15. 02 8月, 2017 3 次提交
    • C
      drm/i915/gvt: clean workload queue if error happened · f2e2c00a
      Chuanxiao Dong 提交于
      If a workload caused a HW GPU hang or it is in the middle of
      vGPU reset, the workload queue should be cleaned up to emulate
      the hang state of the GPU.
      
      v2:
      - use ENGINE_MASK(ring_id) instead of (1 << ring_id). (Zhenyu)
      Signed-off-by: NChuanxiao Dong <chuanxiao.dong@intel.com>
      Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      f2e2c00a
    • C
      drm/i915/gvt: change resetting to resetting_eng · 6184cc8d
      Chuanxiao Dong 提交于
      Use resetting_eng to identify which engine is resetting
      so the rest ones' workload won't be impacted
      
      v2:
      - use ENGINE_MASK(ring_id) instead of (1 << ring_id). (Zhenyu)
      Signed-off-by: NChuanxiao Dong <chuanxiao.dong@intel.com>
      Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      6184cc8d
    • A
      drm/msm: gpu: don't abuse dma_alloc for non-DMA allocations · 8f93e043
      Arnd Bergmann 提交于
      In zap_shader_load_mdt(), we pass a pointer to a phys_addr_t
      into dmam_alloc_coherent, which the compiler warns about:
      
      drivers/gpu/drm/msm/adreno/a5xx_gpu.c: In function 'zap_shader_load_mdt':
      drivers/gpu/drm/msm/adreno/a5xx_gpu.c:54:50: error: passing argument 3 of 'dmam_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
      
      The returned DMA address is later passed on to a function that
      takes a phys_addr_t, so it's clearly wrong to use the DMA
      mapping interface here: the memory may be uncached, or the
      address may be completely wrong if there is an IOMMU connected
      to the device. What the code actually wants to do is to get
      the physical address from the reserved-mem node. It goes through
      the dma-mapping interfaces for obscure reasons, and this
      apparently only works by chance, relying on specific bugs
      in the error handling of the arm64 dma-mapping implementation.
      
      The same problem existed in the "venus" media driver, which was
      now fixed by Stanimir Varbanov after long discussions.
      
      In order to make some progress here, I have now ported his
      approach over to the adreno driver. The patch is currently
      untested, and should get a good review, but it is now much
      simpler than the original, and it should be obvious what
      goes wrong if I made a mistake in the port.
      
      See also: a6e2d36b ("media: venus: don't abuse dma_alloc for non-DMA allocations")
      Cc: Stanimir Varbanov <stanimir.varbanov@linaro.org>
      Fixes: 7c65817e ("drm/msm: gpu: Enable zap shader for A5XX")
      Acked-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      Acked-and-Tested-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      8f93e043