i965: Skip register write detection when possible.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 3 Mar 2017 02:27:32 +0000 (18:27 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 20 Mar 2017 22:58:05 +0000 (15:58 -0700)
commit5e29af5f772c1e1b02a4cc46d2f7d3b5d2151ad8
treed3cf06fe6f7a680c81ad00a9c61e64f54ecf8b51
parent31693a13f8fbc52d4f19f1e8800a4edabeecbe19
i965: Skip register write detection when possible.

Detecting register write support by trial and error introduces a
stall at screen creation time, which it would be nice to avoid.
Certain command parser versions guarantee this will work (see the
giant comment in intelInitScreen2 below, or a few commits ago):

- Ivybridge: version >= 1 (kernel v3.16)
- Baytrail:  version >= 2 (kernel v3.19)
- Haswell:   version >= 7 (kernel v4.8)

For simplicity, we don't bother with version 1 in this patch.

This assumes that the user hasn't disabled aliasing PPGTT via a kernel
command line parameter.  Don't do that - you're only breaking things.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
src/mesa/drivers/dri/i965/intel_screen.c