1. 16 9月, 2019 6 次提交
  2. 10 9月, 2019 2 次提交
  3. 06 9月, 2019 7 次提交
  4. 29 8月, 2019 3 次提交
    • L
      drm/nouveau: Don't retry infinitely when receiving no data on i2c over AUX · f88c31b4
      Lyude Paul 提交于
      commit c358ebf59634f06d8ed176da651ec150df3c8686 upstream.
      
      While I had thought I had fixed this issue in:
      
      commit 342406e4fbba ("drm/nouveau/i2c: Disable i2c bus access after
      ->fini()")
      
      It turns out that while I did fix the error messages I was seeing on my
      P50 when trying to access i2c busses with the GPU in runtime suspend, I
      accidentally had missed one important detail that was mentioned on the
      bug report this commit was supposed to fix: that the CPU would only lock
      up when trying to access i2c busses _on connected devices_ _while the
      GPU is not in runtime suspend_. Whoops. That definitely explains why I
      was not able to get my machine to hang with i2c bus interactions until
      now, as plugging my P50 into it's dock with an HDMI monitor connected
      allowed me to finally reproduce this locally.
      
      Now that I have managed to reproduce this issue properly, it looks like
      the problem is much simpler then it looks. It turns out that some
      connected devices, such as MST laptop docks, will actually ACK i2c reads
      even if no data was actually read:
      
      [  275.063043] nouveau 0000:01:00.0: i2c: aux 000a: 1: 0000004c 1
      [  275.063447] nouveau 0000:01:00.0: i2c: aux 000a: 00 01101000 10040000
      [  275.063759] nouveau 0000:01:00.0: i2c: aux 000a: rd 00000001
      [  275.064024] nouveau 0000:01:00.0: i2c: aux 000a: rd 00000000
      [  275.064285] nouveau 0000:01:00.0: i2c: aux 000a: rd 00000000
      [  275.064594] nouveau 0000:01:00.0: i2c: aux 000a: rd 00000000
      
      Because we don't handle the situation of i2c ack without any data, we
      end up entering an infinite loop in nvkm_i2c_aux_i2c_xfer() since the
      value of cnt always remains at 0. This finally properly explains how
      this could result in a CPU hang like the ones observed in the
      aforementioned commit.
      
      So, fix this by retrying transactions if no data is written or received,
      and give up and fail the transaction if we continue to not write or
      receive any data after 32 retries.
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f88c31b4
    • C
      drm/vmwgfx: fix memory leak when too many retries have occurred · fa6f4687
      Colin Ian King 提交于
      [ Upstream commit 6b7c3b86f0b63134b2ab56508921a0853ffa687a ]
      
      Currently when too many retries have occurred there is a memory
      leak on the allocation for reply on the error return path. Fix
      this by kfree'ing reply before returning.
      
      Addresses-Coverity: ("Resource leak")
      Fixes: a9cd9c04 ("drm/vmwgfx: Add a check to handle host message failure")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Reviewed-by: NDeepak Rawat <drawat@vmware.com>
      Signed-off-by: NDeepak Rawat <drawat@vmware.com>
      Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      fa6f4687
    • D
      drm/rockchip: Suspend DP late · 6cb49978
      Douglas Anderson 提交于
      [ Upstream commit f7ccbed656f78212593ca965d9a8f34bf24e0aab ]
      
      In commit fe64ba5c ("drm/rockchip: Resume DP early") we moved
      resume to be early but left suspend at its normal time.  This seems
      like it could be OK, but casues problems if a suspend gets interrupted
      partway through.  The OS only balances matching suspend/resume levels.
      ...so if suspend was called then resume will be called.  If suspend
      late was called then resume early will be called.  ...but if suspend
      was called resume early might not get called.  This leads to an
      unbalance in the clock enables / disables.
      
      Lets take the simple fix and just move suspend to be late to match.
      This makes the PM core take proper care in keeping things balanced.
      
      Fixes: fe64ba5c ("drm/rockchip: Resume DP early")
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Signed-off-by: NSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190802184616.44822-1-dianders@chromium.orgSigned-off-by: NSasha Levin <sashal@kernel.org>
      6cb49978
  5. 25 8月, 2019 4 次提交
  6. 16 8月, 2019 7 次提交
  7. 07 8月, 2019 2 次提交
    • X
      drm/i915/gvt: fix incorrect cache entry for guest page mapping · a7340d31
      Xiaolin Zhang 提交于
      commit 7366aeb77cd840f3edea02c65065d40affaa7f45 upstream.
      
      GPU hang observed during the guest OCL conformance test which is caused
      by THP GTT feature used durning the test.
      
      It was observed the same GFN with different size (4K and 2M) requested
      from the guest in GVT. So during the guest page dma map stage, it is
      required to unmap first with orginal size and then remap again with
      requested size.
      
      Fixes: b901b252 ("drm/i915/gvt: Add 2M huge gtt support")
      Cc: stable@vger.kernel.org
      Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NXiaolin Zhang <xiaolin.zhang@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a7340d31
    • Y
      drm/nouveau: fix memory leak in nouveau_conn_reset() · 4c6500b5
      Yongxin Liu 提交于
      [ Upstream commit 09b90e2fe35faeace2488234e2a7728f2ea8ba26 ]
      
      In nouveau_conn_reset(), if connector->state is true,
      __drm_atomic_helper_connector_destroy_state() will be called,
      but the memory pointed by asyc isn't freed. Memory leak happens
      in the following function __drm_atomic_helper_connector_reset(),
      where newly allocated asyc->state will be assigned to connector->state.
      
      So using nouveau_conn_atomic_destroy_state() instead of
      __drm_atomic_helper_connector_destroy_state to free the "old" asyc.
      
      Here the is the log showing memory leak.
      
      unreferenced object 0xffff8c5480483c80 (size 192):
        comm "kworker/0:2", pid 188, jiffies 4294695279 (age 53.179s)
        hex dump (first 32 bytes):
          00 f0 ba 7b 54 8c ff ff 00 00 00 00 00 00 00 00  ...{T...........
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<000000005005c0d0>] kmem_cache_alloc_trace+0x195/0x2c0
          [<00000000a122baed>] nouveau_conn_reset+0x25/0xc0 [nouveau]
          [<000000004fd189a2>] nouveau_connector_create+0x3a7/0x610 [nouveau]
          [<00000000c73343a8>] nv50_display_create+0x343/0x980 [nouveau]
          [<000000002e2b03c3>] nouveau_display_create+0x51f/0x660 [nouveau]
          [<00000000c924699b>] nouveau_drm_device_init+0x182/0x7f0 [nouveau]
          [<00000000cc029436>] nouveau_drm_probe+0x20c/0x2c0 [nouveau]
          [<000000007e961c3e>] local_pci_probe+0x47/0xa0
          [<00000000da14d569>] work_for_cpu_fn+0x1a/0x30
          [<0000000028da4805>] process_one_work+0x27c/0x660
          [<000000001d415b04>] worker_thread+0x22b/0x3f0
          [<0000000003b69f1f>] kthread+0x12f/0x150
          [<00000000c94c29b7>] ret_from_fork+0x3a/0x50
      Signed-off-by: NYongxin Liu <yongxin.liu@windriver.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      4c6500b5
  8. 31 7月, 2019 9 次提交