From: Takanari Hayama <taki@igel.co.jp>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Linux-sh list <linux-sh@vger.kernel.org>
Subject: Re: [PATCH 1/2] v4l: vsp1: Reset VSP1 RPF source address
Date: Thu, 27 Nov 2014 00:57:30 +0000 [thread overview]
Message-ID: <547676FA.6090406@igel.co.jp> (raw)
In-Reply-To: <CAMuHMdWFgaxgNFOkXktBzoVe7ncjD0Xu12YHV1BFrZUh11UzDQ@mail.gmail.com>
Hi Geert,
On 11/26/14, 5:59 PM, Geert Uytterhoeven wrote:
> Hi Hayama-san,
>
> On Wed, Nov 26, 2014 at 7:19 AM, Takanari Hayama <taki@igel.co.jp> wrote:
>> @@ -179,6 +190,10 @@ static void rpf_vdev_queue(struct vsp1_video *video,
>> struct vsp1_video_buffer *buf)
>> {
>> struct vsp1_rwpf *rpf = container_of(video, struct vsp1_rwpf, video);
>> + int i;
>> +
>> + for (i = 0; i < 3; i++)
>> + rpf->buf_addr[i] = buf->addr[i];
>
> vsp1_video_buffer.addr is "dma_addr_t addr[3];"...
Oops. Thank you for pointing that out.
> BTW, you can use memcpy() instead of an explicit loop.
I thought about it too. However, it might not be that straight forward.
VSP1 accepts only 32-bit address. If we enable LPAE, the address should
be converted and mapped to 32-bit address space via IPMMU. So, once
IPMMU is supported, we should do address mapping.
So, I guess we should leave this loop as is here, so that we can add
some address conversion in the future.
>>
>> vsp1_rpf_write(rpf, VI6_RPF_SRCM_ADDR_Y,
>> buf->addr[0] + rpf->offsets[0]);
>> diff --git a/drivers/media/platform/vsp1/vsp1_rwpf.h b/drivers/media/platform/vsp1/vsp1_rwpf.h
>> index 28dd9e7..1f98fe3 100644
>> --- a/drivers/media/platform/vsp1/vsp1_rwpf.h
>> +++ b/drivers/media/platform/vsp1/vsp1_rwpf.h
>> @@ -39,6 +39,8 @@ struct vsp1_rwpf {
>> struct v4l2_rect crop;
>>
>> unsigned int offsets[2];
>> +
>> + unsigned int buf_addr[3];
>
> ... hence the above should use dma_addr_t, too.
>
> If CONFIG_ARM_LPAE is enabled, CONFIG_ARCH_DMA_ADDR_T_64BIT
> will be enabled, too, and dma_addr_t will be u64.
Thanks. Although we cannot support LPAE for VSP1 without IPMMU, I'll
change it to dma_addr_t anyway.
>
>> };
Cheers,
Takanari Hayama, Ph.D. (taki@igel.co.jp)
IGEL Co.,Ltd.
http://www.igel.co.jp/
next prev parent reply other threads:[~2014-11-27 0:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-26 6:19 [PATCH 0/2] v4l: vsp1: crop and a single input issues Takanari Hayama
2014-11-26 6:19 ` [PATCH 1/2] v4l: vsp1: Reset VSP1 RPF source address Takanari Hayama
2014-11-26 8:59 ` Geert Uytterhoeven
2014-11-27 0:57 ` Takanari Hayama [this message]
2014-11-26 6:19 ` [PATCH 2/2] v4l: vsp1: Always enable virtual RPF when BRU is in use Takanari Hayama
2014-11-26 12:55 ` Sergei Shtylyov
2014-11-27 1:01 ` Takanari Hayama
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=547676FA.6090406@igel.co.jp \
--to=taki@igel.co.jp \
--cc=geert@linux-m68k.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
/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