On Thu, Feb 07, 2019 at 03:26:47PM -0700, Jason Gunthorpe wrote:
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c 
> b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> index 31786b200afc47..e84f6aaee778f0 100644
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> @@ -311,7 +311,13 @@ static dma_addr_t __vmw_piter_dma_addr(struct vmw_piter 
> *viter)
>  
>  static dma_addr_t __vmw_piter_sg_addr(struct vmw_piter *viter)
>  {
> -     return sg_page_iter_dma_address(&viter->iter);
> +     /*
> +      * FIXME: This driver wrongly mixes DMA and CPU SG list iteration and
> +      * needs revision. See
> +      * https://lore.kernel.org/lkml/20190104223531.ga1...@ziepe.ca/
> +      */
> +     return sg_page_iter_dma_address(
> +             (struct sg_dma_page_iter *)&viter->iter);

Occured to me this would be better written as:

        return sg_page_iter_dma_address(
                container_of(&viter->iter, struct sg_dma_page_iter, base));

Since I think we are done with this now I'll fix it when I apply this
patch

Thanks for all the acks everyone

Regards,
Jason

Reply via email to