OpenCloudOS-Kernel/drivers/gpu/drm
Chris Wilson b47161858b drm/i915: Implement inter-engine read-read optimisations
Currently, we only track the last request globally across all engines.
This prevents us from issuing concurrent read requests on e.g. the RCS
and BCS engines (or more likely the render and media engines). Without
semaphores, we incur costly stalls as we synchronise between rings -
greatly impacting the current performance of Broadwell versus Haswell in
certain workloads (like video decode). With the introduction of
reference counted requests, it is much easier to track the last request
per ring, as well as the last global write request so that we can
optimise inter-engine read read requests (as well as better optimise
certain CPU waits).

v2: Fix inverted readonly condition for nonblocking waits.
v3: Handle non-continguous engine array after waits
v4: Rebase, tidy, rewrite ring list debugging
v5: Use obj->active as a bitfield, it looks cool
v6: Micro-optimise, mostly involving moving code around
v7: Fix retire-requests-upto for execlists (and multiple rq->ringbuf)
v8: Rebase
v9: Refactor i915_gem_object_sync() to allow the compiler to better
optimise it.

Benchmark: igt/gem_read_read_speed
hsw:gt3e (with semaphores):
Before: Time to read-read 1024k:		275.794µs
After:  Time to read-read 1024k:		123.260µs

hsw:gt3e (w/o semaphores):
Before: Time to read-read 1024k:		230.433µs
After:  Time to read-read 1024k:		124.593µs

bdw-u (w/o semaphores):             Before          After
Time to read-read 1x1:            26.274µs       10.350µs
Time to read-read 128x128:        40.097µs       21.366µs
Time to read-read 256x256:        77.087µs       42.608µs
Time to read-read 512x512:       281.999µs      181.155µs
Time to read-read 1024x1024:    1196.141µs     1118.223µs
Time to read-read 2048x2048:    5639.072µs     5225.837µs
Time to read-read 4096x4096:   22401.662µs    21137.067µs
Time to read-read 8192x8192:   89617.735µs    85637.681µs

