linux/drivers/gpu/drm/radeon
Jérôme Glisse 5d6527a784 mm/mmu_notifier: use structure for invalidate_range_start/end callback
Patch series "mmu notifier contextual informations", v2.

This patchset adds contextual information, why an invalidation is
happening, to mmu notifier callback.  This is necessary for user of mmu
notifier that wish to maintains their own data structure without having to
add new fields to struct vm_area_struct (vma).

For instance device can have they own page table that mirror the process
address space.  When a vma is unmap (munmap() syscall) the device driver
can free the device page table for the range.

Today we do not have any information on why a mmu notifier call back is
happening and thus device driver have to assume that it is always an
munmap().  This is inefficient at it means that it needs to re-allocate
device page table on next page fault and rebuild the whole device driver
data structure for the range.

Other use case beside munmap() also exist, for instance it is pointless
for device driver to invalidate the device page table when the
invalidation is for the soft dirtyness tracking.  Or device driver can
optimize away mprotect() that change the page table permission access for
the range.

This patchset enables all this optimizations for device drivers.  I do not
include any of those in this series but another patchset I am posting will
leverage this.

The patchset is pretty simple from a code point of view.  The first two
patches consolidate all mmu notifier arguments into a struct so that it is
easier to add/change arguments.  The last patch adds the contextual
information (munmap, protection, soft dirty, clear, ...).

This patch (of 3):

To avoid having to change many callback definition everytime we want to
add a parameter use a structure to group all parameters for the
mmu_notifier invalidate_range_start/end callback.  No functional changes
with this patch.

