drm/i915: Remove PIN_UPDATE for i915_vma_pin
Subsystems (2)
As we no longer use PIN_UPDATE (since commit 7d0aa0db4375 ("drm/i915/gem:
Unbind all current vma on changing cache-level")) we can remove PIN_UPDATE itself. The benefit is just in simplifing the vma bind.
--- .../gpu/drm/i915/gem/selftests/huge_pages.c | 142 ------------------ drivers/gpu/drm/i915/i915_gem_gtt.h | 1 - drivers/gpu/drm/i915/i915_vma.c | 9 +- 3 files changed, 3 insertions(+), 149 deletions(-)
drivers/gpu/drm/i915/gem/selftests/huge_pages.c +0 -142
@@ -1409,147 +1409,6 @@ static int igt_ppgtt_sanity_check(void *arg)return err; } -static int igt_ppgtt_pin_update (void *arg) -{ -struct i915_gem_context *ctx = arg; -struct drm_i915_private *dev_priv = ctx->i915; -unsigned long supported =INTEL_INFO (dev_priv)->page_sizes; -struct drm_i915_gem_object *obj; -struct i915_gem_engines_iter it; -struct i915_address_space *vm; -struct intel_context *ce; -struct i915_vma *vma; -unsigned int flags =PIN_USER |PIN_OFFSET_FIXED ; -unsigned int n; -int first, last; -int err =0 ; - -/* -* Make sure there's no funny business when doing a PIN_UPDATE -- in the -* past we had a subtle issue with being able to incorrectly do multiple -* alloc va ranges on the same object when doing a PIN_UPDATE, which -* resulted in some pretty nasty bugs, though only when using -* huge-gtt-pages. -*/ - - vm =i915_gem_context_get_vm_rcu (ctx); -if (!i915_vm_is_4lvl (vm)) { -pr_info ("48b PPGTT not supported, skipping\n" ); - goto out_vm; - } - - first =ilog2 (I915_GTT_PAGE_SIZE_64K ); - last =ilog2 (I915_GTT_PAGE_SIZE_2M ); - -for_each_set_bit_from (first, &supported, last +1 ) { -unsigned int page_size =BIT (first); - - obj =i915_gem_object_create_internal (dev_priv, page_size); -if (IS_ERR (obj)) { - err =PTR_ERR (obj); - goto out_vm; - } - - vma =i915_vma_instance (obj, vm,NULL ); -if (IS_ERR (vma)) { - err =PTR_ERR (vma); - goto out_put; - } - - err =i915_vma_pin (vma,SZ_2M ,0 , flags); -if (err) - goto out_put; - -if (vma->page_sizes.sg < page_size) { -pr_info ("Unable to allocate page-size %x, finishing test early\n" , - page_size); - goto out_unpin; - } - - err =igt_check_page_sizes (vma); -if (err) - goto out_unpin; - -if (vma->page_sizes.gtt != page_size) { -dma_addr_t addr =i915_gem_object_get_dma_address (obj,0 ); - -/* -* The only valid reason for this to ever fail would be -* if the dma-mapper screwed us over when we did the -* dma_map_sg(), since it has the final say over the dma -* address. -*/ -if (IS_ALIGNED (addr, page_size)) { -pr_err ("page_sizes.gtt=%u, expected=%u\n" , - vma->page_sizes.gtt, page_size); - err = -EINVAL ; - }else { -pr_info ("dma address misaligned, finishing test early\n" ); - } - - goto out_unpin; - } - - err =i915_vma_bind (vma,I915_CACHE_NONE ,PIN_UPDATE ,NULL ); -if (err) - goto out_unpin; - -i915_vma_unpin (vma); -i915_gem_object_put (obj); - } - - obj =i915_gem_object_create_internal (dev_priv,PAGE_SIZE ); -if (IS_ERR (obj)) { - err =PTR_ERR (obj); - goto out_vm; - } - - vma =i915_vma_instance (obj, vm,NULL ); -if (IS_ERR (vma)) { - err =PTR_ERR (vma); - goto out_put; - } - - err =i915_vma_pin (vma,0 ,0 , flags); -if (err) - goto out_put; - -/* -* Make sure we don't end up with something like where the pde is still -* pointing to the 2M page, and the pt we just filled-in is dangling -- -* we can check this by writing to the first page where it would then -* land in the now stale 2M page. -*/ - - n =0 ; -for_each_gem_engine (ce,i915_gem_context_lock_engines (ctx), it) { -if (!intel_engine_can_store_dword (ce->engine)) -continue ; - - err =gpu_write (ce, vma, n++,0xdeadbeaf ); -if (err) -break ; - } -i915_gem_context_unlock_engines (ctx); -if (err) - goto out_unpin; - -while (n--) { - err =cpu_check (obj, n,0xdeadbeaf ); -if (err) - goto out_unpin; - } - -out_unpin: -i915_vma_unpin (vma); -out_put: -i915_gem_object_put (obj); -out_vm: -i915_vm_put (vm); - -return err; -} -static int igt_tmpfs_fallback (void *arg) {struct i915_gem_context *ctx = arg;
@@ -1760,7 +1619,6 @@ int i915_gem_huge_page_live_selftests(struct drm_i915_private *i915) {static const struct i915_subtest tests[] = {SUBTEST (igt_shrink_thp), -SUBTEST (igt_ppgtt_pin_update),SUBTEST (igt_tmpfs_fallback),SUBTEST (igt_ppgtt_smoke_huge),SUBTEST (igt_ppgtt_sanity_check),
drivers/gpu/drm/i915/i915_gem_gtt.h +0 -1
@@ -42,7 +42,6 @@ int i915_gem_gtt_insert(struct i915_address_space *vm,#define PIN_OFFSET_BIAS BIT_ULL(6)#define PIN_OFFSET_FIXED BIT_ULL(7) -#define PIN_UPDATE BIT_ULL(9)#define PIN_GLOBAL BIT_ULL(10)/* I915_VMA_GLOBAL_BIND */ #define PIN_USER BIT_ULL(11)/* I915_VMA_LOCAL_BIND */
drivers/gpu/drm/i915/i915_vma.c +3 -6
@@ -397,17 +397,15 @@ int i915_vma_bind(struct i915_vma *vma, vma_flags =atomic_read (&vma->flags); vma_flags &=I915_VMA_GLOBAL_BIND |I915_VMA_LOCAL_BIND ; -if (flags &PIN_UPDATE ) - bind_flags |= vma_flags; -else - bind_flags &= ~vma_flags; + + bind_flags &= ~vma_flags;if (bind_flags ==0 )return 0 ;GEM_BUG_ON (!vma->pages);trace_i915_vma_bind (vma, bind_flags); -if (work && (bind_flags & ~vma_flags) & vma->vm->bind_async_flags) { +if (work && bind_flags & vma->vm->bind_async_flags) {struct dma_fence *prev; work->vma = vma;
@@ -868,7 +866,6 @@ int i915_vma_pin(struct i915_vma *vma, u64 size, u64 alignment, u64 flags)BUILD_BUG_ON (PIN_GLOBAL !=I915_VMA_GLOBAL_BIND );BUILD_BUG_ON (PIN_USER !=I915_VMA_LOCAL_BIND ); -GEM_BUG_ON (flags &PIN_UPDATE );GEM_BUG_ON (!(flags & (PIN_USER |PIN_GLOBAL )));/* First try and grab the pin without rebinding the vma */
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Remove PIN_UPDATE for i915_vma_pin
== Series Details ==
== Series Details ==
Series: drm/i915: Remove PIN_UPDATE for i915_vma_pin
URL : https://patchwork.freedesktop.org/series/77515/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8518 -> Patchwork_17752
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/index.html
Known issues
------------
Here are the changes found in Patchwork_17752 that come from known issues:
### IGT changes ###
#### Warnings ####
* igt@i915_pm_rpm@module-reload:
- fi-kbl-x1275: [SKIP][1] ([fdo#109271]) -> [FAIL][2] ([i915#62])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/fi-kbl-x1275/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/fi-kbl-x1275/igt@[email protected]
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
Participating hosts (47 -> 41)
------------------------------
Missing (6): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-kbl-7560u fi-byt-clapper fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_8518 -> Patchwork_17752
CI-20190529: 20190529
CI_DRM_8518: 869a68b66e355733cbebd96443ed56bbf57d7040 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5668: 00d214488f7361c7eceaa8a4a960031f4b467bd5 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17752: 0442695d05a4d2823b4d4a761f52ab8c21f58980 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
0442695d05a4 drm/i915: Remove PIN_UPDATE for i915_vma_pin
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Remove PIN_UPDATE for i915_vma_pin
In reply to Chris Wilson== Series Details ==
== Series Details ==
Series: drm/i915: Remove PIN_UPDATE for i915_vma_pin
URL : https://patchwork.freedesktop.org/series/77515/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8518_full -> Patchwork_17752_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_17752_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_persistence@engines-hostile@rcs0:
- shard-iclb: [PASS][1] -> [FAIL][2] ([i915#1622])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-iclb8/igt@gem_ctx_persistence@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-iclb4/igt@gem_ctx_persistence@[email protected]
- shard-tglb: [PASS][3] -> [FAIL][4] ([i915#1622])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-tglb2/igt@gem_ctx_persistence@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-tglb1/igt@gem_ctx_persistence@[email protected]
* igt@gem_workarounds@suspend-resume:
- shard-skl: [PASS][5] -> [INCOMPLETE][6] ([i915#69])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-skl6/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-skl9/igt@[email protected]
* igt@i915_suspend@sysfs-reader:
- shard-kbl: [PASS][7] -> [DMESG-WARN][8] ([i915#180]) +4 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-kbl6/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-kbl1/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-kbl: [PASS][9] -> [DMESG-WARN][10] ([i915#180] / [i915#93] / [i915#95])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-kbl2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-kbl2/igt@[email protected]
* igt@kms_hdr@bpc-switch-suspend:
- shard-skl: [PASS][11] -> [FAIL][12] ([i915#1188])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-skl2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-skl4/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [PASS][13] -> [FAIL][14] ([fdo#108145] / [i915#265]) +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-skl1/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-skl1/igt@[email protected]
* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [PASS][15] -> [SKIP][16] ([fdo#109441]) +2 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-iclb1/igt@kms_psr@psr2_primary_mmap_cpu.html
* igt@kms_vblank@pipe-b-ts-continuation-suspend:
- shard-apl: [PASS][17] -> [DMESG-WARN][18] ([i915#180])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-apl8/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-apl4/igt@[email protected]
#### Possible fixes ####
* {igt@gem_ctx_isolation@preservation-s3@vecs0}:
- shard-skl: [INCOMPLETE][19] ([i915#198]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-skl10/igt@gem_ctx_isolation@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-skl7/igt@gem_ctx_isolation@[email protected]
* igt@gem_ctx_persistence@engines-hostile@vecs0:
- shard-iclb: [FAIL][21] ([i915#1622]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-iclb8/igt@gem_ctx_persistence@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-iclb4/igt@gem_ctx_persistence@[email protected]
* igt@gem_softpin@noreloc-s3:
- shard-skl: [INCOMPLETE][23] ([i915#69]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-skl6/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-skl10/igt@[email protected]
* igt@i915_suspend@forcewake:
- shard-kbl: [DMESG-WARN][25] ([i915#180]) -> [PASS][26] +3 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-kbl1/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-kbl3/igt@[email protected]
* {igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1}:
- shard-skl: [FAIL][27] ([i915#79]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-skl9/igt@kms_flip@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-skl3/igt@kms_flip@[email protected]
* {igt@kms_flip@flip-vs-suspend-interruptible@c-dp1}:
- shard-apl: [DMESG-WARN][29] ([i915#180]) -> [PASS][30] +2 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-apl8/igt@kms_flip@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-apl8/igt@kms_flip@[email protected]
* {igt@kms_flip@plain-flip-fb-recreate@b-edp1}:
- shard-skl: [FAIL][31] ([i915#1883]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-skl7/igt@kms_flip@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-skl5/igt@kms_flip@[email protected]
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [FAIL][33] ([i915#1188]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-skl1/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-skl8/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [FAIL][35] ([fdo#108145] / [i915#265]) -> [PASS][36] +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-skl10/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-skl7/igt@[email protected]
* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [SKIP][37] ([fdo#109642] / [fdo#111068]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-iclb1/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-iclb2/igt@[email protected]
* igt@kms_psr@psr2_cursor_mmap_cpu:
- shard-iclb: [SKIP][39] ([fdo#109441]) -> [PASS][40] +1 similar issue
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-iclb1/igt@kms_psr@psr2_cursor_mmap_cpu.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
* igt@kms_setmode@basic:
- shard-apl: [FAIL][41] ([i915#31]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-apl3/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-apl8/igt@[email protected]
#### Warnings ####
* igt@kms_content_protection@legacy:
- shard-apl: [TIMEOUT][43] ([i915#1319]) -> [FAIL][44] ([fdo#110321] / [fdo#110336])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-apl7/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-apl4/igt@[email protected]
* igt@kms_content_protection@lic:
- shard-apl: [TIMEOUT][45] ([i915#1319]) -> [FAIL][46] ([fdo#110321]) +1 similar issue
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8518/shard-apl1/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/shard-apl6/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
[fdo#110336]: https://bugs.freedesktop.org/show_bug.cgi?id=110336
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#1622]: https://gitlab.freedesktop.org/drm/intel/issues/1622
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1883]: https://gitlab.freedesktop.org/drm/intel/issues/1883
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#409]: https://gitlab.freedesktop.org/drm/intel/issues/409
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (11 -> 11)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_8518 -> Patchwork_17752
CI-20190529: 20190529
CI_DRM_8518: 869a68b66e355733cbebd96443ed56bbf57d7040 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5668: 00d214488f7361c7eceaa8a4a960031f4b467bd5 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17752: 0442695d05a4d2823b4d4a761f52ab8c21f58980 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17752/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx