All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hideki EIRAKU <hdk@igel.co.jp>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Katsuya MATSUBARA <matsu@igel.co.jp>,
	Damian Hobson-Garcia <dhobsong@igel.co.jp>
Subject: Re: [PATCH v4] fbdev: sh_mobile_lcdc: use dma_mmap_coherent
Date: Thu, 16 Aug 2012 12:16:32 +0000	[thread overview]
Message-ID: <14014166.3JMiBq7jRA@avalon> (raw)
In-Reply-To: <1345112000-22738-1-git-send-email-hdk@igel.co.jp>

Hi Eiraku-san,

On Thursday 16 August 2012 19:13:20 Hideki EIRAKU wrote:
> fb_mmap() implemented in fbmem.c uses smem_start as the physical
> address of the frame buffer.  In the sh_mobile_lcdc driver, the
> smem_start is a dma_addr_t that is not a physical address when IOMMU is
> enabled.  dma_mmap_coherent() maps the address correctly.
> 
> Signed-off-by: Hideki EIRAKU <hdk@igel.co.jp>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

I will push the patch to v3.7 through my tree.

> ---
>  drivers/video/sh_mobile_lcdcfb.c |   20 ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/video/sh_mobile_lcdcfb.c
> b/drivers/video/sh_mobile_lcdcfb.c index 699487c..bccfd7e 100644
> --- a/drivers/video/sh_mobile_lcdcfb.c
> +++ b/drivers/video/sh_mobile_lcdcfb.c
> @@ -1614,6 +1614,15 @@ static int sh_mobile_lcdc_overlay_blank(int blank,
> struct fb_info *info) return 1;
>  }
> 
> +static int
> +sh_mobile_lcdc_overlay_mmap(struct fb_info *info, struct vm_area_struct
> *vma) +{
> +	struct sh_mobile_lcdc_overlay *ovl = info->par;
> +
> +	return dma_mmap_coherent(ovl->channel->lcdc->dev, vma, ovl->fb_mem,
> +				 ovl->dma_handle, ovl->fb_size);
> +}
> +
>  static struct fb_ops sh_mobile_lcdc_overlay_ops = {
>  	.owner          = THIS_MODULE,
>  	.fb_read        = fb_sys_read,
> @@ -1626,6 +1635,7 @@ static struct fb_ops sh_mobile_lcdc_overlay_ops = {
>  	.fb_ioctl       = sh_mobile_lcdc_overlay_ioctl,
>  	.fb_check_var	= sh_mobile_lcdc_overlay_check_var,
>  	.fb_set_par	= sh_mobile_lcdc_overlay_set_par,
> +	.fb_mmap	= sh_mobile_lcdc_overlay_mmap,
>  };
> 
>  static void
> @@ -2093,6 +2103,15 @@ static int sh_mobile_lcdc_blank(int blank, struct
> fb_info *info) return 0;
>  }
> 
> +static int
> +sh_mobile_lcdc_mmap(struct fb_info *info, struct vm_area_struct *vma)
> +{
> +	struct sh_mobile_lcdc_chan *ch = info->par;
> +
> +	return dma_mmap_coherent(ch->lcdc->dev, vma, ch->fb_mem,
> +				 ch->dma_handle, ch->fb_size);
> +}
> +
>  static struct fb_ops sh_mobile_lcdc_ops = {
>  	.owner          = THIS_MODULE,
>  	.fb_setcolreg	= sh_mobile_lcdc_setcolreg,
> @@ -2108,6 +2127,7 @@ static struct fb_ops sh_mobile_lcdc_ops = {
>  	.fb_release	= sh_mobile_lcdc_release,
>  	.fb_check_var	= sh_mobile_lcdc_check_var,
>  	.fb_set_par	= sh_mobile_lcdc_set_par,
> +	.fb_mmap	= sh_mobile_lcdc_mmap,
>  };
> 
>  static void

-- 
Regards,

Laurent Pinchart


WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hideki EIRAKU <hdk@igel.co.jp>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Katsuya MATSUBARA <matsu@igel.co.jp>,
	Damian Hobson-Garcia <dhobsong@igel.co.jp>
Subject: Re: [PATCH v4] fbdev: sh_mobile_lcdc: use dma_mmap_coherent
Date: Thu, 16 Aug 2012 14:16:32 +0200	[thread overview]
Message-ID: <14014166.3JMiBq7jRA@avalon> (raw)
In-Reply-To: <1345112000-22738-1-git-send-email-hdk@igel.co.jp>

Hi Eiraku-san,

On Thursday 16 August 2012 19:13:20 Hideki EIRAKU wrote:
> fb_mmap() implemented in fbmem.c uses smem_start as the physical
> address of the frame buffer.  In the sh_mobile_lcdc driver, the
> smem_start is a dma_addr_t that is not a physical address when IOMMU is
> enabled.  dma_mmap_coherent() maps the address correctly.
> 
> Signed-off-by: Hideki EIRAKU <hdk@igel.co.jp>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

I will push the patch to v3.7 through my tree.

> ---
>  drivers/video/sh_mobile_lcdcfb.c |   20 ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/video/sh_mobile_lcdcfb.c
> b/drivers/video/sh_mobile_lcdcfb.c index 699487c..bccfd7e 100644
> --- a/drivers/video/sh_mobile_lcdcfb.c
> +++ b/drivers/video/sh_mobile_lcdcfb.c
> @@ -1614,6 +1614,15 @@ static int sh_mobile_lcdc_overlay_blank(int blank,
> struct fb_info *info) return 1;
>  }
> 
> +static int
> +sh_mobile_lcdc_overlay_mmap(struct fb_info *info, struct vm_area_struct
> *vma) +{
> +	struct sh_mobile_lcdc_overlay *ovl = info->par;
> +
> +	return dma_mmap_coherent(ovl->channel->lcdc->dev, vma, ovl->fb_mem,
> +				 ovl->dma_handle, ovl->fb_size);
> +}
> +
>  static struct fb_ops sh_mobile_lcdc_overlay_ops = {
>  	.owner          = THIS_MODULE,
>  	.fb_read        = fb_sys_read,
> @@ -1626,6 +1635,7 @@ static struct fb_ops sh_mobile_lcdc_overlay_ops = {
>  	.fb_ioctl       = sh_mobile_lcdc_overlay_ioctl,
>  	.fb_check_var	= sh_mobile_lcdc_overlay_check_var,
>  	.fb_set_par	= sh_mobile_lcdc_overlay_set_par,
> +	.fb_mmap	= sh_mobile_lcdc_overlay_mmap,
>  };
> 
>  static void
> @@ -2093,6 +2103,15 @@ static int sh_mobile_lcdc_blank(int blank, struct
> fb_info *info) return 0;
>  }
> 
> +static int
> +sh_mobile_lcdc_mmap(struct fb_info *info, struct vm_area_struct *vma)
> +{
> +	struct sh_mobile_lcdc_chan *ch = info->par;
> +
> +	return dma_mmap_coherent(ch->lcdc->dev, vma, ch->fb_mem,
> +				 ch->dma_handle, ch->fb_size);
> +}
> +
>  static struct fb_ops sh_mobile_lcdc_ops = {
>  	.owner          = THIS_MODULE,
>  	.fb_setcolreg	= sh_mobile_lcdc_setcolreg,
> @@ -2108,6 +2127,7 @@ static struct fb_ops sh_mobile_lcdc_ops = {
>  	.fb_release	= sh_mobile_lcdc_release,
>  	.fb_check_var	= sh_mobile_lcdc_check_var,
>  	.fb_set_par	= sh_mobile_lcdc_set_par,
> +	.fb_mmap	= sh_mobile_lcdc_mmap,
>  };
> 
>  static void

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2012-08-16 12:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 10:13 [PATCH v4] fbdev: sh_mobile_lcdc: use dma_mmap_coherent Hideki EIRAKU
2012-08-16 10:13 ` Hideki EIRAKU
2012-08-16 12:16 ` Laurent Pinchart [this message]
2012-08-16 12:16   ` Laurent Pinchart
2012-12-10 10:31   ` Hideki EIRAKU
2012-12-10 10:31     ` Hideki EIRAKU
2012-12-10 22:54     ` Laurent Pinchart
2012-12-10 22:54       ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14014166.3JMiBq7jRA@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=FlorianSchandinat@gmx.de \
    --cc=dhobsong@igel.co.jp \
    --cc=hdk@igel.co.jp \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=matsu@igel.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.