drm/exynos: use sgt instead of pages for framebuffer address
authorPrathyush K <prathyush.k@samsung.com>
Thu, 22 Nov 2012 06:48:35 +0000 (12:18 +0530)
committerInki Dae <inki.dae@samsung.com>
Wed, 5 Dec 2012 05:39:21 +0000 (14:39 +0900)
The 'pages' structure in the exynos gem buffer has been
removed. So we get the fix.smem_start from the first sgl
of the scatter gather table.

Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_fbdev.c

index 151c4c9c50c7bd36d51aefd901857bc8a8f82e9e..a2232792e0c0bda1dd61c728fd715e88a2e602e5 100644 (file)
@@ -117,8 +117,8 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
 
        dev->mode_config.fb_base = (resource_size_t)buffer->dma_addr;
        fbi->screen_base = buffer->kvaddr + offset;
-       fbi->fix.smem_start = (unsigned long)(page_to_phys(buffer->pages[0]) +
-                               offset);
+       fbi->fix.smem_start = (unsigned long)
+                       (page_to_phys(sg_page(buffer->sgt->sgl)) + offset);
        fbi->screen_size = size;
        fbi->fix.smem_len = size;