linux_dsm_epyc7002/drivers/gpu/drm
Chris Wilson 79ffac8599 drm/i915: Invert the GEM wakeref hierarchy
In the current scheme, on submitting a request we take a single global
GEM wakeref, which trickles down to wake up all GT power domains. This
is undesirable as we would like to be able to localise our power
management to the available power domains and to remove the global GEM
operations from the heart of the driver. (The intent there is to push
global GEM decisions to the boundary as used by the GEM user interface.)

Now during request construction, each request is responsible via its
logical context to acquire a wakeref on each power domain it intends to
utilize. Currently, each request takes a wakeref on the engine(s) and
the engines themselves take a chipset wakeref. This gives us a
transition on each engine which we can extend if we want to insert more
powermangement control (such as soft rc6). The global GEM operations
that currently require a struct_mutex are reduced to listening to pm
events from the chipset GT wakeref. As we reduce the struct_mutex
requirement, these listeners should evaporate.

Perhaps the biggest immediate change is that this removes the
struct_mutex requirement around GT power management, allowing us greater
flexibility in request construction. Another important knock-on effect,
is that by tracking engine usage, we can insert a switch back to the
kernel context on that engine immediately, avoiding any extra delay or
inserting global synchronisation barriers. This makes tracking when an
engine and its associated contexts are idle much easier -- important for
when we forgo our assumed execution ordering and need idle barriers to
unpin used contexts. In the process, it means we remove a large chunk of
code whose only purpose was to switch back to the kernel context.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190424200717.1686-5-chris@chris-wilson.co.uk
2019-04-24 22:26:49 +01:00
..
amd drm-misc-next for 5.2: 2019-03-25 11:05:12 +01:00
arc
arm drm-misc-next for 5.2: 2019-03-25 11:05:12 +01:00
armada
ast
atmel-hlcdc
bochs
bridge drm/bridge: ti-tfp410: Report input bus config through bridge timings 2019-03-18 11:42:13 +02:00
cirrus
etnaviv drm-misc-next for 5.2: 2019-03-25 11:05:12 +01:00
exynos drm/exynos/mixer: fix MIXER shadow registry synchronisation code 2019-03-21 09:47:29 +09:00
fsl-dcu drm: Use new DRM_BUS_FLAG_*_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags 2019-03-18 11:42:13 +02:00
gma500
hisilicon
i2c
i810
i915 drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
imx drm-misc-next for 5.2: 2019-03-25 11:05:12 +01:00
lib
mediatek
meson drm/meson: exclusively use the canvas provider module 2019-03-20 09:28:39 +01:00
mga
mgag200
msm drm-misc-next for 5.2: 2019-03-25 11:05:12 +01:00
mxsfb drm: Use new DRM_BUS_FLAG_*_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags 2019-03-18 11:42:13 +02:00
nouveau Merge branch 'linux-5.1' of git://github.com/skeggsb/linux into drm-fixes 2019-03-22 10:39:35 +10:00
omapdrm drm/omap: panel-tpo-td028ttec1: add backlight support 2019-03-18 11:42:14 +02:00
panel drm-misc-next for 5.2: 2019-03-25 11:05:12 +01:00
pl111 drm: Use new DRM_BUS_FLAG_*_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags 2019-03-18 11:42:13 +02:00
qxl drm-misc-next for 5.2: 2019-03-25 11:05:12 +01:00
r128
radeon
rcar-du drm: rcar-du: Add writeback support for R-Car Gen3 2019-03-18 17:24:51 +02:00
rockchip
savage
scheduler
selftests drm/selftests/mm: Switch to bitmap_zalloc() 2019-03-20 17:36:06 +00:00
shmobile
sis
sti
stm drm/stm: fix CONFIG_FB dependency 2019-03-11 15:40:29 +01:00
sun4i drm-misc-next for 5.2: 2019-03-25 11:05:12 +01:00
tdfx
tegra
tilcdc
tinydrm tinydrm/mipi-dbi: Use dma-safe buffers for all SPI transfers 2019-03-20 12:02:41 +01:00
ttm
tve200 drm: Use new DRM_BUS_FLAG_*_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags 2019-03-18 11:42:13 +02:00
udl drm-misc-next for 5.2: 2019-03-25 11:05:12 +01:00
v3d drm/v3d: Use the new shmem helpers to reduce driver boilerplate. 2019-03-14 12:06:44 -07:00
vboxvideo drm/vboxvideo: Remove unused including <linux/version.h> 2019-03-20 10:16:40 +01:00
vc4 drm-misc-next for 5.2: 2019-03-25 11:05:12 +01:00
vgem
via
virtio
vkms
vmwgfx Merge branch 'vmwgfx-fixes-5.1' of git://people.freedesktop.org/~thomash/linux into drm-fixes 2019-03-22 11:53:36 +10:00
xen
zte
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c drm-misc-next for 5.2: 2019-03-25 11:05:12 +01:00
drm_atomic_state_helper.c drm: writeback: Fix leak of writeback job 2019-03-18 17:24:32 +02:00
drm_atomic_uapi.c drm-misc-next for 5.2: 2019-03-25 11:05:12 +01:00
drm_atomic.c
drm_auth.c
drm_blend.c
drm_bridge.c
drm_bufs.c
drm_cache.c
drm_client.c
drm_color_mgmt.c
drm_connector.c drm/dp: Set the connector's TILE property even for DP SST connectors 2019-03-14 11:33:17 -07:00
drm_context.c
drm_crtc_helper_internal.h
drm_crtc_helper.c
drm_crtc_internal.h
drm_crtc.c
drm_damage_helper.c
drm_debugfs_crc.c
drm_debugfs.c
drm_dma.c
drm_dp_aux_dev.c
drm_dp_cec.c
drm_dp_dual_mode_helper.c
drm_dp_helper.c
drm_dp_mst_topology.c drm/dp: Set the connector's TILE property even for DP SST connectors 2019-03-14 11:33:17 -07:00
drm_drv.c
drm_dsc.c
drm_dumb_buffers.c
drm_edid_load.c
drm_edid.c drm: add non-desktop quirks to Sensics and OSVR headsets. 2019-03-15 10:46:53 +00:00
drm_encoder_slave.c
drm_encoder.c
drm_fb_cma_helper.c
drm_fb_helper.c
drm_file.c
drm_flip_work.c
drm_fourcc.c drm/fourcc: Fix conflicting Y41x definitions 2019-03-21 09:49:04 +01:00
drm_framebuffer.c
drm_gem_cma_helper.c
drm_gem_framebuffer_helper.c
drm_gem_shmem_helper.c drm: Add library for shmem backed GEM objects 2019-03-14 12:06:44 -07:00
drm_gem.c drm: Add helpers for locking an array of BO reservations. 2019-03-14 09:22:57 -07:00
drm_hashtab.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c
drm_irq.c
drm_kms_helper_common.c
drm_lease.c
drm_legacy.h
drm_lock.c
drm_memory.c
drm_mipi_dsi.c
drm_mm.c
drm_mode_config.c
drm_mode_object.c
drm_modes.c drm: Use new DRM_BUS_FLAG_*_(DRIVE|SAMPLE)_(POS|NEG)EDGE flags 2019-03-18 11:42:13 +02:00
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c
drm_panel_orientation_quirks.c
drm_panel.c
drm_pci.c
drm_plane_helper.c
drm_plane.c
drm_prime.c
drm_print.c
drm_probe_helper.c
drm_property.c
drm_rect.c
drm_scatter.c
drm_scdc_helper.c
drm_simple_kms_helper.c
drm_syncobj.c
drm_sysfs.c
drm_trace_points.c
drm_trace.h
drm_vblank.c
drm_vm.c
drm_vma_manager.c
drm_writeback.c drm: writeback: Add job prepare and cleanup operations 2019-03-18 17:24:38 +02:00
Kconfig drm: Add library for shmem backed GEM objects 2019-03-14 12:06:44 -07:00
Makefile drm: Add library for shmem backed GEM objects 2019-03-14 12:06:44 -07:00