[Mesa-dev] [PATCH] i965: Cache register write capability checks.

Kenneth Graunke kenneth at whitecape.org
Mon Dec 22 18:30:37 PST 2014


On Monday, December 22, 2014 05:50:33 PM Ben Widawsky wrote:
> On Mon, Dec 22, 2014 at 01:28:32AM -0800, Kenneth Graunke wrote:
> > Our ability to perform register writes depends on the hardware and
> > kernel version.  It shouldn't ever change on a per-context basis,
> > so we only need to check once.
> 
> That's actually not true. The kernel currently supports dynamic changes of the
> module parameter for the command parser.

Interesting.  I didn't realize that.

> Because of that, and the fact that this
> improves one very synthetic microbench, in a perfect world we'd not merge this
> patch. However, I live in the real world, so maybe just add a comment that you
> can potentially shoot yourself in the foot if you change the module parameter in
> a running system, and then it's
> 
> Reviewed-by: Ben Widawsky <ben at bwidawsk.net>

Removing our ability to write registers would wreak havoc, even without this
patch.  We use it to determine whether to advertise GL 4.x features.  Once
we've told the application they're available, we can't change our mind and
take the functionality back (that would be crazy).

The command parser also doesn't allow us to write registers today, and I
thought the plan was to make it so userspace has to opt-in to software
scanning on Haswell.  When such an API is available, I suspect we'll just
use it, and drop this check.

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141222/b49403c7/attachment.sig>


More information about the mesa-dev mailing list