drm/vmwgfx: Clean- and fix up DMA mode selection
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | drm/vmwgfx: Remove the vmw_dma_phys mode codedrivers/ drivers/ drivers/ | +1 | 0 replies | |
| 2/3 | drm/vmwgfx: Remove the restrict_dma_mask module parameterdrivers/ | +1 | 0 replies | |
| 3/3 | drm/vmwgfx: Use coherent memory if there are dma mapping size restrictionsdrivers/ | +11 | 1 reply |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Brian Paul |
|---|---|
| 1/3 | |
| 2/3 | |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] drm/vmwgfx: Clean- and fix up DMA mode selection
From: Thomas Hellstrom (VMware) <[email protected]>
Clean up and fix dma mode selection. We remove an unused mode, a largely unused module option and finally add a check to enable dma coherent memory in those cases streaming dma mappings are undesired or won't work.
Note that this series is intended to be applied on top ofgit://people.freedesktop.org/~thomash/linux branch vmwgfx-next
meaning that the vmw_dma_select mode function would, after applying the patches look like
static int vmw_dma_select_mode(struct vmw_private *dev_priv)
{
static const char *names[vmw_dma_map_max] = {
[vmw_dma_alloc_coherent] = "Using coherent TTM pages.",
[vmw_dma_map_populate] = "Caching DMA mappings.",
[vmw_dma_map_bind] = "Giving up DMA mappings early."};
/*
* dma_max_mapping_size() != SIZE_MAX means something is going
* on in the dma layer that the dma_map_bind or dma_map_populate modes
* are not working well with, or haven't been tested with.
* This typically happens when the SWIOTLB is active. Fall back to
* coherent memory in those cases.
*/
if (dma_max_mapping_size(dev_priv->dev->dev) != SIZE_MAX ||
vmw_force_coherent)
dev_priv->map_mode = vmw_dma_alloc_coherent;
else if (vmw_restrict_iommu)
dev_priv->map_mode = vmw_dma_map_bind;
else
dev_priv->map_mode = vmw_dma_map_populate;
if (!IS_ENABLED(CONFIG_DRM_TTM_DMA_PAGE_POOL) &&
(dev_priv->map_mode == vmw_dma_alloc_coherent))
return -EINVAL;
DRM_INFO("DMA map mode: %s\n", names[dev_priv->map_mode]);
return 0;
}Cc: Christoph Hellwig <[email protected]>
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel