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

Erik Faye-Lund kusmabite at gmail.com
Mon Oct 7 13:34:44 CEST 2013


On Mon, Oct 7, 2013 at 10:34 AM, Thierry Reding
<thierry.reding at gmail.com> wrote:
> Rework the address table code for the host1x firewall. The previous
> implementation allocated a bitfield but didn't check for a valid pointer
> so it could potentially crash.

I don't think it could crash. The bitmaps was allocated as a 256-bit
field, and the register offset gets AND'ed with 0xFF before being
looked up. What am I missing?

> Furthermore setting up a bitfield makes
> the code more complex than it needs to be.

Doesn't this perform worse than the current implementation? Going from
1 to 13 checks per write sounds less than ideal to me...


More information about the dri-devel mailing list