From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hideki EIRAKU <hdk@igel.co.jp>
Cc: alsa-devel@alsa-project.org, Katsuya MATSUBARA <matsu@igel.co.jp>,
linux-fbdev@vger.kernel.org,
Russell King <linux@arm.linux.org.uk>,
linux-media@vger.kernel.org, Pawel Osciak <pawel@osciak.com>,
Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
Takashi Iwai <tiwai@suse.de>,
linux-kernel@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Kyungmin Park <kyungmin.park@samsung.com>,
linux-arm-kernel@lists.infradead.org,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH v3 4/4] fbdev: sh_mobile_lcdc: use dma_mmap_coherent if available
Date: Tue, 07 Aug 2012 12:15:06 +0000 [thread overview]
Message-ID: <3107106.PmlicBoqLd@avalon> (raw)
In-Reply-To: <1854100.yBXTHaXkcr@avalon>
On Tuesday 07 August 2012 14:01:43 Laurent Pinchart wrote:
> Hi Eiraku-san,
>
> On Monday 06 August 2012 18:55:24 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. It is
> > available on ARM platforms.
> >
> > Signed-off-by: Hideki EIRAKU <hdk@igel.co.jp>
>
> Acked-by: Hideki EIRAKU <hdk@igel.co.jp>
I obviously meant
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> As this patch doesn't depend on any other patch in your series
> (ARCH_HAS_DMA_MMAP_COHERENT will not be defined without 1/4, so this patch
> will be a no-op until then), I've applied it to my tree and will push it to
> avoid merge conflicts, unless you would prefer to push it yourself.
>
> > ---
> >
> > drivers/video/sh_mobile_lcdcfb.c | 28 ++++++++++++++++++++++++++++
> > 1 files changed, 28 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/video/sh_mobile_lcdcfb.c
> > b/drivers/video/sh_mobile_lcdcfb.c index 8cb653b..c8cba7a 100644
> > --- a/drivers/video/sh_mobile_lcdcfb.c
> > +++ b/drivers/video/sh_mobile_lcdcfb.c
> > @@ -1614,6 +1614,17 @@ static int sh_mobile_lcdc_overlay_blank(int blank,
> > struct fb_info *info) return 1;
> >
> > }
> >
> > +#ifdef ARCH_HAS_DMA_MMAP_COHERENT
> > +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);
> > +}
> > +#endif
> > +
> >
> > static struct fb_ops sh_mobile_lcdc_overlay_ops = {
> >
> > .owner = THIS_MODULE,
> > .fb_read = fb_sys_read,
> >
> > @@ -1626,6 +1637,9 @@ 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,
> >
> > +#ifdef ARCH_HAS_DMA_MMAP_COHERENT
> > + .fb_mmap = sh_mobile_lcdc_overlay_mmap,
> > +#endif
> >
> > };
> >
> > static void
> >
> > @@ -2093,6 +2107,17 @@ static int sh_mobile_lcdc_blank(int blank, struct
> > fb_info *info) return 0;
> >
> > }
> >
> > +#ifdef ARCH_HAS_DMA_MMAP_COHERENT
> > +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);
> > +}
> > +#endif
> > +
> >
> > static struct fb_ops sh_mobile_lcdc_ops = {
> >
> > .owner = THIS_MODULE,
> > .fb_setcolreg = sh_mobile_lcdc_setcolreg,
> >
> > @@ -2108,6 +2133,9 @@ 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,
> >
> > +#ifdef ARCH_HAS_DMA_MMAP_COHERENT
> > + .fb_mmap = sh_mobile_lcdc_mmap,
> > +#endif
> >
> > };
> >
> > static void
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2012-08-07 12:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 9:55 [PATCH v3 0/4] Use dma_mmap_coherent to support IOMMU mapper Hideki EIRAKU
2012-08-06 9:55 ` [PATCH v3 1/4] ARM: dma-mapping: define ARCH_HAS_DMA_MMAP_COHERENT Hideki EIRAKU
2012-08-07 15:22 ` Marek Szyprowski
2012-08-06 9:55 ` [PATCH v3 2/4] ALSA: pcm - Don't define ARCH_HAS_DMA_MMAP_COHERENT privately for ARM Hideki EIRAKU
2012-08-06 9:55 ` [PATCH v3 3/4] media: videobuf2-dma-contig: use dma_mmap_coherent if available Hideki EIRAKU
2012-08-07 14:53 ` Marek Szyprowski
2012-08-16 10:13 ` Hideki EIRAKU
2012-08-16 10:39 ` Marek Szyprowski
2012-08-06 9:55 ` [PATCH v3 4/4] fbdev: sh_mobile_lcdc: " Hideki EIRAKU
2012-08-07 12:01 ` Laurent Pinchart
2012-08-07 12:15 ` Laurent Pinchart [this message]
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=3107106.PmlicBoqLd@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=FlorianSchandinat@gmx.de \
--cc=alsa-devel@alsa-project.org \
--cc=hdk@igel.co.jp \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=m.szyprowski@samsung.com \
--cc=matsu@igel.co.jp \
--cc=mchehab@infradead.org \
--cc=pawel@osciak.com \
--cc=tiwai@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).