drm/i915: Defer object allocation from GGTT probe to GGTT init
Subsystems (2)
PATCH 1/1 drm/i915: Defer object allocation from GGTT probe to GGTT init
Rather than try and allocate objects as we perform our early HW probes, defer the allocation for GGTT objects (such as the scratch page) to later in the initialisation.
--- drivers/gpu/drm/i915/gt/intel_ggtt.c | 38 +++++++++++----------------- 1 file changed, 15 insertions(+), 23 deletions(-)
drivers/gpu/drm/i915/gt/intel_ggtt.c +15 -23
@@ -78,19 +78,29 @@ static int ggtt_init_hw(struct i915_ggtt *ggtt)*/ int i915_ggtt_init_hw (struct drm_i915_private *i915) { +struct i915_ggtt *ggtt = &i915->ggtt; +u32 pte_flags;int ret; + ret =setup_scratch_page (&ggtt->vm); +if (ret) +return ret; + + pte_flags =0 ; +if (i915_gem_object_is_lmem (ggtt->vm.scratch[0 ])) + pte_flags |=PTE_LM ; + + ggtt->vm.scratch[0 ]->encode = + ggtt->vm.pte_encode (px_dma (ggtt->vm.scratch[0 ]), +I915_CACHE_NONE ,0 ); +/* * Note that we use page colouring to enforce a guard page at the * end of the address space. This is required as the CS may prefetch * beyond the end of the batch buffer, across the page boundary, * and beyond the end of the GTT if we do not provide a guard. */ - ret =ggtt_init_hw (&i915->ggtt); -if (ret) -return ret; - -return 0 ; +return ggtt_init_hw (ggtt); }/*
@@ -803,8 +813,6 @@ static int ggtt_probe_common(struct i915_ggtt *ggtt, u64 size)struct drm_i915_private *i915 = ggtt->vm.i915;struct pci_dev *pdev =to_pci_dev (i915->drm.dev);phys_addr_t phys_addr; -u32 pte_flags; -int ret;/* For Modern GENs the PTEs and register space are split in the BAR */ phys_addr =pci_resource_start (pdev,0 ) +pci_resource_len (pdev,0 ) /2 ;
@@ -825,22 +833,6 @@ static int ggtt_probe_common(struct i915_ggtt *ggtt, u64 size)return -ENOMEM ; } - ret =setup_scratch_page (&ggtt->vm); -if (ret) { -drm_err (&i915->drm,"Scratch setup failed\n" ); -/* iounmap will also get called at remove, but meh */ -iounmap (ggtt->gsm); -return ret; - } - - pte_flags =0 ; -if (i915_gem_object_is_lmem (ggtt->vm.scratch[0 ])) - pte_flags |=PTE_LM ; - - ggtt->vm.scratch[0 ]->encode = - ggtt->vm.pte_encode (px_dma (ggtt->vm.scratch[0 ]), -I915_CACHE_NONE , pte_flags); -return 0 ; }
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Chris Wilson
Rather than try and allocate objects as we perform our early HW probes, defer the allocation for GGTT objects (such as the scratch page) to later in the initialisation.
Signed-off-by Chris Wilson <[email protected]>Cc Matthew Auld <[email protected]>
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Defer object allocation from GGTT probe to GGTT init
In reply to Chris Wilson== Series Details ==
== Series Details ==
Series: drm/i915: Defer object allocation from GGTT probe to GGTT init
URL : https://patchwork.freedesktop.org/series/86985/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_9761 -> Patchwork_19661
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_19661 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_19661, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19661/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_19661:
### CI changes ###
#### Possible regressions ####
* boot:
- fi-pnv-d510: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9761/fi-pnv-d510/boot.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19661/fi-pnv-d510/boot.html
- fi-ilk-650: [PASS][3] -> [FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9761/fi-ilk-650/boot.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19661/fi-ilk-650/boot.html
- fi-elk-e7500: [PASS][5] -> [FAIL][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9761/fi-elk-e7500/boot.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19661/fi-elk-e7500/boot.html
Known issues
------------
Here are the changes found in Patchwork_19661 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_pm_rpm@module-reload:
- fi-byt-j1900: [PASS][7] -> [INCOMPLETE][8] ([i915#142] / [i915#2405])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9761/fi-byt-j1900/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19661/fi-byt-j1900/igt@[email protected]
* igt@i915_selftest@live@execlists:
- fi-bsw-n3050: [PASS][9] -> [INCOMPLETE][10] ([i915#2940])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9761/fi-bsw-n3050/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19661/fi-bsw-n3050/igt@i915_selftest@[email protected]
* igt@prime_self_import@basic-with_one_bo_two_files:
- fi-tgl-y: [PASS][11] -> [DMESG-WARN][12] ([i915#402]) +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9761/fi-tgl-y/igt@prime_self_import@basic-with_one_bo_two_files.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19661/fi-tgl-y/igt@prime_self_import@basic-with_one_bo_two_files.html
* igt@runner@aborted:
- fi-byt-j1900: NOTRUN -> [FAIL][13] ([i915#1814] / [i915#2505])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19661/fi-byt-j1900/igt@[email protected]
- fi-bsw-n3050: NOTRUN -> [FAIL][14] ([i915#1436])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19661/fi-bsw-n3050/igt@[email protected]
#### Possible fixes ####
* igt@prime_self_import@basic-with_two_bos:
- fi-tgl-y: [DMESG-WARN][15] ([i915#402]) -> [PASS][16] +1 similar issue
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9761/fi-tgl-y/igt@prime_self_import@basic-with_two_bos.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19661/fi-tgl-y/igt@prime_self_import@basic-with_two_bos.html
[i915#142]: https://gitlab.freedesktop.org/drm/intel/issues/142
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
[i915#2405]: https://gitlab.freedesktop.org/drm/intel/issues/2405
[i915#2505]: https://gitlab.freedesktop.org/drm/intel/issues/2505
[i915#2940]: https://gitlab.freedesktop.org/drm/intel/issues/2940
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
Participating hosts (44 -> 39)
------------------------------
Missing (5): fi-ilk-m540 fi-hsw-4200u fi-skl-guc fi-bsw-cyan fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_9761 -> Patchwork_19661
CI-20190529: 20190529
CI_DRM_9761: fc52fc2a7332bd301f802ca3a0444a8fb9fe4f7f @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6001: d0d6f5e14ef181c93e4b503b05d9c18fa480e09d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_19661: 7c94d0d360710a164eb1deedb16a9f484d9502fc @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
7c94d0d36071 drm/i915: Defer object allocation from GGTT probe to GGTT init
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19661/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx