]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use MI_BATCH_BUFFER_START on 830/845
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 14 Dec 2015 16:23:49 +0000 (18:23 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 12 Jan 2016 14:13:00 +0000 (16:13 +0200)
commit76253b1aeef8aa7aa551ab97783aa17e4b0fffcf
treeef4de061d874fa4e3600463f1cfd7ca554314026
parent42e19cecbadcf7d98a937199a1e8f966585fb777
drm/i915: Use MI_BATCH_BUFFER_START on 830/845

MI_BATCH_BUFFER is nasty since it requires that userspace pass in the
correct batch length.

Let's switch to using MI_BATCH_BUFFER_START instead (like we do on
other platforms). Then we don't have to specify the batch length
at all, and the CS will instead execute until it sees the
MI_BATCH_BUFFER_END.

We still need the batch length since we do the CS TLB workaround
and copy the batch into the permanently pinned scratch object
and execute it from there. But for this we can simply use the
batch object length when the user hasn't specified the actual
batch length. So specifying the batch length becomes just a
way to optimize the batch copy a little bit.

We lost batch_len from a bunch of igts (including the quiesce batch)
so without this igt is utterly broken on 830/845. Also some igts such
as gem_cpu_reloc never specified the batch_len and so didn't work.
With MI_BATCH_BUFFER_START we don't have to fix up igt every time
someone forgets that 830/845 exist.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1450110229-30450-11-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.c