Re: [PATCH v2 08/27] drm/tegra: gr2d: Miscellaneous cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 07.10.2013 16:05, Erik Faye-Lund wrote:
> On Mon, Oct 7, 2013 at 2:52 PM, Terje Bergström <tbergstrom@xxxxxxxxxx> wrote:
>> AND 0xff is necessary, because the same registers are mirrored in
>> multiple contexts. AND removes the offset coming from context, and
>> leaves just the plain register offset.
> The offsets in the commands don't have enough bits to reach over to
> the next context. The contexts are repeated at multiples of 0x4000,
> and 0xFFF is the largest encodable offset. So I don't really thing the
> AND is needed for *that* purpose.

Well, that was embarrassing. Of course that is true. You can access all
registers via MMIO or with SETCLASS to correct context. But that was
still the reason I used when I wrote that 0xff, so it's bogus.

Real fix is to do what Thierry already did: limit the bitmap to max
register number we're interested in, and have a if() to fail fast if
register number falls outside that range.

Even better, get IOMMU up and running.

Terje
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux