Re: [PATCH 1/2] drm: rockchip: Don't pass DRM fake offset to dma-api

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Donnerstag, 16. April 2015, 16:41:51 schrieb Ørjan Eide:
> Set vm_pgoff to 0 after using it to look up the GEM node, before passing
> it on rockchip_gem_mmap_buf() where the offset must be from the start of
> the buffer.
> 
> Passing in the fake offset currently works because the
> dma_mmap_attrs implementation that is used for this device,
> arm_iommu_mmap_attrs, ignores the offset completely.
> 
> Signed-off-by: Ørjan Eide <orjan.eide@xxxxxxx>

both patches on a rk3288-veyron-pinky

Tested-by: Heiko Stuebner <heiko@xxxxxxxxx>

Through which tree do you want to take these patches? I guess the rockchip-drm 
related patch should go through the tree that will take the dma-mapping patch, 
so you'll probably need an "Ack" from Mark Yao (Cc'ed).


Heiko

> ---
>  drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
> b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c index 7ca8799e..69f01c3
> 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
> @@ -94,6 +94,11 @@ int rockchip_gem_mmap(struct file *filp, struct
> vm_area_struct *vma) return -EACCES;
>  	}
> 
> +	/* Set vm_pgoff (used as a fake buffer offset by DRM) to 0 and map the
> +	 * whole buffer from the start.
> +	 */
> +	vma->vm_pgoff = 0;
> +
>  	obj = container_of(node, struct drm_gem_object, vma_node);
>  	ret = rockchip_gem_mmap_buf(obj, vma);

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux