[PATCH 0/2] Make the vmwgfx driver reasonably DMA-API compliant

2013-11-04 Thread Thomas Hellstrom
These patches makes the vmwgfx driver use the DMA API to obtain valid device addresses rather than blindly using physical addresses. The main motivation is to be able to use a virtual IOMMU in the future. Other TTM drivers typically map pages one by one rather than using a scatter-gather list,

[PATCH 2/2] drm/vmwgfx: Use the linux DMA api to get valid device addresses of pages

2013-11-04 Thread Thomas Hellstrom
The code handles three different cases: 1) physical page addresses. The ttm page array is used. 2) DMA subsystem addresses. A scatter-gather list is used. 3) Coherent pages. The ttm dma pool is used, together with the dma_ttm array os dma_addr_t Signed-off-by: Thomas Hellstrom

[PATCH 1/2] drm/ttm: Enable the dma page pool also for intel IOMMUs

2013-11-04 Thread Thomas Hellstrom
Used by the vmwgfx driver Signed-off-by: Thomas Hellstrom thellst...@vmware.com Reviewed-by: Jakob Bornecrantz ja...@vmware.com --- drivers/gpu/drm/ttm/Makefile |6 +- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c |3 +++ include/drm/ttm/ttm_page_alloc.h | 11

Re: [PATCH 2/2] drm/vmwgfx: Use the linux DMA api to get valid device addresses of pages

2013-11-04 Thread Daniel Vetter
On Mon, Nov 04, 2013 at 05:57:39AM -0800, Thomas Hellstrom wrote: The code handles three different cases: 1) physical page addresses. The ttm page array is used. 2) DMA subsystem addresses. A scatter-gather list is used. 3) Coherent pages. The ttm dma pool is used, together with the dma_ttm

Re: [PATCH 2/2] drm/vmwgfx: Use the linux DMA api to get valid device addresses of pages

2013-11-04 Thread Thomas Hellstrom
On 11/04/2013 05:27 PM, Daniel Vetter wrote: On Mon, Nov 04, 2013 at 05:57:39AM -0800, Thomas Hellstrom wrote: The code handles three different cases: 1) physical page addresses. The ttm page array is used. 2) DMA subsystem addresses. A scatter-gather list is used. 3) Coherent pages. The ttm

Re: [PATCH 0/2] Make the vmwgfx driver reasonably DMA-API compliant

2013-11-04 Thread Thomas Hellstrom
On 11/04/2013 05:30 PM, Konrad Rzeszutek Wilk wrote: On Mon, Nov 04, 2013 at 05:57:37AM -0800, Thomas Hellstrom wrote: These patches makes the vmwgfx driver use the DMA API to obtain valid device addresses rather than blindly using physical addresses. The main motivation is to be able to use

Re: [PATCH 1/2] drm/ttm: Enable the dma page pool also for intel IOMMUs

2013-11-04 Thread Thomas Hellstrom
On 11/04/2013 05:34 PM, Konrad Rzeszutek Wilk wrote: On Mon, Nov 04, 2013 at 05:57:38AM -0800, Thomas Hellstrom wrote: Used by the vmwgfx driver That looks OK to me. And baremetal should not be affected as the Intel VT-d driver turns of the SWIOTLB driver - so it will still use the classic

Re: [PATCH 2/2] drm/vmwgfx: Use the linux DMA api to get valid device addresses of pages

2013-11-04 Thread Thomas Hellstrom
On 11/04/2013 05:40 PM, Konrad Rzeszutek Wilk wrote: On Mon, Nov 04, 2013 at 05:57:39AM -0800, Thomas Hellstrom wrote: The code handles three different cases: 1) physical page addresses. The ttm page array is used. 2) DMA subsystem addresses. A scatter-gather list is used. 3) Coherent pages.

Re: [Mesa3d-dev] [PATCH 3/6] dri/intel: Add explicit size parameter to intel_region_alloc_for_fd

2013-11-04 Thread Ian Romanick
On 10/31/2013 04:13 PM, Keith Packard wrote: Instead of assuming that the size will be height * pitch, have the caller pass in the size explicitly. Signed-off-by: Keith Packard kei...@keithp.com One nit below. With that changed, Reviewed-by: Ian Romanick ian.d.roman...@intel.com ---