From: "Terje Bergström" <tbergstrom@nvidia.com>
To: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Arto Merilainen <amerilainen@nvidia.com>,
"airlied@linux.ie" <airlied@linux.ie>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv5,RESEND 8/8] drm: tegra: Add gr2d device
Date: Sun, 10 Feb 2013 16:42:53 -0800 [thread overview]
Message-ID: <51183E8D.1090607@nvidia.com> (raw)
In-Reply-To: <20130208070734.GB15429@avionic-0098.mockup.avionic-design.de>
On 07.02.2013 23:07, Thierry Reding wrote:
> On Wed, Feb 06, 2013 at 01:23:17PM -0800, Terje Bergström wrote:
>>>> That's the security firewall. It walks through each submit, and ensures
>>>> that each register write that writes an address, goes through the host1x
>>>> reloc mechanism. This way user space cannot ask 2D to write to arbitrary
>>>> memory locations.
>>> I see. Can this be made more generic? Perhaps adding a table of valid
>>> registers to the device and use a generic function to iterate over that
>>> instead of having to provide the same function for each client.
>> For which one does gcc generate more efficient code? I've thought a
>> switch-case statement might get compiled into something more efficient
>> than a table lookup.
>> But the rest of the code is generic - just the one function which
>> compares against known address registers is specific to 2D.
> Table lookup should be pretty fast. I wouldn't worry too much about
> performance at this stage, though. Readability is more important in my
> opinion. A lookup table is a lot more readable and reusable I think. If
> it turns out that using a function is actually faster we can always
> optimize later.
You're right about performance. We already saw quite a bad performance
hit with the current firewall, so we'll need to worry about performance
later.
I'll take a look at converting the register list to a table. Instead of
always doing a linear search of a table, a bitfield might be more
appropriate.
Terje
next prev parent reply other threads:[~2013-02-11 0:43 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 11:43 [PATCHv5,RESEND 0/8] Support for Tegra 2D hardware Terje Bergstrom
2013-01-15 11:43 ` [PATCHv5,RESEND 1/8] gpu: host1x: Add host1x driver Terje Bergstrom
2013-02-04 9:09 ` Thierry Reding
2013-02-05 3:30 ` Terje Bergström
2013-02-05 7:43 ` Thierry Reding
2013-02-06 20:13 ` Terje Bergström
2013-01-15 11:43 ` [PATCHv5,RESEND 2/8] gpu: host1x: Add syncpoint wait and interrupts Terje Bergstrom
2013-02-04 10:30 ` Thierry Reding
2013-02-05 4:29 ` Terje Bergström
2013-02-05 8:42 ` Thierry Reding
2013-02-06 20:29 ` Terje Bergström
2013-02-06 20:38 ` Thierry Reding
2013-02-06 20:41 ` Terje Bergström
2013-01-15 11:43 ` [PATCHv5,RESEND 3/8] gpu: host1x: Add channel support Terje Bergstrom
2013-02-25 15:24 ` Thierry Reding
2013-02-26 9:48 ` Terje Bergström
2013-02-27 8:56 ` Thierry Reding
2013-03-08 16:16 ` Terje Bergström
2013-03-08 20:43 ` Thierry Reding
2013-03-11 6:29 ` Terje Bergström
2013-03-11 7:18 ` Thierry Reding
2013-03-11 9:21 ` Terje Bergström
2013-03-11 9:41 ` Thierry Reding
2013-01-15 11:44 ` [PATCHv5,RESEND 4/8] gpu: host1x: Add debug support Terje Bergstrom
2013-02-04 11:03 ` Thierry Reding
2013-02-05 4:41 ` Terje Bergström
2013-02-05 9:15 ` Thierry Reding
2013-02-06 20:58 ` Terje Bergström
2013-02-08 6:54 ` Thierry Reding
2013-01-15 11:44 ` [PATCHv5,RESEND 5/8] drm: tegra: Move drm to live under host1x Terje Bergstrom
2013-02-04 11:08 ` Thierry Reding
2013-02-05 4:45 ` Terje Bergström
2013-02-05 9:26 ` Thierry Reding
2013-01-15 11:44 ` [PATCHv5,RESEND 6/8] gpu: host1x: Remove second host1x driver Terje Bergstrom
2013-02-04 11:23 ` Thierry Reding
2013-01-15 11:44 ` [PATCHv5,RESEND 7/8] ARM: tegra: Add board data and 2D clocks Terje Bergstrom
2013-02-04 11:26 ` Thierry Reding
2013-02-04 17:06 ` Stephen Warren
2013-02-05 4:47 ` Terje Bergström
2013-01-15 11:44 ` [PATCHv5,RESEND 8/8] drm: tegra: Add gr2d device Terje Bergstrom
2013-02-04 12:56 ` Thierry Reding
2013-02-05 5:17 ` Terje Bergström
2013-02-05 9:54 ` Thierry Reding
2013-02-06 21:23 ` Terje Bergström
2013-02-08 7:07 ` Thierry Reding
2013-02-11 0:42 ` Terje Bergström [this message]
2013-02-11 6:44 ` Thierry Reding
2013-02-11 15:40 ` Terje Bergström
2013-01-22 9:03 ` [PATCHv5,RESEND 0/8] Support for Tegra 2D hardware Terje Bergström
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=51183E8D.1090607@nvidia.com \
--to=tbergstrom@nvidia.com \
--cc=airlied@linux.ie \
--cc=amerilainen@nvidia.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@avionic-design.de \
/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