1. 06 Dec, 2018 2 commits
    • Yu Zhao's avatar
      ASoC: use dma_ops of parent device for acp_audio_dma · 23aa128b
      Yu Zhao authored
      AMD platform device acp_audio_dma can only be created by parent PCI
      device driver (drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c). Pass struct
      device of the parent to snd_pcm_lib_preallocate_pages() so
      dma_alloc_coherent() can use correct dma_ops. Otherwise, it will
      use default dma_ops which is nommu_dma_ops on x86_64 even when
      IOMMU is enabled and set to non passthrough mode.
      
      Though platform device inherits some dma related fields during its
      creation in mfd_add_device(), we can't simply pass its struct device
      to snd_pcm_lib_preallocate_pages() because dma_ops is not among the
      inherited fields. Even it were, drivers/iommu/amd_iommu.c would
      ignore it because get_device_id() doesn't handle platform device.
      
      This change shouldn't give us any trouble even struct device of the
      parent becomes null or represents some non PCI device in the future,
      because get_dma_ops() correctly handles null struct device or uses
      the default dma_ops if struct device doesn't have it set.
      Signed-off-by: default avatarYu Zhao <yuzhao@google.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      23aa128b
    • Yu Zhao's avatar
      ASoC: use DMA addr rather than CPU pa for acp_audio_dma · d6d08273
      Yu Zhao authored
      We shouldn't assume CPU physical address we get from page_to_phys()
      is same as DMA address we get from dma_alloc_coherent(). On x86_64,
      we won't run into any problem with the assumption when dma_ops is
      nommu_dma_ops. However, DMA address is IOVA when IOMMU is enabled.
      And it's most likely different from CPU physical address when AMD
      IOMMU is not in passthrough mode.
      Signed-off-by: default avatarYu Zhao <yuzhao@google.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      d6d08273
  2. 04 Dec, 2018 9 commits
  3. 03 Dec, 2018 3 commits
  4. 29 Nov, 2018 1 commit
  5. 28 Nov, 2018 11 commits
  6. 26 Nov, 2018 4 commits
  7. 23 Nov, 2018 10 commits