[akpm@linux-foundation.org: fix drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c kerneldoc]
Link: http://lkml.kernel.org/r/20181205053628.3210-2-jglisse@redhat.com
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Acked-by: Jan Kara <jack@suse.cz>
Acked-by: Jason Gunthorpe <jgg@mellanox.com>	[infiniband]
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Ross Zwisler <zwisler@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krcmar <rkrcmar@redhat.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Felix Kuehling <felix.kuehling@amd.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-12-28 12:11:50 -08:00
..
reg_srcs
.gitignore
Kconfig drm/radeon: remove UMS support 2015-12-02 12:45:54 -05:00
Makefile main drm pull request for v4.15 2017-11-15 20:42:10 -08:00
ObjectID.h
atom-bits.h
atom-names.h
atom-types.h
atom.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
atom.h drm/radeon: add locking around atombios scratch space usage 2014-11-11 17:22:26 -05:00
atombios.h scripts/spelling.txt: add "aligment" pattern and fix typo instances 2017-02-27 18:43:46 -08:00
atombios_crtc.c drm/radeon: enable ABGR and XBGR formats (v2) 2018-08-27 11:10:19 -05:00
atombios_dp.c drm/radeon: fix atombios on big endian 2017-10-31 18:24:59 -04:00
atombios_encoders.c drm/radeon: Fix eDP for single-display iMac10,1 (v2) 2017-07-07 11:11:28 -04:00
atombios_i2c.c drm/radeon: change function signature to pass full range 2018-09-19 12:37:25 -05:00
avivod.h
btc_dpm.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
btc_dpm.h Revert "drm/radeon: drop btc_get_max_clock_from_voltage_dependency_table" 2014-10-13 11:34:13 -04:00
btcd.h
cayman_blit_shaders.c drm: fix trivial typos 2015-10-21 11:35:11 -04:00
cayman_blit_shaders.h
ci_dpm.c drm/radeon: use pcie functions for link width 2018-07-05 16:40:00 -05:00
ci_dpm.h drm/radeon: move ci_send_msg_to_smc to where it's used 2017-10-08 20:16:28 -04:00
ci_smc.c drm/radeon: move ci_send_msg_to_smc to where it's used 2017-10-08 20:16:28 -04:00
cik.c gpu: drm: radeon: cik: Replace mdelay() with msleep() in cik_pcie_gen3_enable() 2018-08-27 11:10:01 -05:00
cik_blit_shaders.c
cik_blit_shaders.h
cik_reg.h drm/radeon: Remove KFD_CIK_SDMA_QUEUE_OFFSET 2017-12-20 12:00:22 -05:00
cik_sdma.c drm/radeon: Avoid double gpu reset by adding a timeout on IB ring tests. 2016-02-10 14:17:15 -05:00
cikd.h drm/radeon: deprecate and remove KFD interface 2017-10-30 14:16:21 +01:00
clearstate_cayman.h drm/radeon: use NULL instead of zero in clearstate headers 2014-06-02 10:25:07 -04:00
clearstate_ci.h drm/radeon: use NULL instead of zero in clearstate headers 2014-06-02 10:25:07 -04:00
clearstate_defs.h
clearstate_evergreen.h
clearstate_si.h drm/radeon: use NULL instead of zero in clearstate headers 2014-06-02 10:25:07 -04:00
cypress_dpm.c drm/radeon: fix include notation and remove -Iinclude/drm flag 2017-05-17 14:36:40 +02:00
cypress_dpm.h
dce3_1_afmt.c drm/radeon: use proper ACR regisiter for DCE3.2 2015-06-01 23:16:22 -04:00
dce6_afmt.c drm/radeon: Add a common function for DFS handling 2016-01-27 12:48:32 -05:00
evergreen.c drm/radeon: fill in rb backend map on evergreen/ni. 2018-01-16 15:35:28 -05:00
evergreen_blit_shaders.c drm: fix trivial typos 2015-10-21 11:35:11 -04:00
evergreen_blit_shaders.h
evergreen_cs.c drm/radeon: ratelimit bo warnings 2018-10-09 17:07:12 -05:00
evergreen_dma.c drm/radeon: split semaphore and sync object handling v2 2014-11-20 13:00:16 -05:00
evergreen_hdmi.c drm/radeon: fix indentation. 2016-03-16 18:08:06 -04:00
evergreen_reg.h drm/radeon: fix vertical bars appear on monitor (v2) 2016-04-27 12:27:08 -04:00
evergreen_smc.h
evergreend.h drm/radeon: switch UVD code to use UVD_NO_OP for padding 2016-08-24 16:25:05 -04:00
kv_dpm.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
kv_dpm.h
kv_smc.c drm/radeon: fix include notation and remove -Iinclude/drm flag 2017-05-17 14:36:40 +02:00
mkregtable.c drm/radeon: change SPDX identifier to MIT 2018-10-15 16:16:12 -05:00
ni.c drm/radeon: fill in rb backend map on evergreen/ni. 2018-01-16 15:35:28 -05:00
ni_dma.c drm/radeon: Remove rdev->gart.pages_addr array 2015-01-22 11:48:03 -05:00
ni_dpm.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
ni_dpm.h
ni_reg.h drm/radeon/mst: port some MST setup code from DAL. 2016-04-06 14:57:46 -04:00
nid.h drm/radeon: switch UVD code to use UVD_NO_OP for padding 2016-08-24 16:25:05 -04:00
nislands_smc.h
ppsmc.h drm/radeon/dpm: add thermal dpm support for CI 2014-11-20 13:00:10 -05:00
pptable.h drm/radeon/dpm: add smc fan control for CI (v2) 2014-11-20 13:00:10 -05:00
r100.c drm: Pass struct drm_file * to __drm_mode_object_find [v2] 2017-10-12 10:03:04 +10:00
r100_track.h drm/radeon: change SPDX identifier to MIT 2018-10-15 16:16:12 -05:00
r100d.h
r200.c gpu: drm: amd/radeon: Convert printk(KERN_<LEVEL> to pr_<level> 2017-03-29 23:53:24 -04:00
r300.c drm/radeon/r300: Mark expected switch fall-throughs 2018-11-05 14:20:37 -05:00
r300_reg.h
r300d.h
r420.c drm/radeon/r420: mark expected switch fall-through 2018-11-05 14:20:36 -05:00
r420d.h
r500_reg.h drm/radeon: Bypass hw lut's for > 8 bpc framebuffer scanout. 2014-06-13 12:22:30 -04:00
r520.c gpu: drm: amd/radeon: Convert printk(KERN_<LEVEL> to pr_<level> 2017-03-29 23:53:24 -04:00
r520d.h
r600.c drm/radeon: Unbreak HPD handling for r600+ 2017-05-24 17:39:33 -04:00
r600_blit_shaders.c drm: fix trivial typos 2015-10-21 11:35:11 -04:00
r600_blit_shaders.h
r600_cs.c drm: Pass struct drm_file * to __drm_mode_object_find [v2] 2017-10-12 10:03:04 +10:00
r600_dma.c drm/radeon: Avoid double gpu reset by adding a timeout on IB ring tests. 2016-02-10 14:17:15 -05:00
r600_dpm.c drm/radeon: use pcie functions for link width 2018-07-05 16:40:00 -05:00
r600_dpm.h drm/radeon/dpm: add smc fan control for SI (v2) 2014-11-20 13:00:09 -05:00
r600_hdmi.c drm/radeon: properly initialize r600_audio_status() data 2017-09-18 23:30:30 -04:00
r600_reg.h drm/radeon: enable ABGR and XBGR formats (v2) 2018-08-27 11:10:19 -05:00
r600d.h drm/radeon: add support for UVD_NO_OP register 2016-08-24 16:25:04 -04:00
radeon.h drm/ttm: initialize globals during device init (v2) 2018-11-05 14:21:21 -05:00
radeon_acpi.c drm/radeon: Make radeon_atif_handler static 2017-08-15 14:46:07 -04:00
radeon_acpi.h drm/radeon: Make radeon_atif_handler static 2017-08-15 14:46:07 -04:00
radeon_agp.c add blacklist for thinkpad T40p 2015-11-30 14:44:34 -05:00
radeon_asic.c drm/radeon: add driver option to disable vce block. 2016-05-02 13:08:53 -04:00
radeon_asic.h drm/radeon: Support DRM_MODE_PAGE_FLIP_ASYNC 2016-05-04 20:19:03 -04:00
radeon_atombios.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
radeon_atpx_handler.c drm/radeon: fix radeon_atpx_get_client_id()'s return type 2018-05-15 13:43:51 -05:00
radeon_audio.c drm: handle HDMI 2.0 VICs in AVI info-frames 2017-07-14 21:23:54 +03:00
radeon_audio.h drm/radeon: Add a common function for DFS handling 2016-01-27 12:48:32 -05:00
radeon_benchmark.c drm/radeon: fix the crash in benchmark functions 2015-02-02 11:39:35 -05:00
radeon_bios.c drm/radeon: remove some dead code 2017-02-08 21:04:29 -05:00
radeon_clocks.c gpu: drm: amd/radeon: Convert printk(KERN_<LEVEL> to pr_<level> 2017-03-29 23:53:24 -04:00
radeon_combios.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
radeon_connectors.c drm: drop _mode_ from update_edit_property() 2018-07-13 18:40:27 +02:00
radeon_cs.c drm/ttm: allow reserving more than one shared slot v3 2018-12-07 17:53:44 -05:00
radeon_cursor.c drm/radeon: switch to drm_*{get,put} helpers 2017-08-15 14:46:12 -04:00
radeon_device.c drm/radeon: add PX quirk for Asus K73TK 2018-05-15 13:43:02 -05:00
radeon_display.c drm/radeon: radeon_framebuffer -> drm_framebuffer 2018-04-11 13:07:56 -05:00
radeon_dp_auxch.c drm/radeon/dp_auxch: Ratelimit aux transfer debug messages 2017-03-29 23:53:21 -04:00
radeon_dp_mst.c drm/radeon: change SPDX identifier to MIT 2018-10-15 16:16:12 -05:00
radeon_drv.c drm/radeon: use simpler remove_conflicting_pci_framebuffers() 2018-09-03 18:17:20 +02:00
radeon_drv.h drm/radeon: remove UMS support 2015-12-02 12:45:54 -05:00
radeon_encoders.c drm: drop _mode_ from drm_mode_connector_attach_encoder 2018-07-13 18:40:27 +02:00
radeon_family.h drm/radeon: add Mullins chip family 2014-05-06 12:19:57 +02:00
radeon_fb.c drm/radeon: radeon_framebuffer -> drm_framebuffer 2018-04-11 13:07:56 -05:00
radeon_fence.c sched/wait: Rename wait_queue_t => wait_queue_entry_t 2017-06-20 12:18:27 +02:00
radeon_gart.c treewide: Use array_size() in vzalloc() 2018-06-12 16:19:22 -07:00
radeon_gem.c drm/ttm: allow reserving more than one shared slot v3 2018-12-07 17:53:44 -05:00
radeon_i2c.c drm/radeon: fix up dp aux tear down (v2) 2016-10-12 15:44:13 -04:00
radeon_ib.c drm/radeon: fix indentation. 2016-03-16 18:08:06 -04:00
radeon_irq_kms.c Merge branch 'drm-next-4.14' of git://people.freedesktop.org/~agd5f/linux into drm-next 2017-08-02 12:43:12 +10:00
radeon_kms.c drm/radeon: Use drm_fb_helper_lastclose() and _poll_changed() 2017-12-06 12:48:34 -05:00
radeon_legacy_crtc.c drm/radeon: radeon_framebuffer -> drm_framebuffer 2018-04-11 13:07:56 -05:00
radeon_legacy_encoders.c drm/radeon: add missing header dependencies 2016-10-25 14:38:18 -04:00
radeon_legacy_tv.c drm/radeon/kms: remove set but not used variable 'pll' 2018-11-05 14:21:17 -05:00
radeon_mn.c mm/mmu_notifier: use structure for invalidate_range_start/end callback 2018-12-28 12:11:50 -08:00
radeon_mode.h drm/radeon: radeon_framebuffer -> drm_framebuffer 2018-04-11 13:07:56 -05:00
radeon_object.c drm/radeon: remove set but not used variable 'rdev' 2018-11-08 16:04:28 -05:00
radeon_object.h drm/ttm: add evict parameter to ttm_bo_driver::move_notify 2017-01-27 11:13:15 -05:00
radeon_pm.c Revert "drm/radeon/pm: autoswitch power state when in balanced mode" 2018-02-20 16:27:16 -05:00
radeon_prime.c drm/radeon: Maintain prime import/export refcount for BOs 2017-04-07 12:20:40 -04:00
radeon_reg.h
radeon_ring.c drm: drop drm_[cm]alloc* helpers 2017-05-18 17:22:39 +02:00
radeon_sa.c drm/radeon: hold reference to fences in radeon_sa_bo_new 2016-02-10 14:07:44 -05:00
radeon_semaphore.c drm/radeon: fix indentation. 2016-03-16 18:08:06 -04:00
radeon_sync.c dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
radeon_test.c gpu: drm: radeon: radeon_test: Replace mdelay() with msleep() 2018-08-27 11:10:02 -05:00
radeon_trace.h drm/radeon: change SPDX identifier to MIT 2018-10-15 16:16:12 -05:00
radeon_trace_points.c drm/radeon: change SPDX identifier to MIT 2018-10-15 16:16:12 -05:00
radeon_ttm.c drm/ttm: initialize globals during device init (v2) 2018-11-05 14:21:21 -05:00
radeon_ucode.c drm/radeon: add new firmware header definitions (v3) 2014-08-05 08:53:22 -04:00
radeon_ucode.h drm/radeon: add new firmware header definitions (v3) 2014-08-05 08:53:22 -04:00
radeon_uvd.c drm/radeon: adjust tested variable 2018-01-29 23:18:17 -05:00
radeon_vce.c drm/radeon: fix indentation. 2016-03-16 18:08:06 -04:00
radeon_vm.c drm/ttm: allow reserving more than one shared slot v3 2018-12-07 17:53:44 -05:00
rs100d.h
rs400.c gpu: drm: amd/radeon: Convert printk(KERN_<LEVEL> to pr_<level> 2017-03-29 23:53:24 -04:00
rs400d.h
rs600.c drm/radeon: Support DRM_MODE_PAGE_FLIP_ASYNC 2016-05-04 20:19:03 -04:00
rs600d.h
rs690.c gpu: drm: amd/radeon: Convert printk(KERN_<LEVEL> to pr_<level> 2017-03-29 23:53:24 -04:00
rs690d.h
rs780_dpm.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
rs780_dpm.h
rs780d.h
rv6xx_dpm.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
rv6xx_dpm.h
rv6xxd.h
rv200d.h
rv250d.h
rv350d.h
rv515.c gpu: drm: amd/radeon: Convert printk(KERN_<LEVEL> to pr_<level> 2017-03-29 23:53:24 -04:00
rv515d.h
rv730_dpm.c drm/radeon: fix include notation and remove -Iinclude/drm flag 2017-05-17 14:36:40 +02:00
rv730d.h
rv740_dpm.c drm/radeon: fix include notation and remove -Iinclude/drm flag 2017-05-17 14:36:40 +02:00
rv740d.h
rv770.c drm/radeon: switch UVD code to use UVD_NO_OP for padding 2016-08-24 16:25:05 -04:00
rv770_dma.c drm/radeon: split semaphore and sync object handling v2 2014-11-20 13:00:16 -05:00
rv770_dpm.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
rv770_dpm.h drm/radeon: comment out some currently unused 7xx dpm code 2015-01-22 10:38:58 -05:00
rv770_smc.c drm/radeon: fix include notation and remove -Iinclude/drm flag 2017-05-17 14:36:40 +02:00
rv770_smc.h
rv770d.h drm/radeon: switch UVD code to use UVD_NO_OP for padding 2016-08-24 16:25:05 -04:00
si.c gpu: drm: radeon: si: Replace mdelay() with msleep() in si_pcie_gen3_enable() 2018-08-27 11:10:02 -05:00
si_blit_shaders.c
si_blit_shaders.h
si_dma.c drm/radeon: Remove rdev->gart.pages_addr array 2015-01-22 11:48:03 -05:00
si_dpm.c drm/radeon: use pcie functions for link width 2018-07-05 16:40:00 -05:00
si_dpm.h drm/radeon: bind fan control on SI cards to hwmon interface 2015-01-22 10:38:48 -05:00
si_reg.h
si_smc.c drm/radeon: fix include notation and remove -Iinclude/drm flag 2017-05-17 14:36:40 +02:00
sid.h drm/radeon: allow TA_CS_BC_BASE_ADDR on SI 2016-10-12 15:44:15 -04:00
sislands_smc.h drm/radeon/si/dpm: fix phase shedding setup 2016-09-28 16:13:16 -04:00
smu7.h
smu7_discrete.h drm/radeon/dpm: add smc fan control for CI (v2) 2014-11-20 13:00:10 -05:00
smu7_fusion.h
sumo_dpm.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
sumo_dpm.h drm/radeon: comment out some currently unused sumo dpm code 2015-01-22 10:38:57 -05:00
sumo_smc.c drm/radeon: fix include notation and remove -Iinclude/drm flag 2017-05-17 14:36:40 +02:00
sumod.h
trinity_dpm.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
trinity_dpm.h
trinity_smc.c drm/radeon: fix include notation and remove -Iinclude/drm flag 2017-05-17 14:36:40 +02:00
trinityd.h
uvd_v1_0.c drm/radeon: handle more than 10 UVD sessions 2016-05-04 20:19:43 -04:00
uvd_v2_2.c drm/radeon: handle more than 10 UVD sessions 2016-05-04 20:19:43 -04:00
uvd_v3_1.c
uvd_v4_2.c drm/radeon: handle more than 10 UVD sessions 2016-05-04 20:19:43 -04:00
vce_v1_0.c drm/radeon: avoid kernel segfault in vce when gpu fails to resume 2017-02-08 20:59:16 -05:00
vce_v2_0.c drm/radeon: add header comment for clarification to vce_v2_0_enable_mgcg() 2017-07-14 11:05:55 -04:00