Testcase: igt/gem_concurrent_blit (read-read and friends)
Cc: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> [v8]
[danvet: s/\<rq\>/req/g]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-05-21 15:11:42 +02:00
..
amd Linux 4.1-rc4 2015-05-20 16:23:53 +10:00
armada Merge branch 'drm-armada-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next 2015-05-15 15:24:41 +10:00
ast drm/fb-helper: Propagate errors from initial config failure 2015-01-21 14:57:03 +01:00
atmel-hlcdc drm: atmel-hlcdc: use appropriate enabled flag in suspend/resume 2015-03-16 16:10:42 +01:00
bochs drm/bochs: disable video before changing video mode 2015-04-01 08:28:15 +10:00
bridge Merge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next 2015-04-16 08:33:30 +10:00
cirrus Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-02-16 15:48:00 -08:00
exynos dma-buf: cleanup dma_buf_export() to make it easily extensible 2015-04-21 14:47:16 +05:30
gma500 drm/gma500: constify all struct drm_*_helper funcs pointers 2015-04-07 17:06:41 +02:00
i2c Merge branch 'drm-tda998x-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next 2015-05-15 15:23:10 +10:00
i810
i915 drm/i915: Implement inter-engine read-read optimisations 2015-05-21 15:11:42 +02:00
imx Merge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next 2015-04-16 08:33:30 +10:00
mga
mgag200 drm/mgag200: constify all struct drm_*_helper funcs pointers 2015-04-07 17:06:41 +02:00
msm Merge Linus master into drm-next 2015-04-20 13:05:20 +10:00
nouveau Merge tag 'topic/drm-misc-2015-04-15' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-04-16 08:34:24 +10:00
omapdrm dma-buf: cleanup dma_buf_export() to make it easily extensible 2015-04-21 14:47:16 +05:30
panel drm/panel: Add support for Ampire AM-800480R3TMQW-A1H 800x480 7" panel 2015-04-02 19:04:15 +02:00
qxl drm/qxl: rewrite framebuffer support 2015-05-07 13:09:25 +10:00
r128
radeon Linux 4.1-rc4 2015-05-20 16:23:53 +10:00
rcar-du drm: Use of-graph helpers to loop over endpoints 2015-04-13 17:28:16 +10:00
rockchip drm/rockchip: fix error check when getting irq 2015-04-20 09:02:31 +08:00
savage
shmobile drm: Kconfig: Let all DRM_GEM_CMA_HELPER related macros depend on HAVE_DMA_ATTRS 2015-02-03 11:12:37 +10:00
sis
sti drm: sti: convert driver to atomic modeset 2015-03-19 13:35:16 +01:00
tdfx
tegra drm/tegra: Don't use vblank_disable_immediate on incapable driver. 2015-05-08 20:56:34 +10:00
tilcdc drm: Kconfig: Let all DRM_GEM_CMA_HELPER related macros depend on HAVE_DMA_ATTRS 2015-02-03 11:12:37 +10:00
ttm dma-buf: cleanup dma_buf_export() to make it easily extensible 2015-04-21 14:47:16 +05:30
udl dma-buf: cleanup dma_buf_export() to make it easily extensible 2015-04-21 14:47:16 +05:30
vgem drm/vgem: implement virtual GEM 2015-04-02 09:21:48 +10:00
via
vmwgfx Merge tag 'topic/drm-misc-2015-03-31' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-04-01 08:23:25 +10:00
Kconfig drm/vgem: implement virtual GEM 2015-04-02 09:21:48 +10:00
Makefile drm/core: get rid of -Iinclude/drm 2015-05-13 11:28:22 +02:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic.c drm/atomic: Allow drivers to subclass drm_atomic_state, v3 2015-05-18 16:39:41 +02:00
drm_atomic_helper.c Merge tag 'topic/drm-misc-2015-05-19' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-05-20 09:19:58 +10:00
drm_auth.c drm: simplify authentication management 2015-05-05 09:45:57 +02:00
drm_bridge.c drm: Silence sparse warnings 2015-03-13 17:37:35 +01:00
drm_bufs.c
drm_cache.c drm/cache: Use wbinvd helpers 2014-12-16 08:56:55 +01:00
drm_context.c
drm_crtc.c Merge tag 'topic/drm-misc-2015-05-19' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-05-20 09:19:58 +10:00
drm_crtc_helper.c drm/atomic: Don't open-code CRTC state destroy 2015-05-07 11:03:02 +02:00
drm_crtc_internal.h drm/atomic: Hide drm.ko internal interfaces 2015-01-05 13:55:30 +01:00
drm_debugfs.c
drm_dma.c
drm_dp_helper.c drm: Fix for DP CTS test 4.2.2.5 - I2C DEFER handling 2015-04-20 09:29:41 -07:00
drm_dp_mst_topology.c Merge tag 'drm-intel-next-2015-03-13-merge' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-03-24 11:12:20 +10:00
drm_drv.c drm: simplify master cleanup 2015-05-05 09:46:38 +02:00
drm_edid.c Merge tag 'topic/drm-misc-2015-05-19' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-05-20 09:19:58 +10:00
drm_edid_load.c drm: Add edid_corrupt flag for Displayport Link CTS 4.2.2.6 2015-05-08 13:03:46 +02:00
drm_encoder_slave.c
drm_fb_cma_helper.c drm/cma: use correct fb width/height 2015-03-11 22:08:07 +01:00
drm_fb_helper.c drm/drm: constify all struct drm_*_helper funcs pointers 2015-04-07 18:11:25 +02:00
drm_flip_work.c drm/core: get rid of -Iinclude/drm 2015-05-13 11:28:22 +02:00
drm_fops.c drm: simplify authentication management 2015-05-05 09:45:57 +02:00
drm_gem.c
drm_gem_cma_helper.c
drm_global.c
drm_hashtab.c
drm_info.c drm: Silence sparse warnings 2015-03-13 17:37:35 +01:00
drm_internal.h drm: simplify authentication management 2015-05-05 09:45:57 +02:00
drm_ioc32.c drm: Silence sparse warnings 2015-03-13 17:37:35 +01:00
drm_ioctl.c drm: line wrap DRM_IOCTL_DEF* macros 2015-03-31 09:18:40 +02:00
drm_irq.c drm: Zero out invalid vblank timestamp in drm_update_vblank_count. 2015-05-11 06:02:38 +10:00
drm_legacy.h
drm_lock.c
drm_memory.c
drm_mipi_dsi.c drm/mipi-dsi: Avoid potential NULL pointer dereference 2015-01-28 08:45:37 +01:00
drm_mm.c [PATCH] drm/mm: Fix support 4 GiB and larger ranges 2015-03-16 06:28:50 +10:00
drm_modes.c drm: mode: Allow NULL modes for equality check 2015-03-23 16:22:30 +01:00
drm_modeset_lock.c drm: fix a memleak on mutex failure path 2015-05-05 09:26:43 +02:00
drm_of.c drm: use for_each_endpoint_of_node macro in drm_of_find_possible_crtcs 2015-04-08 11:14:25 +02:00
drm_panel.c
drm_pci.c drm: Silence sparse warnings 2015-03-13 17:37:35 +01:00
drm_plane_helper.c drm/drm: constify all struct drm_*_helper funcs pointers 2015-04-07 18:11:25 +02:00
drm_platform.c
drm_prime.c drm/prime: Allow internal imports without import_sg_table 2015-05-12 11:02:50 +02:00
drm_probe_helper.c Merge tag 'topic/drm-misc-2015-05-06' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-05-07 13:02:39 +10:00
drm_rect.c
drm_scatter.c
drm_sysfs.c drm/sysfs: remove unnecessary connector type checks 2015-05-12 19:15:53 +02:00
drm_trace.h tracing/drm: Remove unused TRACE_SYSTEM_STRING define 2015-04-07 12:29:23 -04:00
drm_trace_points.c
drm_vm.c drm: Silence sparse warnings 2015-03-13 17:37:35 +01:00
drm_vma_manager.c mm: remove rest usage of VM_NONLINEAR and pte_file() 2015-02-10 14:30:31 -08:00