[PATCH] drm/exynos: use sgt instead of pages for framebuffer address

Inki Dae inki.dae at samsung.com
Wed Nov 21 23:13:00 PST 2012


Right, I missed.

Thanks,
Inki Dae

> -----Original Message-----
> From: Prathyush K [mailto:prathyush.k at samsung.com]
> Sent: Thursday, November 22, 2012 3:49 PM
> To: dri-devel at lists.freedesktop.org
> Cc: inki.dae at samsung.com
> Subject: [PATCH] drm/exynos: use sgt instead of pages for framebuffer
> address
> 
> 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 at samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_drm_fbdev.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> index 3d5910f..d37f281 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> @@ -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;
> 
> --
> 1.7.0.4



More information about the dri-devel mailing list