linux_dsm_epyc7002/drivers/gpu/drm
Lionel Landwerlin ec431eae8f drm/i915/perf: lock powergating configuration to default when active
If some of the contexts submitting workloads to the GPU have been
configured to shutdown slices/subslices, we might loose the NOA
configurations written in the NOA muxes.

One possible solution to this problem is to reprogram the NOA muxes
when we switch to a new context. We initially tried this in the
workaround batchbuffer but some concerns where raised about the cost
of reprogramming at every context switch. This solution is also not
without consequences from the userspace point of view. Reprogramming
of the muxes can only happen once the powergating configuration has
changed (which happens after context switch). This means for a window
of time during the recording, counters recorded by the OA unit might
be invalid. This requires userspace dealing with OA reports to discard
the invalid values.

Minimizing the reprogramming could be implemented by tracking of the
last programmed configuration somewhere in GGTT and use MI_PREDICATE
to discard some of the programming commands, but the command streamer
would still have to parse all the MI_LRI instructions in the
workaround batchbuffer.

Another solution, which this change implements, is to simply disregard
the user requested configuration for the period of time when i915/perf
is active.

On most platforms there are no issues with this apart from a performance
penality for some media workloads that benefit from running on a partially
powergated GPU. We already prevent RC6 from affecting the programming so
it doesn't sound completely unreasonable to hold on powergating for the
same reason.

On Icelake however there would a functional problem if the slices not-
containing the VME block were left enabled with a running media workload
which explicitly disabled them. To avoid a GPU hang in this case, on
Icelake we lock the enablement to only slices which contain VME blocks.
Downside is that it means degraded GPU performance when OA is active but
there is no known alternative solution for this.

v2: Leave RPCS programming in intel_lrc.c (Lionel)

v3: Update for s/union intel_sseu/struct intel_sseu/ (Lionel)
    More to_intel_context() (Tvrtko)
    s/dev_priv/i915/ (Tvrtko)

Tvrtko Ursulin:

v4:
 * Rebase for make_rpcs changes.

v5:
 * Apply OA restriction from make_rpcs directly.

v6:
 * Rebase for context image setup changes.

v7:
 * Move stream assignment before metric enable.

v8-9:
 * Rebase.

v10:
 * Squashed with ICL support patch.

