Tegra DRM device tree bindings
Hiroshi Doyu
hdoyu at nvidia.com
Wed Jun 27 05:44:00 PDT 2012
On Tue, 26 Jun 2012 16:00:33 +0200
Thierry Reding <thierry.reding at avionic-design.de> wrote:
> * PGP Signed by an unknown key
>
> On Tue, Jun 26, 2012 at 04:02:24PM +0300, Hiroshi Doyu wrote:
> > Hi Thierry,
> >
> > On Tue, 26 Jun 2012 12:55:13 +0200
> > Thierry Reding <thierry.reding at avionic-design.de> wrote:
> >
> > > > Old Signed by an unknown key
> > >
> > > Hi,
> > >
> > > while I haven't got much time to work on the actual code right now, I
> > > think it might still be useful if we could get the device tree binding
> > > to a point where everybody is happy with it. That'll also save me some
> > > time once I get to writing the code because I won't have to redo it over
> > > again. =)
> > >
> > > So here's the current proposal:
> > >
> > > host1x {
> > > compatible = "nvidia,tegra20-host1x", "simple-bus";
> > > reg = <0x50000000 0x00024000>;
> > > interrupts = <0 64 0x04 /* cop syncpt */
> > > 0 65 0x04 /* mpcore syncpt */
> > > 0 66 0x04 /* cop general */
> > > 0 67 0x04>; /* mpcore general */
> > >
> > > #address-cells = <1>;
> > > #size-cells = <1>;
> > >
> > > ranges = <0x54000000 0x54000000 0x04000000>;
> > >
> > > status = "disabled";
> > >
> > > gart = <&gart>;
> > ...
> > > output and hooks up a static EDID block with the LVDS output. There is
> > > also a carveout property which might be a better replacement for the
> > > "crippled" GART on Tegra20. Alternatively the CMA might work just as
> > > well instead.
> > >
> > > The Plutux can be described like this:
> > >
> > > host1x {
> > > carveout = <0x0e000000 0x02000000>;
> >
> > As discussed in the following ML thread previously, the necessary info
> > related to the "gart" would be got from the standard IOMMU API(or
> > something above layers, DMABUF or TTM?). So I don't think that we need
> > to refer to "gart" and "carveout" here in the end.
> >
> > http://lists.linuxfoundation.org/pipermail/iommu/2012-June/004266.html
>
> Yes, if IOMMU or some layer above can provide the same information, then
> that is certainly better than explicitly referencing it in the DT.
>
> I'm not sure I understand how information about the carveout would be
> obtained from the IOMMU API, though.
I think that there are 2 cases:
(1) discontiguous memory with IOMMU
(2) contiguous memory without IOMMU(called "carveout" in general?)
For (1), the necessary info should be passed via IOMMU API as
mentioned in the previous reply, like DT->{GART,SMMU}->IOMMU->DRM.
[PATCH 0/5] IOMMU: Make IOMMU-API ready for GART-like hardware
https://lkml.org/lkml/2012/1/19/170
For (2), although memory is mostly anonymous one, we may need to know
how much to allocate, where we only need "size". This size is not from
h/w feature, but it depends on the system load/usage. So I think that
this size can be passed from kernel command line? For exmaple, we can
specify how much contiguous memory is necessary with putting
"coherent_pool=??M" in the kernel command line as below:
coherent_pool=nn[KMG] [ARM,KNL]
Sets the size of memory pool for coherent, atomic dma
allocations.
More information about the dri-devel
mailing list