1. 15 Dec, 2017 4 commits
  2. 12 Dec, 2017 3 commits
  3. 07 Dec, 2017 12 commits
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2017-12-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 90eeb3aa
      Dave Airlie authored
      regression fix for vc4 + rpm stable fix for analogix bridge
      
      * tag 'drm-misc-fixes-2017-12-07' of git://anongit.freedesktop.org/drm/drm-misc:
        drm/bridge: analogix dp: Fix runtime PM state in get_modes() callback
        drm/vc4: Fix false positive WARN() backtrace on refcount_inc() usage
      90eeb3aa
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2017-12-07' of... · 96980844
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2017-12-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      - Fix for fd.o bug #103997 CNL eDP + HDMI causing a machine hard hang (James)
      - Fix to allow suspending with a wedged GPU to hopefully unwedge it (Chris)
      - Fix for Gen2 vblank timestap/frame counter jumps (Ville)
      - Revert of a W/A for enabling FBC on CNL/GLK for certain images
        and sizes (Rodrigo)
      - Lockdep fix for i915 userptr code (Chris)
      
      gvt-fixes-2017-12-06
      
      - Fix invalid hw reg read value for vGPU (Xiong)
      - Fix qemu warning on PCI ROM bar missing (Changbin)
      - Workaround preemption regression (Zhenyu)
      
      * tag 'drm-intel-fixes-2017-12-07' of git://anongit.freedesktop.org/drm/drm-intel:
        Revert "drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk"
        drm/i915: Call i915_gem_init_userptr() before taking struct_mutex
        drm/i915/gvt: set max priority for gvt context
        drm/i915/gvt: Don't mark vgpu context as inactive when preempted
        drm/i915/gvt: Limit read hw reg to active vgpu
        drm/i915/gvt: Export intel_gvt_render_mmio_to_ring_id()
        drm/i915/gvt: Emulate PCI expansion ROM base address register
        drm/i915/cnl: Mask previous DDI - PLL mapping
        drm/i915: Fix vblank timestamp/frame counter jumps on gen2
        drm/i915: Skip switch-to-kernel-context on suspend when wedged
      96980844
    • Dave Airlie's avatar
      Merge tag 'exynos-drm-fixes-for-v4.15-rc3' of... · c2ef3a67
      Dave Airlie authored
      Merge tag 'exynos-drm-fixes-for-v4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
      
      - fix page fault issue due to using wrong device object in prime import.
      - drop NONCONTIG flag without IOMMU support.
      - remove unnecessary members and declaration.
      
      * tag 'exynos-drm-fixes-for-v4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
        drm/exynos: remove unnecessary function declaration
        drm/exynos: remove unnecessary descrptions
        drm/exynos: gem: Drop NONCONTIG flag for buffers allocated without IOMMU
        drm/exynos: Fix dma-buf import
      c2ef3a67
    • Marek Szyprowski's avatar
      drm/bridge: analogix dp: Fix runtime PM state in get_modes() callback · 510353a6
      Marek Szyprowski authored
      get_modes() callback might be called asynchronously from the DRM core and
      it is not synchronized with bridge_enable(), which sets proper runtime PM
      state of the main DP device. Fix this by calling pm_runtime_get_sync()
      before calling drm_get_edid(), which in turn calls drm_dp_i2c_xfer() and
      analogix_dp_transfer() to ensure that main DP device is runtime active
      when doing any access to its registers.
      
      This fixes the following kernel issue on Samsung Exynos5250 Snow board:
      Unhandled fault: imprecise external abort (0x406) at 0x00000000
      pgd = c0004000
      [00000000] *pgd=00000000
      Internal error: : 406 [#1] PREEMPT SMP ARM
      Modules linked in:
      CPU: 0 PID: 62 Comm: kworker/0:2 Not tainted 4.13.0-rc2-00364-g4a97a3da #3357
      Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      Workqueue: events output_poll_execute
      task: edc14800 task.stack: edcb2000
      PC is at analogix_dp_transfer+0x15c/0x2fc
      LR is at analogix_dp_transfer+0x134/0x2fc
      pc : [<c0468538>]    lr : [<c0468510>]    psr: 60000013
      sp : edcb3be8  ip : 0000002a  fp : 00000001
      r10: 00000000  r9 : edcb3cd8  r8 : edcb3c40
      r7 : 00000000  r6 : edd3b380  r5 : edd3b010  r4 : 00000064
      r3 : 00000000  r2 : f0ad3000  r1 : edcb3c40  r0 : edd3b010
      Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
      Control: 10c5387d  Table: 4000406a  DAC: 00000051
      Process kworker/0:2 (pid: 62, stack limit = 0xedcb2210)
      Stack: (0xedcb3be8 to 0xedcb4000)
      [<c0468538>] (analogix_dp_transfer) from [<c0424ba4>] (drm_dp_i2c_do_msg+0x8c/0x2b4)
      [<c0424ba4>] (drm_dp_i2c_do_msg) from [<c0424e64>] (drm_dp_i2c_xfer+0x98/0x214)
      [<c0424e64>] (drm_dp_i2c_xfer) from [<c057b2d8>] (__i2c_transfer+0x140/0x29c)
      [<c057b2d8>] (__i2c_transfer) from [<c057b4a4>] (i2c_transfer+0x70/0xe4)
      [<c057b4a4>] (i2c_transfer) from [<c0441de4>] (drm_do_probe_ddc_edid+0xb4/0x114)
      [<c0441de4>] (drm_do_probe_ddc_edid) from [<c0441e5c>] (drm_probe_ddc+0x18/0x28)
      [<c0441e5c>] (drm_probe_ddc) from [<c0445728>] (drm_get_edid+0x124/0x2d4)
      [<c0445728>] (drm_get_edid) from [<c0465ea0>] (analogix_dp_get_modes+0x90/0x114)
      [<c0465ea0>] (analogix_dp_get_modes) from [<c0425e8c>] (drm_helper_probe_single_connector_modes+0x198/0x68c)
      [<c0425e8c>] (drm_helper_probe_single_connector_modes) from [<c04325d4>] (drm_setup_crtcs+0x1b4/0xd18)
      [<c04325d4>] (drm_setup_crtcs) from [<c04344a8>] (drm_fb_helper_hotplug_event+0x94/0xd0)
      [<c04344a8>] (drm_fb_helper_hotplug_event) from [<c0425a50>] (drm_kms_helper_hotplug_event+0x24/0x28)
      [<c0425a50>] (drm_kms_helper_hotplug_event) from [<c04263ec>] (output_poll_execute+0x6c/0x174)
      [<c04263ec>] (output_poll_execute) from [<c0136f18>] (process_one_work+0x188/0x3fc)
      [<c0136f18>] (process_one_work) from [<c01371f4>] (worker_thread+0x30/0x4b8)
      [<c01371f4>] (worker_thread) from [<c013daf8>] (kthread+0x128/0x164)
      [<c013daf8>] (kthread) from [<c0108510>] (ret_from_fork+0x14/0x24)
      Code: 0a000002 ea000009 e2544001 0a00004a (e59537c8)
      ---[ end trace cddc7919c79f7878 ]---
      Reported-by: default avatarMisha Komarovskiy <zombah@gmail.com>
      CC: stable@vger.kernel.org # v4.10+
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarArchit Taneja <architt@codeaurora.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171121074936.22520-1-m.szyprowski@samsung.com
      510353a6
    • Joonas Lahtinen's avatar
      Merge tag 'gvt-fixes-2017-12-06' of https://github.com/intel/gvt-linux into drm-intel-fixes · d85936ab
      Joonas Lahtinen authored
      gvt-fixes-2017-12-06
      
      - Fix invalid hw reg read value for vGPU (Xiong)
      - Fix qemu warning on PCI ROM bar missing (Changbin)
      - Workaround preemption regression (Zhenyu)
      Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171206075105.wlh2ojubjczlstox@zhen-hp.sh.intel.com
      d85936ab
    • Radhakrishna Sripada's avatar
      Revert "drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk" · 7a8b7053
      Radhakrishna Sripada authored
      This reverts commit 8f067837.
      
      HSD says "WA withdrawn. It was causing corruption with some images.
      WA is not strictly necessary since this bug just causes loss of FBC
      compression with some sizes and images, but doesn't break anything."
      
      Fixes: 8f067837 ("drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk")
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarRadhakrishna Sripada <radhakrishna.sripada@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171117010825.23118-1-radhakrishna.sripada@intel.com
      (cherry picked from commit 0cfecb7c)
      Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      7a8b7053
    • Boris Brezillon's avatar
      drm/vc4: Fix false positive WARN() backtrace on refcount_inc() usage · 5bfd4013
      Boris Brezillon authored
      With CONFIG_REFCOUNT_FULL enabled, refcount_inc() complains when it's
      passed a refcount object that has its counter set to 0. In this driver,
      this is a valid use case since we want to increment ->usecnt only when
      the BO object starts to be used by real HW components and this is
      definitely not the case when the BO is created.
      
      Fix the problem by using refcount_inc_not_zero() instead of
      refcount_inc() and fallback to refcount_set(1) when
      refcount_inc_not_zero() returns false. Note that this 2-steps operation
      is not racy here because the whole section is protected by a mutex
      which guarantees that the counter does not change between the
      refcount_inc_not_zero() and refcount_set() calls.
      
      Fixes: b9f19259 ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl")
      Reported-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
      Acked-by: default avatarEric Anholt <eric@anholt.net>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171122203928.28135-1-boris.brezillon@free-electrons.com
      5bfd4013
    • Chris Wilson's avatar
      drm/i915: Call i915_gem_init_userptr() before taking struct_mutex · ef78970a
      Chris Wilson authored
      We don't need struct_mutex to initialise userptr (it just allocates a
      workqueue for itself etc), but we do need struct_mutex later on in
      i915_gem_init() in order to feed requests onto the HW.
      
      This should break the chain
      
      [  385.697902] ======================================================
      [  385.697907] WARNING: possible circular locking dependency detected
      [  385.697913] 4.14.0-CI-Patchwork_7234+ #1 Tainted: G     U
      [  385.697917] ------------------------------------------------------
      [  385.697922] perf_pmu/2631 is trying to acquire lock:
      [  385.697927]  (&mm->mmap_sem){++++}, at: [<ffffffff811bfe1e>] __might_fault+0x3e/0x90
      [  385.697941]
                     but task is already holding lock:
      [  385.697946]  (&cpuctx_mutex){+.+.}, at: [<ffffffff8116fe8c>] perf_event_ctx_lock_nested+0xbc/0x1d0
      [  385.697957]
                     which lock already depends on the new lock.
      
      [  385.697963]
                     the existing dependency chain (in reverse order) is:
      [  385.697970]
                     -> #4 (&cpuctx_mutex){+.+.}:
      [  385.697980]        __mutex_lock+0x86/0x9b0
      [  385.697985]        perf_event_init_cpu+0x5a/0x90
      [  385.697991]        perf_event_init+0x178/0x1a4
      [  385.697997]        start_kernel+0x27f/0x3f1
      [  385.698003]        verify_cpu+0x0/0xfb
      [  385.698006]
                     -> #3 (pmus_lock){+.+.}:
      [  385.698015]        __mutex_lock+0x86/0x9b0
      [  385.698020]        perf_event_init_cpu+0x21/0x90
      [  385.698025]        cpuhp_invoke_callback+0xca/0xc00
      [  385.698030]        _cpu_up+0xa7/0x170
      [  385.698035]        do_cpu_up+0x57/0x70
      [  385.698039]        smp_init+0x62/0xa6
      [  385.698044]        kernel_init_freeable+0x97/0x193
      [  385.698050]        kernel_init+0xa/0x100
      [  385.698055]        ret_from_fork+0x27/0x40
      [  385.698058]
                     -> #2 (cpu_hotplug_lock.rw_sem){++++}:
      [  385.698068]        cpus_read_lock+0x39/0xa0
      [  385.698073]        apply_workqueue_attrs+0x12/0x50
      [  385.698078]        __alloc_workqueue_key+0x1d8/0x4d8
      [  385.698134]        i915_gem_init_userptr+0x5f/0x80 [i915]
      [  385.698176]        i915_gem_init+0x7c/0x390 [i915]
      [  385.698213]        i915_driver_load+0x99e/0x15c0 [i915]
      [  385.698250]        i915_pci_probe+0x33/0x90 [i915]
      [  385.698256]        pci_device_probe+0xa1/0x130
      [  385.698262]        driver_probe_device+0x293/0x440
      [  385.698267]        __driver_attach+0xde/0xe0
      [  385.698272]        bus_for_each_dev+0x5c/0x90
      [  385.698277]        bus_add_driver+0x16d/0x260
      [  385.698282]        driver_register+0x57/0xc0
      [  385.698287]        do_one_initcall+0x3e/0x160
      [  385.698292]        do_init_module+0x5b/0x1fa
      [  385.698297]        load_module+0x2374/0x2dc0
      [  385.698302]        SyS_finit_module+0xaa/0xe0
      [  385.698307]        entry_SYSCALL_64_fastpath+0x1c/0xb1
      [  385.698311]
                     -> #1 (&dev->struct_mutex){+.+.}:
      [  385.698320]        __mutex_lock+0x86/0x9b0
      [  385.698361]        i915_mutex_lock_interruptible+0x4c/0x130 [i915]
      [  385.698403]        i915_gem_fault+0x206/0x760 [i915]
      [  385.698409]        __do_fault+0x1a/0x70
      [  385.698413]        __handle_mm_fault+0x7c4/0xdb0
      [  385.698417]        handle_mm_fault+0x154/0x300
      [  385.698440]        __do_page_fault+0x2d6/0x570
      [  385.698445]        page_fault+0x22/0x30
      [  385.698449]
                     -> #0 (&mm->mmap_sem){++++}:
      [  385.698459]        lock_acquire+0xaf/0x200
      [  385.698464]        __might_fault+0x68/0x90
      [  385.698470]        _copy_to_user+0x1e/0x70
      [  385.698475]        perf_read+0x1aa/0x290
      [  385.698480]        __vfs_read+0x23/0x120
      [  385.698484]        vfs_read+0xa3/0x150
      [  385.698488]        SyS_read+0x45/0xb0
      [  385.698493]        entry_SYSCALL_64_fastpath+0x1c/0xb1
      [  385.698497]
                     other info that might help us debug this:
      
      [  385.698505] Chain exists of:
                       &mm->mmap_sem --> pmus_lock --> &cpuctx_mutex
      
      [  385.698517]  Possible unsafe locking scenario:
      
      [  385.698522]        CPU0                    CPU1
      [  385.698526]        ----                    ----
      [  385.698529]   lock(&cpuctx_mutex);
      [  385.698553]                                lock(pmus_lock);
      [  385.698558]                                lock(&cpuctx_mutex);
      [  385.698564]   lock(&mm->mmap_sem);
      [  385.698568]
                      *** DEADLOCK ***
      
      [  385.698574] 1 lock held by perf_pmu/2631:
      [  385.698578]  #0:  (&cpuctx_mutex){+.+.}, at: [<ffffffff8116fe8c>] perf_event_ctx_lock_nested+0xbc/0x1d0
      [  385.698589]
                     stack backtrace:
      [  385.698595] CPU: 3 PID: 2631 Comm: perf_pmu Tainted: G     U          4.14.0-CI-Patchwork_7234+ #1
      [  385.698602] Hardware name:                  /NUC6CAYB, BIOS AYAPLCEL.86A.0040.2017.0619.1722 06/19/2017
      [  385.698609] Call Trace:
      [  385.698615]  dump_stack+0x5f/0x86
      [  385.698621]  print_circular_bug.isra.18+0x1d0/0x2c0
      [  385.698627]  __lock_acquire+0x19c3/0x1b60
      [  385.698634]  ? generic_exec_single+0x77/0xe0
      [  385.698640]  ? lock_acquire+0xaf/0x200
      [  385.698644]  lock_acquire+0xaf/0x200
      [  385.698650]  ? __might_fault+0x3e/0x90
      [  385.698655]  __might_fault+0x68/0x90
      [  385.698660]  ? __might_fault+0x3e/0x90
      [  385.698665]  _copy_to_user+0x1e/0x70
      [  385.698670]  perf_read+0x1aa/0x290
      [  385.698675]  __vfs_read+0x23/0x120
      [  385.698682]  ? __fget+0x101/0x1f0
      [  385.698686]  vfs_read+0xa3/0x150
      [  385.698691]  SyS_read+0x45/0xb0
      [  385.698696]  entry_SYSCALL_64_fastpath+0x1c/0xb1
      [  385.698701] RIP: 0033:0x7ff1c46876ed
      [  385.698705] RSP: 002b:00007fff13552f90 EFLAGS: 00000293 ORIG_RAX: 0000000000000000
      [  385.698712] RAX: ffffffffffffffda RBX: ffffc90000647ff0 RCX: 00007ff1c46876ed
      [  385.698718] RDX: 0000000000000010 RSI: 00007fff13552fa0 RDI: 0000000000000005
      [  385.698723] RBP: 000056063d300580 R08: 0000000000000000 R09: 0000000000000060
      [  385.698729] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000046
      [  385.698734] R13: 00007fff13552c6f R14: 00007ff1c6279d00 R15: 00007ff1c6279a40
      
      Testcase: igt/perf_pmu
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171122172621.16158-1-chris@chris-wilson.co.ukReviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      (cherry picked from commit ee48700d)
      Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      ef78970a
    • Inki Dae's avatar
      drm/exynos: remove unnecessary function declaration · 1cd6ae35
      Inki Dae authored
      Removed exynos_drm_get_dma_device funtion declaration on top
      of exynos_drm_drv.c file.
      
      We can remove this declaration by moving the implementation
      of this function upwards.
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      1cd6ae35
    • Inki Dae's avatar
      drm/exynos: remove unnecessary descrptions · 2f0f6dfc
      Inki Dae authored
      Removed two descriptions to 'da_start' and 'da_space_size'
      from exynos_drm_private structure.
      
      These members don't exist anymore.
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      2f0f6dfc
    • Marek Szyprowski's avatar
      drm/exynos: gem: Drop NONCONTIG flag for buffers allocated without IOMMU · 120a264f
      Marek Szyprowski authored
      When no IOMMU is available, all GEM buffers allocated by Exynos DRM driver
      are contiguous, because of the underlying dma_alloc_attrs() function
      provides only such buffers. In such case it makes no sense to keep
      BO_NONCONTIG flag for the allocated GEM buffers. This allows to avoid
      failures for buffer contiguity checks in the subsequent operations on GEM
      objects.
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      CC: stable@vger.kernel.org # v4.4+
      120a264f
    • Marek Szyprowski's avatar
      drm/exynos: Fix dma-buf import · 89452d4a
      Marek Szyprowski authored
      When IOMMU support was enabled, dma-buf import in Exynos DRM was broken
      since commit f43c3596 ("drm/exynos: use real device for DMA-mapping
      operations") due to using wrong struct device in drm_gem_prime_import()
      function. This patch fixes following kernel BUG caused by incorrect buffer
      mapping to DMA address space:
      
      exynos-sysmmu 14650000.sysmmu: 14450000.mixer: PAGE FAULT occurred at 0xb2e00000
      ------------[ cut here ]------------
      kernel BUG at drivers/iommu/exynos-iommu.c:449!
      Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
      Modules linked in:
      CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.0-rc4-next-20171016-00033-g990d723669fd #3165
      Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      task: c0e0b7c0 task.stack: c0e00000
      PC is at exynos_sysmmu_irq+0x1d0/0x24c
      LR is at exynos_sysmmu_irq+0x154/0x24c
      ------------[ cut here ]------------
      Reported-by: default avatarMarian Mihailescu <mihailescu2m@gmail.com>
      Fixes: f43c3596 ("drm/exynos: use real device for DMA-mapping operations")
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: default avatarTobias Jakobi <tjakobi@math.uni-bielefeld.de>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      89452d4a
  4. 06 Dec, 2017 9 commits
  5. 05 Dec, 2017 9 commits
  6. 04 Dec, 2017 2 commits
  7. 03 Dec, 2017 1 commit