Bspec: 21140
Co-developed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> # v9
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190205095032.22673-2-tvrtko.ursulin@linux.intel.com
2019-02-05 11:31:52 +00:00
..
amd drm: move drm_can_sleep() to drm_util.h 2019-01-14 10:58:37 +01:00
arc drm/arc: Don't set the dpms hook 2019-01-11 22:54:37 +01:00
arm drm: mali-dp: Enable Mali-DP tiled buffer formats 2018-11-02 09:57:27 +00:00
armada drm: armada: Cleanup drm_display_mode print str 2019-01-15 13:20:48 +01:00
ast drm: move drm_can_sleep() to drm_util.h 2019-01-14 10:58:37 +01:00
atmel-hlcdc drm/atmel-hlcdc: Use drm_fbdev_generic_setup() 2018-11-01 15:24:22 +01:00
bochs drm/bochs: move remaining fb bits to kms 2019-01-14 08:39:17 +01:00
bridge drm-misc-next for 5.1: 2019-01-24 20:02:12 +10:00
cirrus drm: move drm_can_sleep() to drm_util.h 2019-01-14 10:58:37 +01:00
etnaviv drm-misc-next for 5.1: 2019-01-10 05:58:52 +10:00
exynos drm-misc-next for 5.1: 2019-01-18 09:31:28 +10:00
fsl-dcu drm/fsl-dcu: Use drm_fbdev_generic_setup() 2018-11-01 15:23:58 +01:00
gma500
hisilicon drm/hisilicon/kirin: Use drm_fbdev_generic_setup() 2019-01-14 12:33:36 +01:00
i2c drm-misc-next for 5.1: 2019-01-18 09:31:28 +10:00
i810
i915 drm/i915/perf: lock powergating configuration to default when active 2019-02-05 11:31:52 +00:00
imx drm/imx: ipuv3-plane: add IDMAC timeout warning 2018-11-05 14:56:04 +01:00
lib
mediatek drm-misc-next for 5.1: 2019-01-18 09:31:28 +10:00
meson drm/meson: remove firmware framebuffers 2019-01-14 16:56:11 +01:00
mga
mgag200 drm: move drm_can_sleep() to drm_util.h 2019-01-14 10:58:37 +01:00
msm drm-misc-next for 5.1: 2019-01-18 09:31:28 +10:00
mxsfb drm/mxsfb: Use drm_fbdev_generic_setup() 2019-01-14 12:35:05 +01:00
nouveau drm: Move the legacy kms disable_all helper to crtc helpers 2019-01-11 22:54:29 +01:00
omapdrm drm: move drm_can_sleep() to drm_util.h 2019-01-14 10:58:37 +01:00
panel drm/panel: panel-innolux: set display off in innolux_panel_unprepare 2019-01-22 16:49:15 -05:00
pl111 drm/pl111: add of_node_put() 2018-11-28 09:31:07 -08:00
qxl drm: move drm_can_sleep() to drm_util.h 2019-01-14 10:58:37 +01:00
r128 drm/ati_pcigart: Fix error code in drm_ati_pcigart_init() 2018-12-17 10:47:17 +01:00
radeon drm: move drm_can_sleep() to drm_util.h 2019-01-14 10:58:37 +01:00
rcar-du drm-misc-next for 5.1: 2019-01-18 09:31:28 +10:00
rockchip drm-misc-next for 5.1: 2019-01-18 09:31:28 +10:00
savage
scheduler drm/scheduler: Add drm_sched_suspend/resume_timeout() 2018-12-05 17:56:16 -05:00
selftests drm/selftest: fix spelling mistake "dimention" -> "dimension" 2018-12-11 15:19:42 +01:00
shmobile drm/shmob: Fix return value check in shmob_drm_probe 2019-01-14 03:51:16 +02:00
sis
sti drm-misc-next for 5.1: 2019-01-18 09:31:28 +10:00
stm drm-misc-next for 5.1: 2019-01-24 20:02:12 +10:00
sun4i drm/sun4i: frontend: Hook-in support for the A20 2019-01-18 21:12:34 +01:00
tdfx
tegra Merge drm/drm-next into drm-misc-next 2019-01-11 16:32:10 +01:00
tilcdc tilcdc pull request for Linux v4.22 2019-01-11 06:29:31 +10:00
tinydrm drm/tinydrm: Use damage helper for dirtyfb 2019-01-17 10:57:15 +01:00
ttm drm/ttm: Use drm_debug_printer for all ttm_bo_mem_space_debug output 2018-12-21 15:27:58 -05:00
tve200 drm: replace "drm_dev_unref" function with "drm_dev_put" 2018-11-24 22:12:54 +01:00
udl DRM: UDL: get rid of useless vblank initialization 2018-10-23 15:59:01 +02:00
v3d drm/v3d: Invalidate the caches from the outside in. 2018-12-07 10:56:51 -08:00
vc4 drm: move drm_can_sleep() to drm_util.h 2019-01-14 10:58:37 +01:00
vgem dma-buf: make fence sequence numbers 64 bit v2 2018-12-07 12:44:16 +01:00
via
virtio drm/virtio: Drop deprecated load/unload initialization 2019-01-09 09:38:49 +01:00
vkms drm/vkms: set preferred depth to 24 2018-12-17 10:51:20 +01:00
vmwgfx IOMMU Updates for Linux v4.21 2019-01-01 15:55:29 -08:00
xen drm-misc-next for 5.1: 2019-01-10 05:58:52 +10:00
zte drm/edid: Pass connector to AVI infoframe functions 2019-01-10 19:01:06 +02:00
ati_pcigart.c drm/ati_pcigart: Fix error code in drm_ati_pcigart_init() 2018-12-17 10:47:17 +01:00
drm_agpsupport.c
drm_atomic_helper.c Final changes to drm-misc-next for v4.21: 2018-12-07 11:23:05 +10:00
drm_atomic_state_helper.c drm: Put damage blob when destroy plane state 2018-12-24 11:53:50 +01:00
drm_atomic_uapi.c Merge tag 'vmwgfx-next-2018-12-05' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-12-06 13:43:56 +10:00
drm_atomic.c drm-misc-next for 5.1: 2019-01-10 05:58:52 +10:00
drm_auth.c drm: set is_master to 0 upon drm_new_set_master() failure 2018-11-26 16:14:27 -05:00
drm_blend.c
drm_bridge.c drm: bridge: Constify mode arguments to bridge .mode_set() operation 2019-01-14 03:51:14 +02:00
drm_bufs.c drm: un-inline drm_legacy_findmap() 2019-01-02 11:37:11 +02:00
drm_cache.c
drm_client.c drm/gem: Add drm_gem_object_funcs 2018-11-20 14:56:18 +01:00
drm_color_mgmt.c drm: Constify drm_color_lut_check() 2019-01-29 23:26:12 +02:00
drm_connector.c drm-misc-next for 5.1: 2019-01-10 05:58:52 +10:00
drm_context.c drm: Fix error handling in drm_legacy_addctx 2019-01-07 11:26:31 +01:00
drm_crtc_helper_internal.h
drm_crtc_helper.c drm: Remove use of drm_mode_object 2019-01-15 13:20:56 +01:00
drm_crtc_internal.h drm: Unexport drm_crtc_force_disable 2019-01-11 15:56:40 +01:00
drm_crtc.c drm: Move the legacy kms disable_all helper to crtc helpers 2019-01-11 22:54:29 +01:00
drm_damage_helper.c drm/damage-helper: Add drm_atomic_helper_damage_merged() 2019-01-17 10:56:54 +01:00
drm_debugfs_crc.c
drm_debugfs.c drm: Merge drm_info.c into drm_debugfs.c 2018-11-22 09:52:27 +01:00
drm_dma.c
drm_dp_aux_dev.c
drm_dp_cec.c
drm_dp_dual_mode_helper.c
drm_dp_helper.c drm-misc-next for 5.1: 2019-01-24 20:02:12 +10:00
drm_dp_mst_topology.c drm/dp_mst: Check payload count in drm_dp_mst_atomic_check() 2019-01-10 20:45:25 -05:00
drm_drv.c drm/docs: improve docs for drm_drv.c 2019-01-12 13:07:30 +01:00
drm_dsc.c drm/dsc: Add helpers for DSC picture parameter set infoframes 2018-11-27 18:35:17 -08:00
drm_dumb_buffers.c
drm_edid_load.c
drm_edid.c drm/edid: Add display_info.rgb_quant_range_selectable 2019-01-10 19:01:06 +02:00
drm_encoder_slave.c
drm_encoder.c
drm_fb_cma_helper.c drm/cma-helper: Remove unused fbdev code 2019-01-17 10:56:38 +01:00
drm_fb_helper.c drm/cma-helper: Remove unused fbdev code 2019-01-17 10:56:38 +01:00
drm_file.c Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
drm_flip_work.c drm: move drm_can_sleep() to drm_util.h 2019-01-14 10:58:37 +01:00
drm_fourcc.c drm: Introduce new DRM_FORMAT_XYUV 2018-11-20 16:20:13 +02:00
drm_framebuffer.c drm: move EXPORT_SYMBOL_FOR_TESTS_ONLY to drm_util.h 2019-01-14 10:58:37 +01:00
drm_gem_cma_helper.c drm/cma-helper: Add DRM_GEM_CMA_VMAP_DRIVER_OPS 2018-11-20 14:57:25 +01:00
drm_gem_framebuffer_helper.c drm/gem-fb-helper: Add drm_gem_fb_create_with_dirty() 2019-01-17 10:56:45 +01:00
drm_gem.c drm/gem: Mark pinned pages as unevictable 2019-01-09 21:24:50 +00:00
drm_hashtab.c
drm_internal.h drm-misc-next for 5.1: 2019-01-10 05:58:52 +10:00
drm_ioc32.c
drm_ioctl.c drm/ioctl: Fix Spectre v1 vulnerabilities 2018-12-20 08:13:29 +01:00
drm_irq.c
drm_kms_helper_common.c
drm_lease.c drm-misc-next for 5.1: 2019-01-10 05:58:52 +10:00
drm_legacy.h
drm_lock.c
drm_memory.c
drm_mipi_dsi.c
drm_mm.c
drm_mode_config.c drm-misc-next for 5.1: 2019-01-10 05:58:52 +10:00
drm_mode_object.c drm: Reorder set_property_atomic to avoid returning with an active ww_ctx 2019-01-03 09:54:26 +00:00
drm_modes.c drm: Remove use of drm_mode_object 2019-01-15 13:20:56 +01:00
drm_modeset_helper.c
drm_modeset_lock.c drm/atomic: integrate modeset lock with private objects 2018-12-11 15:24:30 +01:00
drm_of.c drm/of: Fix kerneldoc 2019-01-12 13:07:58 +01:00
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Do rotation quirk for new GPD Win2 FW 2018-11-15 10:55:30 +01:00
drm_panel.c drm/panel: Small documentation polish 2019-01-12 13:08:12 +01:00
drm_pci.c drm/drm_pci.c: Use dma_zalloc_coherent 2018-10-23 15:59:01 +02:00
drm_plane_helper.c
drm_plane.c drm: Auto-set allow_fb_modifiers when given modifiers at plane init 2019-01-11 16:53:55 +01:00
drm_prime.c drm/prime: Fix drm_gem_prime_mmap() stack use 2018-11-22 15:44:05 +01:00
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/tinydrm: Advertise that we can do only DRM_FORMAT_MOD_LINEAR. 2018-10-30 13:01:50 -07:00
drm_syncobj.c drm/syncobj: remove drm_syncobj_cb and cleanup 2018-12-11 17:38:38 +01:00
drm_sysfs.c drm/lease: Send a distinct uevent 2018-11-30 10:57:18 +01:00
drm_trace_points.c
drm_trace.h
drm_vblank.c drm/vblank: Allow dynamic per-crtc max_vblank_count 2019-01-14 21:23:55 +02:00
drm_vm.c
drm_vma_manager.c
drm_writeback.c
Kconfig drm/cma-helper: Remove unused fbdev code 2019-01-17 10:56:38 +01:00
Makefile Merge tag 'vmwgfx-next-2018-12-05' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-12-06 13:43:56 +10:00