linux_dsm_epyc7002/drivers/gpu/drm/i915
Lyude Paul 32f0a98265 drm/i915: Call dma_set_max_seg_size() in i915_driver_hw_probe()
Currently, we don't call dma_set_max_seg_size() for i915 because we
intentionally do not limit the segment length that the device supports.
However, this results in a warning being emitted if we try to map
anything larger than SZ_64K on a kernel with CONFIG_DMA_API_DEBUG_SG
enabled:

[    7.751926] DMA-API: i915 0000:00:02.0: mapping sg segment longer
than device claims to support [len=98304] [max=65536]
[    7.751934] WARNING: CPU: 5 PID: 474 at kernel/dma/debug.c:1220
debug_dma_map_sg+0x20f/0x340

This was originally brought up on
https://bugs.freedesktop.org/show_bug.cgi?id=108517 , and the consensus
there was it wasn't really useful to set a limit (and that dma-debug
isn't really all that useful for i915 in the first place). Unfortunately
though, CONFIG_DMA_API_DEBUG_SG is enabled in the debug configs for
various distro kernels. Since a WARN_ON() will disable automatic problem
reporting (and cause any CI with said option enabled to start
complaining), we really should just fix the problem.

Note that as me and Chris Wilson discussed, the other solution for this
would be to make DMA-API not make such assumptions when a driver hasn't
explicitly set a maximum segment size. But, taking a look at the commit
which originally introduced this behavior, commit 78c47830a5
("dma-debug: check scatterlist segments"), there is an explicit mention
of this assumption and how it applies to devices with no segment size:

	Conversely, devices which are less limited than the rather
	conservative defaults, or indeed have no limitations at all
	(e.g. GPUs with their own internal MMU), should be encouraged to
	set appropriate dma_parms, as they may get more efficient DMA
	mapping performance out of it.

So unless there's any concerns (I'm open to discussion!), let's just
follow suite and call dma_set_max_seg_size() with UINT_MAX as our limit
to silence any warnings.

Changes since v3:
* Drop patch for enabling CONFIG_DMA_API_DEBUG_SG in CI. It looks like
  just turning it on causes the kernel to spit out bogus WARN_ONs()
  during some igt tests which would otherwise require teaching igt to
  disable the various DMA-API debugging options causing this. This is
  too much work to be worth it, since DMA-API debugging is useless for
  us. So, we'll just settle with this single patch to squelch WARN_ONs()
  during driver load for users that have CONFIG_DMA_API_DEBUG_SG turned
  on for some reason.
