SUPERH platform development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] Gen2 IPMMU and DU prototype
Date: Fri, 02 Oct 2015 08:13:32 +0000	[thread overview]
Message-ID: <4312084.V9UEz2QYFm@avalon> (raw)
In-Reply-To: <20150930142242.25755.81946.sendpatchset@little-apple>

Hi Magnus,

On Friday 02 October 2015 12:12:22 Magnus Damm wrote:
> On Thu, Oct 1, 2015 at 11:30 PM, Laurent Pinchart wrote:
> > On Wednesday 30 September 2015 23:22:42 Magnus Damm wrote:
> >> From: Magnus Damm <damm+renesas@opensource.se>
> >> 
> >> Here is a simple hack to enable the IPMMU on R-Car Gen2.
> >> 
> >> The VGA port on r8a7790 Lager may be driven by the DU
> >> and the IPMMU via the modetest utility to output some
> >> test image.
> >> 
> >> Actually the r8a7790 DU device is connected to the
> >> IPMMU using two separate uTLBs, but the DU driver
> >> is currently supporting all DU instances using a
> >> single device. To make testing easily the r8a7790 DU
> >> driver code is with this patch hacked to just cover
> >> a single DU instance with a single IPMMU uTLB.
> > 
> > You can reference multiple uTLBs in the DT ipmmus property. The ipmmu-vmsa
> > driver currently requires all uTLBs to belong to the same IPMMU instance,
> > which shouldn't be an issue here.
> 
> Sure, from a DT property point of view it seems possible to assign
> multiple uTLBs to the DU node. I would like us to start integrating
> the IPMMU on Gen2 and passing multiple uTLBs in case of r8a7790 must
> be the right way to describe the hardware.
> 
> When it comes to the DU driver and memory management, from my point of
> view Gen2 also seems to pass a single device pointer passed to
> dma_alloc_writecombine(). I may be wrong, but to support multiple
> uTLBs it looks like we need to pass different device pointers to
> dma_alloc_writecombine() - unless some index is also passed how can
> the IPMMU code otherwise know which uTLB to use?
> 
> So it looks like the device pointer issue both affects Gen2 and Gen3.
> Of course I wish that wasn't the case, so please prove me wrong. =)

The IPMMU driver currently enables all uTLBs associated with a bus master 
device. As the driver uses a single page table for all uTLBs we shouldn't have 
any issue on Gen2. Problems will of course appear if/when we start using 
multiple page tables for a single IPMMU instance.

-- 
Regards,

Laurent Pinchart


      parent reply	other threads:[~2015-10-02  8:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 14:22 [PATCH] Gen2 IPMMU and DU prototype Magnus Damm
2015-10-01 14:30 ` Laurent Pinchart
2015-10-02  3:12 ` Magnus Damm
2015-10-02  8:13 ` 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=4312084.V9UEz2QYFm@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --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