From: Rahul Sharma Date: Mon, 5 Nov 2012 15:34:29 +0000 (+0530) Subject: drm: exynos: fix for mapping of dma buffers X-Git-Tag: v3.8-rc1~82^2~13^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ddc404bc0b3750b015b021653a88943591f40f6;p=pandora-kernel.git drm: exynos: fix for mapping of dma buffers This patch fixes the problem of mapping contigous and non contigous dma buffers. Currently page struct is calculated from the buf->dma_addr which is not the physical address. It is replaced by buf->pages which points to the page struct of the first page of contigous memory chunk. This gives the correct page frame number for mapping. Non-contigous dma buffers are described using SG table and SG lists. Each valid SG List is pointing to a single page or group of pages which are physically contigous. Current implementation just maps the first page of each SG List and leave the other pages unmapped, leading to a crash. Given solution finds the page struct for the faulting page through parsing SG table and map it. Signed-off-by: Rahul Sharma Signed-off-by: Inki Dae Signed-off-by: Kyungmin Park --- Reading git-diff-tree failed