* Move dma_set_max_seg_size() call into i915_driver_hw_probe() - Chris
  Wilson

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: <stable@vger.kernel.org> # v4.18+
Link: https://patchwork.freedesktop.org/patch/msgid/20190823205251.14298-1-lyude@redhat.com
(cherry picked from commit acd674af95)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2019-08-27 10:57:32 +03:00
..
display drm/i915/dp: Fix DSC enable code to use cpu_transcoder instead of encoder->type 2019-08-27 10:57:18 +03:00
gem drm/i915: Remove redundant user_access_end() from __copy_from_user() error path 2019-08-09 23:13:25 +02:00
gt drm/i915: Only recover active engines 2019-08-01 13:22:00 +03:00
gvt drm/i915: Use after free in error path in intel_vgpu_create_workload() 2019-08-09 16:04:18 +08:00
selftests Features: 2019-06-21 14:00:10 +10:00
i915_active_types.h drm/i915: Keep contexts pinned until after the next kernel context switch 2019-06-14 19:03:32 +01:00
i915_active.c drm/i915: Keep engine alive as we retire the context 2019-06-18 15:14:22 +01:00
i915_active.h drm/i915: Stop passing I915_WAIT_LOCKED to i915_request_wait() 2019-06-19 12:58:38 +01:00
i915_cmd_parser.c drm/i915: Move GEM object domain management from struct_mutex to local 2019-05-28 12:45:29 +01:00
i915_debugfs.c drm/i915: no need to check return value of debugfs_create functions 2019-06-17 15:53:08 +03:00
i915_debugfs.h drm/i915: extract i915_debugfs.h from i915_drv.h 2019-05-03 10:06:40 +03:00
i915_drv.c drm/i915: Call dma_set_max_seg_size() in i915_driver_hw_probe() 2019-08-27 10:57:32 +03:00
i915_drv.h drm/i915: Deal with machines that expose less than three QGV points 2019-07-29 15:35:06 +03:00
i915_fixed.h drm/i915: Use mul_u32_u32() more 2019-05-03 20:09:51 +03:00
i915_gem_batch_pool.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_gem_batch_pool.h drm/i915: Split GEM object type definition to its own header 2019-05-28 12:45:29 +01:00
i915_gem_evict.c drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_gem_fence_reg.c drm/i915: make intel_wakeref work on the rpm struct 2019-06-14 15:58:33 +01:00
i915_gem_fence_reg.h drm/i915: Move fence register tracking from i915->mm to ggtt 2019-06-13 09:37:39 +01:00
i915_gem_gtt.c drm/i915/gtt: Mark the freed page table entries with scratch 2019-07-29 15:37:50 +03:00
i915_gem_gtt.h drm/i915/gtt: Use a common type for page directories 2019-06-17 16:30:54 +03:00
i915_gem_render_state.c drm/i915: Drop the deferred active reference 2019-05-28 12:45:29 +01:00
i915_gem_render_state.h
i915_gem.c drm/i915: Lift intel_engines_resume() to callers 2019-08-01 13:21:38 +03:00
i915_gem.h drm/i915: Load balancing across a virtual engine 2019-05-22 08:40:38 +01:00
i915_globals.c drm/i915: Move more GEM objects under gem/ 2019-05-28 12:45:29 +01:00
i915_globals.h drm/i915: Move over to intel_context_lookup() 2019-03-08 13:59:52 +00:00
i915_gpu_error.c drm/i915: Lock the engine while dumping the active request 2019-07-29 15:49:54 +03:00
i915_gpu_error.h drm/i915: Invert the GEM wakeref hierarchy 2019-04-24 22:26:49 +01:00
i915_ioc32.c
i915_irq.c drm/i915/ehl: Introduce Mule Creek Canyon PCH 2019-06-17 13:40:20 -07:00
i915_irq.h drm/i915/guc: Correctly handle GuC interrupts on Gen11 2019-05-28 10:07:17 +01:00
i915_memcpy.c
i915_mm.c mm/pgtable: drop pgtable_t variable from pte_fn_t functions 2019-07-12 11:05:46 -07:00
i915_oa_bdw.c
i915_oa_bdw.h
i915_oa_bxt.c
i915_oa_bxt.h
i915_oa_cflgt2.c
i915_oa_cflgt2.h
i915_oa_cflgt3.c
i915_oa_cflgt3.h
i915_oa_chv.c
i915_oa_chv.h
i915_oa_cnl.c
i915_oa_cnl.h
i915_oa_glk.c
i915_oa_glk.h
i915_oa_hsw.c
i915_oa_hsw.h
i915_oa_icl.c
i915_oa_icl.h
i915_oa_kblgt2.c
i915_oa_kblgt2.h
i915_oa_kblgt3.c
i915_oa_kblgt3.h
i915_oa_sklgt2.c
i915_oa_sklgt2.h
i915_oa_sklgt3.c
i915_oa_sklgt3.h
i915_oa_sklgt4.c
i915_oa_sklgt4.h
i915_params.c drm/i915: add force_probe module parameter to replace alpha_support 2019-05-31 16:20:30 +03:00
i915_params.h drm/i915: add force_probe module parameter to replace alpha_support 2019-05-31 16:20:30 +03:00
i915_pci.c drm/i915: move modesetting core code under display/ 2019-06-17 11:48:32 +03:00
i915_perf.c drm/i915/perf: add missing delay for OA muxes configuration 2019-07-29 15:45:49 +03:00
i915_pmu.c drm/i915: update with_intel_runtime_pm to use the rpm structure 2019-06-14 15:58:33 +01:00
i915_pmu.h
i915_priolist_types.h drm/i915: Downgrade NEWCLIENT to non-preemptive 2019-05-20 18:28:22 +03:00
i915_pvinfo.h drm/i915: Mark up vGPU support for full-ppgtt 2019-03-15 09:04:54 +00:00
i915_query.c Revert "drm/i915: Expand subslice mask" 2019-05-29 17:18:18 +03:00
i915_query.h
i915_reg.h Features: 2019-06-21 14:00:10 +10:00
i915_request.c drm/i915: Stop passing I915_WAIT_LOCKED to i915_request_wait() 2019-06-19 12:58:38 +01:00
i915_request.h drm/i915: Replace engine->timeline with a plain list 2019-06-14 19:03:40 +01:00
i915_scatterlist.c drm/i915: Pull scatterlist utils out of i915_gem.h 2019-05-28 12:45:29 +01:00
i915_scatterlist.h drm/i915: Pull scatterlist utils out of i915_gem.h 2019-05-28 12:45:29 +01:00
i915_scheduler_types.h drm/i915: Bump signaler priority on adding a waiter 2019-05-20 18:28:04 +03:00
i915_scheduler.c drm/i915: Replace engine->timeline with a plain list 2019-06-14 19:03:40 +01:00
i915_scheduler.h drm/i915: Only reschedule the submission tasklet if preemption is possible 2019-05-07 17:40:20 +01:00
i915_selftest.h
i915_suspend.c drm/i915: move modesetting core code under display/ 2019-06-17 11:48:32 +03:00
i915_sw_fence.c drm/i915: Allow contexts to share a single timeline across all engines 2019-03-22 13:12:38 +00:00
i915_sw_fence.h drm/i915: Allow contexts to share a single timeline across all engines 2019-03-22 13:12:38 +00:00
i915_syncmap.c
i915_syncmap.h
i915_sysfs.c drm/i915: update with_intel_runtime_pm to use the rpm structure 2019-06-14 15:58:33 +01:00
i915_timeline_types.h drm/i915: Replace engine->timeline with a plain list 2019-06-14 19:03:40 +01:00
i915_timeline.c drm/i915: Replace engine->timeline with a plain list 2019-06-14 19:03:40 +01:00
i915_timeline.h drm/i915: Replace engine->timeline with a plain list 2019-06-14 19:03:40 +01:00
i915_trace_points.c
i915_trace.h drm/i915: Fix various tracepoints for gen2 2019-07-29 14:59:30 +03:00
i915_user_extensions.c drm/i915: Introduce the i915_user_extension_method 2019-03-22 13:12:30 +00:00
i915_user_extensions.h drm/i915: Introduce the i915_user_extension_method 2019-03-22 13:12:30 +00:00
i915_utils.h drm/i915: Move GEM object waiting to its own file 2019-05-28 12:45:29 +01:00
i915_vgpu.c drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest 2019-08-27 10:57:13 +03:00
i915_vgpu.h drm/i915: Mark up vGPU support for full-ppgtt 2019-03-15 09:04:54 +00:00
i915_vma.c drm/i915: Use drm_gem_object.resv 2019-06-18 15:30:32 +01:00
i915_vma.h drm/i915: Move fence register tracking from i915->mm to ggtt 2019-06-13 09:37:39 +01:00
intel_csr.c Linux 5.2-rc5 2019-06-19 12:07:29 +02:00
intel_csr.h drm/i915/csr: move CSR version macros to intel_csr.h 2019-05-03 10:06:25 +03:00
intel_device_info.c drm/i915: Kill INTEL_SUBPLATFORM_AML 2019-06-12 14:51:26 +03:00
intel_device_info.h drm/i915: move modesetting core code under display/ 2019-06-17 11:48:32 +03:00
intel_drv.h drm/i915: Fix HW readout for crtc_clock in HDMI mode 2019-08-21 12:30:48 +03:00
intel_guc_ads.c drm/i915/guc: Reset GuC ADS during sanitize 2019-05-28 10:07:05 +01:00
intel_guc_ads.h drm/i915/guc: Reset GuC ADS during sanitize 2019-05-28 10:07:05 +01:00
intel_guc_ct.c drm/i915/guc: always use Command Transport Buffers 2019-06-09 11:21:33 +01:00
intel_guc_ct.h drm/i915/uc: Stop talking with GuC when resetting 2019-05-23 21:58:36 +01:00
intel_guc_fw.c drm/i915/guc: Define GuC firmware version for Icelake 2019-05-28 10:07:22 +01:00
intel_guc_fw.h
intel_guc_fwif.h drm/i915: fix documentation build warnings 2019-06-06 11:13:20 +03:00
intel_guc_log.c drm/i915/guc: Reduce verbosity on log overflows 2019-06-18 11:35:19 +01:00
intel_guc_log.h
intel_guc_reg.h drm/i915/guc: Correctly handle GuC interrupts on Gen11 2019-05-28 10:07:17 +01:00
intel_guc_submission.c drm/i915: Replace engine->timeline with a plain list 2019-06-14 19:03:40 +01:00
intel_guc_submission.h drm/i915: Move GraphicsTechnology files under gt/ 2019-04-24 21:01:46 +01:00
intel_guc.c drm/i915: Make GuC GGTT reservation work on ggtt 2019-06-11 14:40:15 +01:00
intel_guc.h drm/i915: Make GuC GGTT reservation work on ggtt 2019-06-11 14:40:15 +01:00
intel_gvt.c
intel_gvt.h
intel_huc_fw.c drm/i915/huc: Define HuC firmware version for Icelake 2019-05-28 10:07:23 +01:00
intel_huc_fw.h
intel_huc.c drm/i915: update with_intel_runtime_pm to use the rpm structure 2019-06-14 15:58:33 +01:00
intel_huc.h drm/i915/huc: New HuC status register for Gen11 2019-05-28 10:07:13 +01:00
intel_pm.c drm/i915: move modesetting core code under display/ 2019-06-17 11:48:32 +03:00
intel_pm.h drm/i915: move pm related declarations to intel_pm.h 2019-06-10 10:29:17 +03:00
intel_renderstate_gen6.c
intel_renderstate_gen7.c
intel_renderstate_gen8.c
intel_renderstate_gen9.c
intel_renderstate.h
intel_runtime_pm.c drm/i915: Fix memleak in runtime wakeref tracking 2019-07-29 15:32:59 +03:00
intel_runtime_pm.h pci-v5.3-changes 2019-07-15 20:44:49 -07:00
intel_sideband.c drm/i915: Make sandybridge_pcode_read() deal with the second data register 2019-05-27 20:51:48 +03:00
intel_sideband.h drm/i915: Make sandybridge_pcode_read() deal with the second data register 2019-05-27 20:51:48 +03:00
intel_uc_fw.c drm/i915: Move GEM object domain management from struct_mutex to local 2019-05-28 12:45:29 +01:00
intel_uc_fw.h drm/i915/uc: Place uC firmware in upper range of GGTT 2019-04-20 08:19:32 +01:00
intel_uc.c drm/i915: update with_intel_runtime_pm to use the rpm structure 2019-06-14 15:58:33 +01:00
intel_uc.h drm/i915/guc: Fix runtime suspend 2019-05-03 08:38:37 +01:00
intel_uncore.c drm/i915: update with_intel_runtime_pm to use the rpm structure 2019-06-14 15:58:33 +01:00
intel_uncore.h drm/i915: move and rename i915_runtime_pm 2019-06-14 15:58:33 +01:00
intel_wakeref.c drm/i915: make intel_wakeref work on the rpm struct 2019-06-14 15:58:33 +01:00
intel_wakeref.h drm/i915: Add a wakeref getter for iff the wakeref is already active 2019-08-01 13:21:52 +03:00
intel_wopcm.c drm/i915/wopcm: update default size for gen11+ 2019-06-09 11:28:32 +01:00
intel_wopcm.h drm/i915/guc: Move intel_guc_reserved_gtt_size to intel_wopcm_guc_size 2019-06-11 14:40:14 +01:00
Kconfig drm/i915: add force_probe module parameter to replace alpha_support 2019-05-31 16:20:30 +03:00
Kconfig.debug drm/i915: Enable refcount debugging for default debug levels 2019-06-14 12:16:08 +01:00
Kconfig.profile drm/i915: Add a label for config DRM_I915_SPIN_REQUEST 2019-06-12 11:18:55 +01:00
Makefile drm/i915: Mark expected switch fall-throughs 2019-07-25 20:13:47 -05:00
Makefile.header-test drm main pull request for v5.3-rc1 (sans mm changes) 2019-07-15 19:04:27 -07:00