Introduce new i915 macros for checking PTEs
Michael [email protected]>
cover Introduce new i915 macros for checking PTEs
From: Michael Cheng <[email protected]>
This series is to introduce new macros generic to i915 for checking 0 and 1 bits, instead on relying on whats defined by the mmu, since it could be different or non-exisitent between different platforms.
Michael Cheng (1):
drm/i915: Introduce new macros for i915 PTE
drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 6 +++--- drivers/gpu/drm/i915/gt/intel_ggtt.c | 2 +- drivers/gpu/drm/i915/gt/intel_gtt.h | 3 +++ drivers/gpu/drm/i915/gvt/gtt.c | 12 ++++++------ 4 files changed, 13 insertions(+), 10 deletions(-)
Signature · 1 line
2.25.1
Quoted 1 line · Michael Cheng
From: Michael Cheng <[email protected]>
Sender is Michael Cheng <[email protected]>, please fix your git config.
BR,
Jani.
Quoted 13 lines
This series is to introduce new macros generic to i915 for checking 0 and 1 bits, instead on relying on whats defined by the mmu, since it could be different or non-exisitent between different platforms.
Michael Cheng (1):
drm/i915: Introduce new macros for i915 PTEdrivers/gpu/drm/i915/gt/gen8_ppgtt.c | 6 +++--- drivers/gpu/drm/i915/gt/intel_ggtt.c | 2 +- drivers/gpu/drm/i915/gt/intel_gtt.h | 3 +++ drivers/gpu/drm/i915/gvt/gtt.c | 12 ++++++------ 4 files changed, 13 insertions(+), 10 deletions(-)
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Jani, all,
Quoted 7 lines · Jani Nikula
Quoted 1 line · Michael Cheng
From: Michael Cheng <[email protected]>
Sender is Michael Cheng <[email protected]>, please fix your git config.
I am unsure how this even happened in the first place, because outlook.iglb.intel.com doesn't even have any email related records (MX/SPF/DKIM), so messages aren't even being received anyway. I'm surprised it sent from there without being marked as spam, honestly.
That said...
Quoted 1 line
From: Michael Cheng <[email protected]>
Pretty sure Michael's email here is correct because of that. Perhaps they could confirm one way or another?
-slade
Quoted 7 lines · Slade Watkins
Jani, all,
Quoted 4 lines · Jani Nikula
Quoted 1 line · Michael Cheng
From: Michael Cheng <[email protected]>
Quoted 8 lines
Quoted 3 lines
Sender is Michael Cheng <[email protected]>, please fix your git config.
I am unsure how this even happened in the first place, because outlook.iglb.intel.com doesn't even have any email related records (MX/SPF/DKIM), so messages aren't even being received anyway. I'm surprised it sent from there without being marked as spam, honestly.
From the email headers:
Received: from mwiznero-mobl2.amr.corp.intel.com (HELO mvcheng-desk2.intel.com) ([10.209.22.158]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2021 09:19:27 -0800 From: Michael Cheng <michael.cheng>@intel.com>
Note the additional ">" in the middle. I think the outlook.iglb.intel.com part mentioned actually comes from an email client behavior when you try to reply to such email... In my case mutt tries to reply to michael.cheng@ldmartin-desk2, in which the second part is my machine's hostname.
It was a simple misconfiguration in ~/.gitconfig.
Lucas De Marchi
Michael [email protected]>
PATCH 1/1 drm/i915: Introduce new macros for i915 PTE
In reply to Michael [email protected]>From: Michael Cheng <[email protected]>
Certain functions within i915 uses macros that are defined for specific architectures by the mmu, such as _PAGE_RW and _PAGE_PRESENT (Some architectures don't even have these macros defined, like ARM64).
Instead of re-using bits defined for the CPU, we should use bits defined for i915. This patch introduces two new macros, I915_PAGE_PRESENT and I915_PAGE_RW, to check for bits 0 and 1 and, to replace all occurances of _PAGE_RW and _PAGE_PRESENT within i915.
Looking at the bspecs for pre gen 12 and gen 12, bit 0 and 1 are the same throughout the generations.
--- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 6 +++--- drivers/gpu/drm/i915/gt/intel_ggtt.c | 2 +- drivers/gpu/drm/i915/gt/intel_gtt.h | 3 +++ drivers/gpu/drm/i915/gvt/gtt.c | 12 ++++++------ 4 files changed, 13 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/gt/gen8_ppgtt.c +3 -3
@@ -18,7 +18,7 @@static u64 gen8_pde_encode (const dma_addr_t addr,const enum i915_cache_level level) { -u64 pde = addr | _PAGE_PRESENT | _PAGE_RW; +u64 pde = addr |I915_PAGE_PRESENT |I915_PAGE_RW ;if (level !=I915_CACHE_NONE ) pde |=PPAT_CACHED_PDE ;
@@ -32,10 +32,10 @@ static u64 gen8_pte_encode(dma_addr_t addr, enum i915_cache_level level, u32 flags) { -gen8_pte_t pte = addr | _PAGE_PRESENT | _PAGE_RW; +gen8_pte_t pte = addr |I915_PAGE_PRESENT |I915_PAGE_RW ;if (unlikely (flags &PTE_READ_ONLY )) - pte &= ~_PAGE_RW; + pte &= ~I915_PAGE_RW ;if (flags &PTE_LM ) pte |=GEN12_PPGTT_PTE_LM ;
drivers/gpu/drm/i915/gt/intel_ggtt.c +1 -1
@@ -207,7 +207,7 @@ u64 gen8_ggtt_pte_encode(dma_addr_t addr, enum i915_cache_level level, u32 flags) { -gen8_pte_t pte = addr | _PAGE_PRESENT; +gen8_pte_t pte = addr |I915_PAGE_PRESENT ;if (flags &PTE_LM ) pte |=GEN12_GGTT_PTE_LM ;
drivers/gpu/drm/i915/gt/intel_gtt.h +3 -0
@@ -39,6 +39,9 @@#define NALLOC 3/* 1 normal, 1 for concurrent threads, 1 for preallocation */ +#define I915_PAGE_PRESENT BIT_ULL(0) +#define I915_PAGE_RW BIT_ULL(1) +#define I915_GTT_PAGE_SIZE_4K BIT_ULL(12)#define I915_GTT_PAGE_SIZE_64K BIT_ULL(16)#define I915_GTT_PAGE_SIZE_2M BIT_ULL(21)
drivers/gpu/drm/i915/gvt/gtt.c +6 -6
@@ -446,17 +446,17 @@ static bool gen8_gtt_test_present(struct intel_gvt_gtt_entry *e) || e->type == GTT_TYPE_PPGTT_ROOT_L4_ENTRY)return (e->val64 !=0 ); else - return (e->val64 & _PAGE_PRESENT); + return (e->val64 & I915_PAGE_PRESENT); }static void gtt_entry_clear_present (struct intel_gvt_gtt_entry *e) { - e->val64 &= ~_PAGE_PRESENT; + e->val64 &= ~I915_PAGE_PRESENT ; }static void gtt_entry_set_present (struct intel_gvt_gtt_entry *e) { - e->val64 |= _PAGE_PRESENT; + e->val64 |=I915_PAGE_PRESENT ; }static bool gen8_gtt_test_64k_splited (struct intel_gvt_gtt_entry *e)
@@ -2439,7 +2439,7 @@ static int alloc_scratch_pages(struct intel_vgpu *vgpu,/* The entry parameters like present/writeable/cache type * set to the same as i915's scratch page tree. */ - se.val64 |= _PAGE_PRESENT | _PAGE_RW; + se.val64 |=I915_PAGE_PRESENT |I915_PAGE_RW ;if (type ==GTT_TYPE_PPGTT_PDE_PT ) se.val64 |=PPAT_CACHED ;
@@ -2896,7 +2896,7 @@ void intel_gvt_restore_ggtt(struct intel_gvt *gvt) offset =vgpu_aperture_gmadr_base (vgpu) >>PAGE_SHIFT ;for (idx =0 ; idx < num_low; idx++) { pte = mm->ggtt_mm.host_ggtt_aperture[idx]; -if (pte & _PAGE_PRESENT) +if (pte &I915_PAGE_PRESENT )write_pte64 (vgpu->gvt->gt->ggtt, offset + idx, pte); }
@@ -2904,7 +2904,7 @@ void intel_gvt_restore_ggtt(struct intel_gvt *gvt) offset =vgpu_hidden_gmadr_base (vgpu) >>PAGE_SHIFT ;for (idx =0 ; idx < num_hi; idx++) { pte = mm->ggtt_mm.host_ggtt_hidden[idx]; -if (pte & _PAGE_PRESENT) +if (pte &I915_PAGE_PRESENT )write_pte64 (vgpu->gvt->gt->ggtt, offset + idx, pte); } }
Signature · 1 line
2.25.1
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Introduce new i915 macros for checking PTEs (rev2)
In reply to Michael [email protected]>== Series Details ==
== Series Details ==
Series: Introduce new i915 macros for checking PTEs (rev2)
URL : https://patchwork.freedesktop.org/series/96679/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
eb43f0f4da80 drm/i915: Introduce new macros for i915 PTE
-:13: WARNING:TYPO_SPELLING: 'occurances' may be misspelled - perhaps 'occurrences'?
#13:
replace all occurances of _PAGE_RW and _PAGE_PRESENT within i915.
^^^^^^^^^^total: 0 errors, 1 warnings, 0 checks, 81 lines checked
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for Introduce new i915 macros for checking PTEs (rev2)
In reply to Michael [email protected]>== Series Details ==
== Series Details ==
Series: Introduce new i915 macros for checking PTEs (rev2)
URL : https://patchwork.freedesktop.org/series/96679/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_10854 -> Patchwork_21537
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_21537 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_21537, 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_21537/index.html
Participating hosts (40 -> 35)
------------------------------
Additional (2): fi-icl-u2 fi-pnv-d510
Missing (7): bat-dg1-6 fi-tgl-u2 bat-dg1-5 fi-bsw-cyan bat-adlp-4 fi-ctg-p8600 fi-bdw-samus
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_21537:
### IGT changes ###
#### Possible regressions ####
* igt@core_hotunplug@unbind-rebind:
- fi-pnv-d510: NOTRUN -> [FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21537/fi-pnv-d510/igt@[email protected]
New tests
---------
New tests have been introduced between CI_DRM_10854 and Patchwork_21537:
### New IGT tests (1) ###
* igt@gem_exec_suspend@basic-s0:
- Statuses : 1 incomplete(s) 33 pass(s) 1 skip(s)
- Exec time: [0.0, 20.37] s
Known issues
------------
Here are the changes found in Patchwork_21537 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_cs_nop@fork-gfx0:
- fi-icl-u2: NOTRUN -> [SKIP][2] ([fdo#109315]) +17 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21537/fi-icl-u2/igt@amdgpu/[email protected]
* igt@amdgpu/amd_cs_nop@sync-fork-compute0:
- fi-snb-2600: NOTRUN -> [SKIP][3] ([fdo#109271]) +17 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21537/fi-snb-2600/igt@amdgpu/[email protected]
* igt@gem_huc_copy@huc-copy:
- fi-icl-u2: NOTRUN -> [SKIP][4] ([i915#2190])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21537/fi-icl-u2/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-kbl-soraka: [PASS][5] -> [DMESG-WARN][6] ([i915#1982])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10854/fi-kbl-soraka/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21537/fi-kbl-soraka/igt@[email protected]
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2: NOTRUN -> [SKIP][7] ([fdo#111827]) +8 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21537/fi-icl-u2/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-icl-u2: NOTRUN -> [SKIP][8] ([fdo#109278]) +2 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21537/fi-icl-u2/igt@[email protected]
* igt@kms_force_connector_basic@force-load-detect:
- fi-icl-u2: NOTRUN -> [SKIP][9] ([fdo#109285])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21537/fi-icl-u2/igt@[email protected]
* igt@prime_vgem@basic-userptr:
- fi-pnv-d510: NOTRUN -> [SKIP][10] ([fdo#109271]) +53 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21537/fi-pnv-d510/igt@[email protected]
- fi-icl-u2: NOTRUN -> [SKIP][11] ([i915#3301])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21537/fi-icl-u2/igt@[email protected]
#### Possible fixes ####
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-skl-6600u: [FAIL][12] ([i915#3239]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10854/fi-skl-6600u/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21537/fi-skl-6600u/igt@[email protected]
* igt@i915_selftest@live@hangcheck:
- fi-snb-2600: [INCOMPLETE][14] ([i915#3921]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10854/fi-snb-2600/igt@i915_selftest@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21537/fi-snb-2600/igt@i915_selftest@[email protected]
* igt@kms_frontbuffer_tracking@basic:
- {fi-hsw-gt1}: [DMESG-WARN][16] ([i915#4290]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10854/fi-hsw-gt1/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21537/fi-hsw-gt1/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#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#3239]: https://gitlab.freedesktop.org/drm/intel/issues/3239
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
[i915#4290]: https://gitlab.freedesktop.org/drm/intel/issues/4290
Build changes
-------------
* Linux: CI_DRM_10854 -> Patchwork_21537
CI-20190529: 20190529
CI_DRM_10854: 895fb34d3265137c84fe3e9dd48fb9ad2e00fd36 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6274: 569de51145fba197a8d93b2417348d47507bf485 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_21537: eb43f0f4da80685a813b4480f07753afe16addd6 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
eb43f0f4da80 drm/i915: Introduce new macros for i915 PTE
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21537/index.html