1. 06 6月, 2017 4 次提交
    • B
      drm/nouveau/tmr: fully separate alarm execution/pending lists · b4e382ca
      Ben Skeggs 提交于
      Reusing the list_head for both is a bad idea.  Callback execution is done
      with the lock dropped so that alarms can be rescheduled from the callback,
      which means that with some unfortunate timing, lists can get corrupted.
      
      The execution list should not require its own locking, the single function
      that uses it can only be called from a single context.
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      Cc: stable@vger.kernel.org
      b4e382ca
    • B
      drm/nouveau: enable autosuspend only when it'll actually be used · 8fa4338a
      Ben Skeggs 提交于
      This prevents a deadlock that somehow results from the suspend() ->
      forbid() -> resume() callchain.
      
      [  125.266960] [drm] Initialized nouveau 1.3.1 20120801 for 0000:02:00.0 on minor 1
      [  370.120872] INFO: task kworker/4:1:77 blocked for more than 120 seconds.
      [  370.120920]       Tainted: G           O    4.12.0-rc3 #20
      [  370.120947] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
      [  370.120982] kworker/4:1     D13808    77      2 0x00000000
      [  370.120998] Workqueue: pm pm_runtime_work
      [  370.121004] Call Trace:
      [  370.121018]  __schedule+0x2bf/0xb40
      [  370.121025]  ? mark_held_locks+0x5f/0x90
      [  370.121038]  schedule+0x3d/0x90
      [  370.121044]  rpm_resume+0x107/0x870
      [  370.121052]  ? finish_wait+0x90/0x90
      [  370.121065]  ? pci_pm_runtime_resume+0xa0/0xa0
      [  370.121070]  pm_runtime_forbid+0x4c/0x60
      [  370.121129]  nouveau_pmops_runtime_suspend+0xaf/0xc0 [nouveau]
      [  370.121139]  pci_pm_runtime_suspend+0x5f/0x170
      [  370.121147]  ? pci_pm_runtime_resume+0xa0/0xa0
      [  370.121152]  __rpm_callback+0xb9/0x1e0
      [  370.121159]  ? pci_pm_runtime_resume+0xa0/0xa0
      [  370.121166]  rpm_callback+0x24/0x80
      [  370.121171]  ? pci_pm_runtime_resume+0xa0/0xa0
      [  370.121176]  rpm_suspend+0x138/0x6e0
      [  370.121192]  pm_runtime_work+0x7b/0xc0
      [  370.121199]  process_one_work+0x253/0x6a0
      [  370.121216]  worker_thread+0x4d/0x3b0
      [  370.121229]  kthread+0x133/0x150
      [  370.121234]  ? process_one_work+0x6a0/0x6a0
      [  370.121238]  ? kthread_create_on_node+0x70/0x70
      [  370.121246]  ret_from_fork+0x2a/0x40
      [  370.121283]
                     Showing all locks held in the system:
      [  370.121291] 2 locks held by kworker/4:1/77:
      [  370.121298]  #0:  ("pm"){.+.+.+}, at: [<ffffffffac0d3530>] process_one_work+0x1d0/0x6a0
      [  370.121315]  #1:  ((&dev->power.work)){+.+.+.}, at: [<ffffffffac0d3530>] process_one_work+0x1d0/0x6a0
      [  370.121330] 1 lock held by khungtaskd/81:
      [  370.121333]  #0:  (tasklist_lock){.+.+..}, at: [<ffffffffac10fc8d>] debug_show_all_locks+0x3d/0x1a0
      [  370.121355] 1 lock held by dmesg/1639:
      [  370.121358]  #0:  (&user->lock){+.+.+.}, at: [<ffffffffac124b6d>] devkmsg_read+0x4d/0x360
      
      [  370.121377] =============================================
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      8fa4338a
    • B
    • G
      drm/nouveau/kms/nv50: add null check before pointer dereference · 86276921
      Gustavo A. R. Silva 提交于
      Add null check before dereferencing pointer asyc
      
      Addresses-Coverity-ID: 1397932
      Signed-off-by: NGustavo A. R. Silva <garsilva@embeddedor.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      86276921
  2. 02 6月, 2017 1 次提交
  3. 01 6月, 2017 5 次提交
  4. 29 5月, 2017 10 次提交
  5. 28 5月, 2017 16 次提交
    • J
      drm/msm: Fix the check for the command size · d72fea53
      Jordan Crouse 提交于
      The overrun check for the size of submitted commands is off by one.
      It should allow the offset plus the size to be equal to the
      size of the memory object when the command stream is very tightly
      constructed.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      d72fea53
    • J
      drm/msm: Take the mutex before calling msm_gem_new_impl · 90dd57de
      Jordan Crouse 提交于
      Amongst its other duties, msm_gem_new_impl adds the newly created
      GEM object to the shared inactive list which may also be actively
      modifiying the list during submission.  All the paths to modify
      the list are protected by the mutex except for the one through
      msm_gem_import which can end up causing list corruption.
      Signed-off-by: NJordan Crouse <jcrouse@codeaurora.org>
      [add extra WARN_ON(!mutex_is_locked(&dev->struct_mutex))]
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      90dd57de
    • P
      drm/msm: for array in-fences, check if all backing fences are from our own context before waiting · 3cfac69c
      Philipp Zabel 提交于
      Use the dma_fence_match_context helper to check if all backing fences
      are from our own context, in which case we don't have to wait.
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Gustavo Padovan <gustavo.padovan@collabora.com>
      [rebased on code-motion]
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      3cfac69c
    • T
      drm/msm: constify irq_domain_ops · c43dd227
      Tobias Klauser 提交于
      struct irq_domain_ops is not modified, so it can be made const.
      Signed-off-by: NTobias Klauser <tklauser@distanz.ch>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      c43dd227
    • R
      drm/msm/mdp5: release hwpipe(s) for unused planes · adcbae31
      Rob Clark 提交于
      Otherwise, if userspace doesn't re-use a given plane, it's hwpipe(s)
      could stay permanently assigned.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      adcbae31
    • E
      drm/msm: Reuse dma_fence_release. · 3c30cc41
      Eric Anholt 提交于
      If we follow the typical pattern of the base class being the first
      member, we can use the default dma_fence_free function.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: linux-arm-msm@vger.kernel.org
      Cc: freedreno@lists.freedesktop.org
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      3c30cc41
    • E
      drm/msm: Expose our reservation object when exporting a dmabuf. · 43523eba
      Eric Anholt 提交于
      Without this, polling on the dma-buf (and presumably other devices
      synchronizing against our rendering) would return immediately, even
      while the BO was busy.
      Signed-off-by: NEric Anholt <eric@anholt.net>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: linux-arm-msm@vger.kernel.org
      Cc: freedreno@lists.freedesktop.org
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      43523eba
    • R
      drm/msm/gpu: check legacy clk names in get_clocks() · 134ccada
      Rob Clark 提交于
      Otherwise if someone was using old bindings with "core_clk" instead of
      "core" as the clock name, we'd never find it and gpu would be stuck at
      27MHz (or whatever it's slowest rate is).
      
      Fixes: 98db803f ("msm/drm: gpu: Dynamically locate the clocks from the device tree")
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      134ccada
    • R
      drm/msm/mdp5: use __drm_atomic_helper_plane_duplicate_state() · 786813c3
      Rob Clark 提交于
      Somehow the helper was never retrofitted for mdp5.  Which meant when
      plane_state->fence was added, it could get copied into new state in
      mdp5_plane_duplicate_state().
      
      If an update to disable the plane (for example on rmfb) managed to sneak
      in after an nonblock update had swapped state, but before it was
      committed, we'd get a splat:
      
          WARNING: CPU: 1 PID: 69 at ../drivers/gpu/drm/drm_atomic_helper.c:1061 drm_atomic_helper_wait_for_fences+0xe0/0xf8
         Modules linked in:
      
         CPU: 1 PID: 69 Comm: kworker/1:1 Tainted: G        W       4.11.0-rc8+ #1187
         Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
         Workqueue: events drm_mode_rmfb_work_fn
         task: ffffffc036560d00 task.stack: ffffffc036550000
         PC is at drm_atomic_helper_wait_for_fences+0xe0/0xf8
         LR is at complete_commit.isra.1+0x44/0x1c0
         pc : [<ffffff80084f6040>] lr : [<ffffff800854176c>] pstate: 20000145
         sp : ffffffc036553b60
         x29: ffffffc036553b60 x28: ffffffc0264e6a00
         x27: ffffffc035659000 x26: 0000000000000000
         x25: ffffffc0240e8000 x24: 0000000000000038
         x23: 0000000000000000 x22: ffffff800858f200
         x21: ffffffc0240e8000 x20: ffffffc02f56a800
         x19: 0000000000000000 x18: 0000000000000000
         x17: 0000000000000000 x16: 0000000000000000
         x15: 0000000000000000 x14: ffffffc00a192700
         x13: 0000000000000004 x12: 0000000000000000
         x11: ffffff80089a1690 x10: 00000000000008f0
         x9 : ffffffc036553b20 x8 : ffffffc036561650
         x7 : ffffffc03fe6cb40 x6 : 0000000000000000
         x5 : 0000000000000001 x4 : 0000000000000002
         x3 : ffffffc035659000 x2 : ffffffc0240e8c80
         x1 : 0000000000000000 x0 : ffffffc02adbe588
      
         ---[ end trace 13aeec77c3fb55e2 ]---
         Call trace:
         Exception stack(0xffffffc036553990 to 0xffffffc036553ac0)
         3980:                                   0000000000000000 0000008000000000
         39a0: ffffffc036553b60 ffffff80084f6040 0000000000004ff0 0000000000000038
         39c0: ffffffc0365539d0 ffffff800857e098 ffffffc036553a00 ffffff800857e1b0
         39e0: ffffffc036553a10 ffffff800857c554 ffffffc0365e8400 ffffffc0365e8400
         3a00: ffffffc036553a20 ffffff8008103358 000000000001aad7 ffffff800851b72c
         3a20: ffffffc036553a50 ffffff80080e9228 ffffffc02adbe588 0000000000000000
         3a40: ffffffc0240e8c80 ffffffc035659000 0000000000000002 0000000000000001
         3a60: 0000000000000000 ffffffc03fe6cb40 ffffffc036561650 ffffffc036553b20
         3a80: 00000000000008f0 ffffff80089a1690 0000000000000000 0000000000000004
         3aa0: ffffffc00a192700 0000000000000000 0000000000000000 0000000000000000
         [<ffffff80084f6040>] drm_atomic_helper_wait_for_fences+0xe0/0xf8
         [<ffffff800854176c>] complete_commit.isra.1+0x44/0x1c0
         [<ffffff8008541c64>] msm_atomic_commit+0x32c/0x350
         [<ffffff8008516230>] drm_atomic_commit+0x50/0x60
         [<ffffff8008517548>] drm_atomic_remove_fb+0x158/0x250
         [<ffffff80085186d0>] drm_framebuffer_remove+0x50/0x158
         [<ffffff8008518818>] drm_mode_rmfb_work_fn+0x40/0x58
         [<ffffff80080d5668>] process_one_work+0x1d0/0x378
         [<ffffff80080d5a54>] worker_thread+0x244/0x488
         [<ffffff80080db7fc>] kthread+0xfc/0x128
         [<ffffff8008082ec0>] ret_from_fork+0x10/0x50
      
      Fixes: 96260142 ("drm/fence: add in-fences support")
      Cc: stable@vger.kernel.org
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reported-by: NStanimir Varbanov <stanimir.varbanov@linaro.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      786813c3
    • R
      drm/msm: select PM_OPP · ac20fa0a
      Rob Clark 提交于
      Otherwise, if nothing else enabled selects it, dev_pm_opp_of_add_table()
      will return -ENOTSUPP.
      
      Fixes: e2af8b6b ("drm/msm: gpu: Use OPP tables if we can")
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      ac20fa0a
    • L
      Merge tag 'tty-4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 249f1efd
      Linus Torvalds 提交于
      Pull tty/serial fixes from Greg KH:
       "Here are some serial and tty fixes for 4.12-rc3. They are a bit bigger
        than normal, which is why I had them bake in linux-next for a few
        weeks and didn't send them to you for -rc2.
      
        They revert a few of the serdev patches from 4.12-rc1, and bring
        things back to how they were in 4.11, to try to make things a bit more
        stable there. Rob and Johan both agree that this is the way forward,
        so this isn't people squabbling over semantics. Other than that, just
        a few minor serial driver fixes that people have had problems with.
      
        All of these have been in linux-next for a few weeks with no reported
        issues"
      
      * tag 'tty-4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        serial: altera_uart: call iounmap() at driver remove
        serial: imx: ensure UCR3 and UFCR are setup correctly
        MAINTAINERS/serial: Change maintainer of jsm driver
        serial: enable serdev support
        tty/serdev: add serdev registration interface
        serdev: Restore serdev_device_write_buf for atomic context
        serial: core: fix crash in uart_suspend_port
        tty: fix port buffer locking
        tty: ehv_bytechan: clean up init error handling
        serial: ifx6x60: fix use-after-free on module unload
        serial: altera_jtaguart: adding iounmap()
        serial: exar: Fix stuck MSIs
        serial: efm32: Fix parity management in 'efm32_uart_console_get_options()'
        serdev: fix tty-port client deregistration
        Revert "tty_port: register tty ports with serdev bus"
        drivers/tty: 8250: only call fintek_8250_probe when doing port I/O
      249f1efd
    • L
      Merge tag 'powerpc-4.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 6f68a6ae
      Linus Torvalds 提交于
      Pull powerpc fixes from Michael Ellerman:
       "Fix running SPU programs on Cell, and a few other minor fixes.
      
        Thanks to Alistair Popple, Jeremy Kerr, Michael Neuling, Nicholas
        Piggin"
      
      * tag 'powerpc-4.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc: Add PPC_FEATURE userspace bits for SCV and DARN instructions
        powerpc/spufs: Fix hash faults for kernel regions
        powerpc: Fix booting P9 hash with CONFIG_PPC_RADIX_MMU=N
        powerpc/powernv/npu-dma.c: Fix opal_npu_destroy_context() call
        selftests/powerpc: Fix TM resched DSCR test with some compilers
      6f68a6ae
    • L
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 38e6bf23
      Linus Torvalds 提交于
      Pull x86 fixes from Thomas Gleixner:
       "A series of fixes for X86:
      
         - The final fix for the end-of-stack issue in the unwinder
         - Handle non PAT systems gracefully
         - Prevent access to uninitiliazed memory
         - Move early delay calaibration after basic init
         - Fix Kconfig help text
         - Fix a cross compile issue
         - Unbreak older make versions"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/timers: Move simple_udelay_calibration past init_hypervisor_platform
        x86/alternatives: Prevent uninitialized stack byte read in apply_alternatives()
        x86/PAT: Fix Xorg regression on CPUs that don't support PAT
        x86/watchdog: Fix Kconfig help text file path reference to lockup watchdog documentation
        x86/build: Permit building with old make versions
        x86/unwind: Add end-of-stack check for ftrace handlers
        Revert "x86/entry: Fix the end of the stack for newly forked tasks"
        x86/boot: Use CROSS_COMPILE prefix for readelf
      38e6bf23
    • L
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 39b8ab31
      Linus Torvalds 提交于
      Pull timer fixlet from Thomas Gleixner:
       "Silence dmesg spam by making the posix cpu timer printks depend on
        print_fatal_signals"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        posix-timers: Make signal printks conditional
      39b8ab31
    • L
      Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · de0b9d75
      Linus Torvalds 提交于
      Pull RAS fixes from Thomas Gleixner:
       "Two fixlets for RAS:
      
         - Export memory_error() so the NFIT module can utilize it
      
         - Handle memory errors in NFIT correctly"
      
      * 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        acpi, nfit: Fix the memory error check in nfit_handle_mce()
        x86/MCE: Export memory_error()
      de0b9d75
    • L
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · fac3fcae
      Linus Torvalds 提交于
      Pull perf tooling fixes from Thomas Gleixner:
      
       - Synchronization of tools and kernel headers
      
       - A series of fixes for perf report addressing various failures:
          * Handle invalid maps proper
          * Plug a memory leak
          * Handle frames and callchain order correctly
      
       - Fixes for handling inlines and children mode
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tools/include: Sync kernel ABI headers with tooling headers
        perf tools: Put caller above callee in --children mode
        perf report: Do not drop last inlined frame
        perf report: Always honor callchain order for inlined nodes
        perf script: Add --inline option for debugging
        perf report: Fix off-by-one for non-activation frames
        perf report: Fix memory leak in addr2line when called by addr2inlines
        perf report: Don't crash on invalid maps in `-g srcline` mode
      fac3fcae
  6. 27 5月, 2017 4 次提交