1. 04 11月, 2020 12 次提交
  2. 30 10月, 2020 22 次提交
  3. 29 10月, 2020 2 次提交
  4. 28 10月, 2020 4 次提交
    • D
      drm/shme-helpers: Fix dma_buf_mmap forwarding bug · f49a51bf
      Daniel Vetter 提交于
      When we forward an mmap to the dma_buf exporter, they get to own
      everything. Unfortunately drm_gem_mmap_obj() overwrote
      vma->vm_private_data after the driver callback, wreaking the
      exporter complete. This was noticed because vb2_common_vm_close blew
      up on mali gpu with panfrost after commit 26d3ac3c
      ("drm/shmem-helpers: Redirect mmap for imported dma-buf").
      
      Unfortunately drm_gem_mmap_obj also acquires a surplus reference that
      we need to drop in shmem helpers, which is a bit of a mislayer
      situation. Maybe the entire dma_buf_mmap forwarding should be pulled
      into core gem code.
      
      Note that the only two other drivers which forward mmap in their own
      code (etnaviv and exynos) get this somewhat right by overwriting the
      gem mmap code. But they seem to still have the leak. This might be a
      good excuse to move these drivers over to shmem helpers completely.
      Reviewed-by: NBoris Brezillon <boris.brezillon@collabora.com>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Russell King <linux+etnaviv@armlinux.org.uk>
      Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Joonyoung Shim <jy0922.shim@samsung.com>
      Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Fixes: 26d3ac3c ("drm/shmem-helpers: Redirect mmap for imported dma-buf")
      Cc: Boris Brezillon <boris.brezillon@collabora.com>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: dri-devel@lists.freedesktop.org
      Cc: linux-media@vger.kernel.org
      Cc: linaro-mm-sig@lists.linaro.org
      Cc: <stable@vger.kernel.org> # v5.9+
      Reported-and-tested-by: piotr.oniszczuk@gmail.com
      Cc: piotr.oniszczuk@gmail.com
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201027214922.3566743-1-daniel.vetter@ffwll.ch
      f49a51bf
    • M
      drm/vc4: hdmi: Avoid sleeping in atomic context · 58d04369
      Maxime Ripard 提交于
      When running the trigger hook, ALSA by default will take a spinlock, and
      thus will run the trigger hook in atomic context.
      
      However, our HDMI driver will send the infoframes as part of the trigger
      hook, and part of that process is to wait for a bit to be cleared for up to
      100ms. To be nicer to the system, that wait has some usleep_range that
      interact poorly with the atomic context.
      
      There's several ways we can fix this, but the more obvious one is to make
      ALSA take a mutex instead by setting the nonatomic flag on the DAI link.
      That doesn't work though, since now the cyclic callback installed by the
      dmaengine helpers in ALSA will take a mutex, while that callback is run by
      dmaengine's virt-chan code in a tasklet where sleeping is not allowed
      either.
      
      Given the delay we need to poll the bit for, changing the usleep_range for
      a udelay and keep running it from a context where interrupts are disabled
      is not really a good option either.
      
      However, we can move the infoframe setup code in the hw_params hook, like
      is usually done in other HDMI controllers, that isn't protected by a
      spinlock and thus where we can sleep. Infoframes will be sent on a regular
      basis anyway, and since hw_params is where the audio parameters that end up
      in the infoframes are setup, this also makes a bit more sense.
      
      Fixes: bb7d7856 ("drm/vc4: Add HDMI audio support")
      Suggested-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NMaxime Ripard <maxime@cerno.tech>
      Reviewed-by: NMark Brown <broonie@kernel.org>
      Reviewed-by: NTakashi Iwai <tiwai@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201027101558.427256-1-maxime@cerno.tech
      58d04369
    • A
      drm/amdgpu/pm: fix the fan speed in fan1_input in manual mode for navi1x · 65d437b8
      Alex Deucher 提交于
      It has been confirmed that the SMU metrics table should always reflect
      the current fan speed even in manual mode.
      
      Fixes: 3033e9f1c2de ("drm/amdgpu/swsmu: handle manual fan readback on SMU11")
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      65d437b8
    • K
      drm/amd/pm: fix the wrong fan speed in fan1_input · e72d9844
      Kenneth Feng 提交于
      fix the wrong fan speed in fan1_input when the fan control mode is manual.
      the fan speed value is not correct when we set manual mode to fan1_enalbe - 1.
      since the fan speed in the metrics table always reflects the real fan speed,we
      can fetch the fan speed for both auto and manual mode.
      Signed-off-by: NKenneth Feng <kenneth.feng@amd.com>
      Reviewed-by: NLikun Gao <Likun.Gao@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      e72d9844