* [PATCH] drm/i915/gem: Calculate object page offset for partial memory mapping
@ 2024-03-25 13:40 Andi Shyti
2024-03-25 23:19 ` Nirmoy Das
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Andi Shyti @ 2024-03-25 13:40 UTC (permalink / raw)
To: intel-gfx, dri-devel
Cc: Andi Shyti, Andi Shyti, Chris Wilson, Lionel Landwerlin
To enable partial memory mapping of GPU virtual memory, it's
necessary to introduce an offset to the object's memory
(obj->mm.pages) scatterlist. This adjustment compensates for
instances when userspace mappings do not start from the beginning
of the object.
Based on a patch by Chris Wilson
<chris.p.wilson@linux.intel.com>.
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Chris Wilson <chris.p.wilson@linux.intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_mman.c | 8 +++++---
drivers/gpu/drm/i915/i915_mm.c | 12 +++++++++++-
drivers/gpu/drm/i915/i915_mm.h | 3 ++-
3 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index a2195e28b625..57a2dda2c3cc 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -276,7 +276,7 @@ static vm_fault_t vm_fault_cpu(struct vm_fault *vmf)
/* PTEs are revoked in obj->ops->put_pages() */
err = remap_io_sg(area,
area->vm_start, area->vm_end - area->vm_start,
- obj->mm.pages->sgl, iomap);
+ obj->mm.pages->sgl, 0, iomap);
if (area->vm_flags & VM_WRITE) {
GEM_BUG_ON(!i915_gem_object_has_pinned_pages(obj));
@@ -302,14 +302,16 @@ static vm_fault_t vm_fault_gtt(struct vm_fault *vmf)
struct i915_ggtt *ggtt = to_gt(i915)->ggtt;
bool write = area->vm_flags & VM_WRITE;
struct i915_gem_ww_ctx ww;
+ unsigned long obj_offset;
intel_wakeref_t wakeref;
struct i915_vma *vma;
pgoff_t page_offset;
int srcu;
int ret;
- /* We don't use vmf->pgoff since that has the fake offset */
+ obj_offset = area->vm_pgoff - drm_vma_node_start(&mmo->vma_node);
page_offset = (vmf->address - area->vm_start) >> PAGE_SHIFT;
+ page_offset += obj_offset;
trace_i915_gem_object_fault(obj, page_offset, true, write);
@@ -404,7 +406,7 @@ static vm_fault_t vm_fault_gtt(struct vm_fault *vmf)
/* Finally, remap it using the new GTT offset */
ret = remap_io_mapping(area,
- area->vm_start + (vma->gtt_view.partial.offset << PAGE_SHIFT),
+ area->vm_start + ((vma->gtt_view.partial.offset - obj_offset) << PAGE_SHIFT),
(ggtt->gmadr.start + i915_ggtt_offset(vma)) >> PAGE_SHIFT,
min_t(u64, vma->size, area->vm_end - area->vm_start),
&ggtt->iomap);
diff --git a/drivers/gpu/drm/i915/i915_mm.c b/drivers/gpu/drm/i915/i915_mm.c
index 7998bc74ab49..f5c97a620962 100644
--- a/drivers/gpu/drm/i915/i915_mm.c
+++ b/drivers/gpu/drm/i915/i915_mm.c
@@ -122,13 +122,15 @@ int remap_io_mapping(struct vm_area_struct *vma,
* @addr: target user address to start at
* @size: size of map area
* @sgl: Start sg entry
+ * @offset: offset from the start of the page
* @iobase: Use stored dma address offset by this address or pfn if -1
*
* Note: this is only safe if the mm semaphore is held when called.
*/
int remap_io_sg(struct vm_area_struct *vma,
unsigned long addr, unsigned long size,
- struct scatterlist *sgl, resource_size_t iobase)
+ struct scatterlist *sgl, unsigned long offset,
+ resource_size_t iobase)
{
struct remap_pfn r = {
.mm = vma->vm_mm,
@@ -141,6 +143,14 @@ int remap_io_sg(struct vm_area_struct *vma,
/* We rely on prevalidation of the io-mapping to skip track_pfn(). */
GEM_BUG_ON((vma->vm_flags & EXPECTED_FLAGS) != EXPECTED_FLAGS);
+ while (offset >= sg_dma_len(r.sgt.sgp) >> PAGE_SHIFT) {
+ offset -= sg_dma_len(r.sgt.sgp) >> PAGE_SHIFT;
+ r.sgt = __sgt_iter(__sg_next(r.sgt.sgp), use_dma(iobase));
+ if (!r.sgt.sgp)
+ return -EINVAL;
+ }
+ r.sgt.curr = offset << PAGE_SHIFT;
+
if (!use_dma(iobase))
flush_cache_range(vma, addr, size);
diff --git a/drivers/gpu/drm/i915/i915_mm.h b/drivers/gpu/drm/i915/i915_mm.h
index 04c8974d822b..69f9351b1a1c 100644
--- a/drivers/gpu/drm/i915/i915_mm.h
+++ b/drivers/gpu/drm/i915/i915_mm.h
@@ -30,6 +30,7 @@ int remap_io_mapping(struct vm_area_struct *vma,
int remap_io_sg(struct vm_area_struct *vma,
unsigned long addr, unsigned long size,
- struct scatterlist *sgl, resource_size_t iobase);
+ struct scatterlist *sgl, unsigned long offset,
+ resource_size_t iobase);
#endif /* __I915_MM_H__ */
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915/gem: Calculate object page offset for partial memory mapping
2024-03-25 13:40 [PATCH] drm/i915/gem: Calculate object page offset for partial memory mapping Andi Shyti
@ 2024-03-25 23:19 ` Nirmoy Das
2024-03-26 11:12 ` Andi Shyti
2024-03-26 0:59 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2024-03-26 1:14 ` ✗ Fi.CI.BAT: failure " Patchwork
2 siblings, 1 reply; 7+ messages in thread
From: Nirmoy Das @ 2024-03-25 23:19 UTC (permalink / raw)
To: Andi Shyti, intel-gfx, dri-devel
Cc: Andi Shyti, Chris Wilson, Lionel Landwerlin
Hi Andi,
I have too many questions :) I think the patch makes sense but need more
context, see below:
On 3/25/2024 2:40 PM, Andi Shyti wrote:
> To enable partial memory mapping of GPU virtual memory, it's
> necessary to introduce an offset to the object's memory
> (obj->mm.pages) scatterlist. This adjustment compensates for
> instances when userspace mappings do not start from the beginning
> of the object.
>
> Based on a patch by Chris Wilson
> <chris.p.wilson@linux.intel.com>.
>
> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
> Cc: Chris Wilson <chris.p.wilson@linux.intel.com>
> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_mman.c | 8 +++++---
> drivers/gpu/drm/i915/i915_mm.c | 12 +++++++++++-
> drivers/gpu/drm/i915/i915_mm.h | 3 ++-
> 3 files changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> index a2195e28b625..57a2dda2c3cc 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> @@ -276,7 +276,7 @@ static vm_fault_t vm_fault_cpu(struct vm_fault *vmf)
> /* PTEs are revoked in obj->ops->put_pages() */
> err = remap_io_sg(area,
> area->vm_start, area->vm_end - area->vm_start,
> - obj->mm.pages->sgl, iomap);
> + obj->mm.pages->sgl, 0, iomap);
Why don't we need partial mmap for CPU but only for GTT ?
Sounds like this also need to be cover by a IGT tests. Don't we need
"Fixes" tag for this?
Regards,
Nirmoy
>
> if (area->vm_flags & VM_WRITE) {
> GEM_BUG_ON(!i915_gem_object_has_pinned_pages(obj));
> @@ -302,14 +302,16 @@ static vm_fault_t vm_fault_gtt(struct vm_fault *vmf)
> struct i915_ggtt *ggtt = to_gt(i915)->ggtt;
> bool write = area->vm_flags & VM_WRITE;
> struct i915_gem_ww_ctx ww;
> + unsigned long obj_offset;
> intel_wakeref_t wakeref;
> struct i915_vma *vma;
> pgoff_t page_offset;
> int srcu;
> int ret;
>
> - /* We don't use vmf->pgoff since that has the fake offset */
> + obj_offset = area->vm_pgoff - drm_vma_node_start(&mmo->vma_node);
> page_offset = (vmf->address - area->vm_start) >> PAGE_SHIFT;
> + page_offset += obj_offset;
>
> trace_i915_gem_object_fault(obj, page_offset, true, write);
>
> @@ -404,7 +406,7 @@ static vm_fault_t vm_fault_gtt(struct vm_fault *vmf)
>
> /* Finally, remap it using the new GTT offset */
> ret = remap_io_mapping(area,
> - area->vm_start + (vma->gtt_view.partial.offset << PAGE_SHIFT),
> + area->vm_start + ((vma->gtt_view.partial.offset - obj_offset) << PAGE_SHIFT),
> (ggtt->gmadr.start + i915_ggtt_offset(vma)) >> PAGE_SHIFT,
> min_t(u64, vma->size, area->vm_end - area->vm_start),
> &ggtt->iomap);
> diff --git a/drivers/gpu/drm/i915/i915_mm.c b/drivers/gpu/drm/i915/i915_mm.c
> index 7998bc74ab49..f5c97a620962 100644
> --- a/drivers/gpu/drm/i915/i915_mm.c
> +++ b/drivers/gpu/drm/i915/i915_mm.c
> @@ -122,13 +122,15 @@ int remap_io_mapping(struct vm_area_struct *vma,
> * @addr: target user address to start at
> * @size: size of map area
> * @sgl: Start sg entry
> + * @offset: offset from the start of the page
> * @iobase: Use stored dma address offset by this address or pfn if -1
> *
> * Note: this is only safe if the mm semaphore is held when called.
> */
> int remap_io_sg(struct vm_area_struct *vma,
> unsigned long addr, unsigned long size,
> - struct scatterlist *sgl, resource_size_t iobase)
> + struct scatterlist *sgl, unsigned long offset,
> + resource_size_t iobase)
> {
> struct remap_pfn r = {
> .mm = vma->vm_mm,
> @@ -141,6 +143,14 @@ int remap_io_sg(struct vm_area_struct *vma,
> /* We rely on prevalidation of the io-mapping to skip track_pfn(). */
> GEM_BUG_ON((vma->vm_flags & EXPECTED_FLAGS) != EXPECTED_FLAGS);
>
> + while (offset >= sg_dma_len(r.sgt.sgp) >> PAGE_SHIFT) {
> + offset -= sg_dma_len(r.sgt.sgp) >> PAGE_SHIFT;
> + r.sgt = __sgt_iter(__sg_next(r.sgt.sgp), use_dma(iobase));
> + if (!r.sgt.sgp)
> + return -EINVAL;
> + }
> + r.sgt.curr = offset << PAGE_SHIFT;
> +
> if (!use_dma(iobase))
> flush_cache_range(vma, addr, size);
>
> diff --git a/drivers/gpu/drm/i915/i915_mm.h b/drivers/gpu/drm/i915/i915_mm.h
> index 04c8974d822b..69f9351b1a1c 100644
> --- a/drivers/gpu/drm/i915/i915_mm.h
> +++ b/drivers/gpu/drm/i915/i915_mm.h
> @@ -30,6 +30,7 @@ int remap_io_mapping(struct vm_area_struct *vma,
>
> int remap_io_sg(struct vm_area_struct *vma,
> unsigned long addr, unsigned long size,
> - struct scatterlist *sgl, resource_size_t iobase);
> + struct scatterlist *sgl, unsigned long offset,
> + resource_size_t iobase);
>
> #endif /* __I915_MM_H__ */
^ permalink raw reply [flat|nested] 7+ messages in thread
* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gem: Calculate object page offset for partial memory mapping
2024-03-25 13:40 [PATCH] drm/i915/gem: Calculate object page offset for partial memory mapping Andi Shyti
2024-03-25 23:19 ` Nirmoy Das
@ 2024-03-26 0:59 ` Patchwork
2024-03-26 1:14 ` ✗ Fi.CI.BAT: failure " Patchwork
2 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2024-03-26 0:59 UTC (permalink / raw)
To: Andi Shyti; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/gem: Calculate object page offset for partial memory mapping
URL : https://patchwork.freedesktop.org/series/131582/
State : warning
== Summary ==
Error: dim checkpatch failed
54dc7dc5eb50 drm/i915/gem: Calculate object page offset for partial memory mapping
-:56: WARNING:LONG_LINE: line length of 108 exceeds 100 columns
#56: FILE: drivers/gpu/drm/i915/gem/i915_gem_mman.c:409:
+ area->vm_start + ((vma->gtt_view.partial.offset - obj_offset) << PAGE_SHIFT),
total: 0 errors, 1 warnings, 0 checks, 71 lines checked
^ permalink raw reply [flat|nested] 7+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915/gem: Calculate object page offset for partial memory mapping
2024-03-25 13:40 [PATCH] drm/i915/gem: Calculate object page offset for partial memory mapping Andi Shyti
2024-03-25 23:19 ` Nirmoy Das
2024-03-26 0:59 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2024-03-26 1:14 ` Patchwork
2 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2024-03-26 1:14 UTC (permalink / raw)
To: Andi Shyti; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 13491 bytes --]
== Series Details ==
Series: drm/i915/gem: Calculate object page offset for partial memory mapping
URL : https://patchwork.freedesktop.org/series/131582/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_14482 -> Patchwork_131582v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_131582v1 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_131582v1, please notify your bug team (I915-ci-infra@lists.freedesktop.org) 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_131582v1/index.html
Participating hosts (37 -> 34)
------------------------------
Additional (1): bat-arls-4
Missing (4): bat-mtlp-8 bat-dg1-7 bat-kbl-2 fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_131582v1:
### IGT changes ###
#### Possible regressions ####
* igt@fbdev@eof:
- fi-kbl-7567u: [PASS][1] -> [TIMEOUT][2] +4 other tests timeout
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/fi-kbl-7567u/igt@fbdev@eof.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-kbl-7567u/igt@fbdev@eof.html
- fi-cfl-8700k: [PASS][3] -> [TIMEOUT][4] +4 other tests timeout
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/fi-cfl-8700k/igt@fbdev@eof.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-cfl-8700k/igt@fbdev@eof.html
- fi-bsw-nick: [PASS][5] -> [TIMEOUT][6] +4 other tests timeout
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/fi-bsw-nick/igt@fbdev@eof.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-bsw-nick/igt@fbdev@eof.html
- bat-rplp-1: [PASS][7] -> [TIMEOUT][8] +4 other tests timeout
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/bat-rplp-1/igt@fbdev@eof.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/bat-rplp-1/igt@fbdev@eof.html
- fi-rkl-11600: [PASS][9] -> [TIMEOUT][10] +4 other tests timeout
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/fi-rkl-11600/igt@fbdev@eof.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-rkl-11600/igt@fbdev@eof.html
- bat-jsl-3: [PASS][11] -> [TIMEOUT][12] +4 other tests timeout
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/bat-jsl-3/igt@fbdev@eof.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/bat-jsl-3/igt@fbdev@eof.html
- bat-adln-1: [PASS][13] -> [TIMEOUT][14] +4 other tests timeout
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/bat-adln-1/igt@fbdev@eof.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/bat-adln-1/igt@fbdev@eof.html
- fi-elk-e7500: [PASS][15] -> [TIMEOUT][16] +4 other tests timeout
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/fi-elk-e7500/igt@fbdev@eof.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-elk-e7500/igt@fbdev@eof.html
* igt@fbdev@info:
- fi-cfl-8109u: NOTRUN -> [TIMEOUT][17] +4 other tests timeout
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-cfl-8109u/igt@fbdev@info.html
- fi-ivb-3770: [PASS][18] -> [TIMEOUT][19] +4 other tests timeout
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/fi-ivb-3770/igt@fbdev@info.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-ivb-3770/igt@fbdev@info.html
- bat-adls-6: [PASS][20] -> [TIMEOUT][21] +4 other tests timeout
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/bat-adls-6/igt@fbdev@info.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/bat-adls-6/igt@fbdev@info.html
- fi-ilk-650: [PASS][22] -> [TIMEOUT][23] +4 other tests timeout
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/fi-ilk-650/igt@fbdev@info.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-ilk-650/igt@fbdev@info.html
- bat-jsl-1: [PASS][24] -> [TIMEOUT][25] +4 other tests timeout
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/bat-jsl-1/igt@fbdev@info.html
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/bat-jsl-1/igt@fbdev@info.html
- bat-adlp-6: [PASS][26] -> [TIMEOUT][27] +4 other tests timeout
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/bat-adlp-6/igt@fbdev@info.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/bat-adlp-6/igt@fbdev@info.html
* igt@fbdev@nullptr:
- fi-tgl-1115g4: [PASS][28] -> [TIMEOUT][29] +4 other tests timeout
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/fi-tgl-1115g4/igt@fbdev@nullptr.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-tgl-1115g4/igt@fbdev@nullptr.html
* igt@fbdev@read:
- bat-adlp-9: [PASS][30] -> [TIMEOUT][31] +4 other tests timeout
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/bat-adlp-9/igt@fbdev@read.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/bat-adlp-9/igt@fbdev@read.html
* igt@fbdev@write:
- fi-cfl-guc: [PASS][32] -> [TIMEOUT][33] +4 other tests timeout
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/fi-cfl-guc/igt@fbdev@write.html
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-cfl-guc/igt@fbdev@write.html
- fi-pnv-d510: [PASS][34] -> [TIMEOUT][35] +4 other tests timeout
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/fi-pnv-d510/igt@fbdev@write.html
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-pnv-d510/igt@fbdev@write.html
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* igt@kms_flip@basic-flip-vs-modeset@a-dp6:
- {bat-mtlp-9}: [PASS][36] -> [DMESG-WARN][37]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/bat-mtlp-9/igt@kms_flip@basic-flip-vs-modeset@a-dp6.html
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/bat-mtlp-9/igt@kms_flip@basic-flip-vs-modeset@a-dp6.html
Known issues
------------
Here are the changes found in Patchwork_131582v1 that come from known issues:
### CI changes ###
#### Issues hit ####
* boot:
- bat-dg2-11: [PASS][38] -> [FAIL][39] ([i915#10491])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/bat-dg2-11/boot.html
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/bat-dg2-11/boot.html
#### Possible fixes ####
* boot:
- fi-cfl-8109u: [FAIL][40] ([i915#8293]) -> [PASS][41]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/fi-cfl-8109u/boot.html
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-cfl-8109u/boot.html
### IGT changes ###
#### Issues hit ####
* igt@gem_huc_copy@huc-copy:
- fi-cfl-8109u: NOTRUN -> [SKIP][42] ([i915#2190])
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-cfl-8109u/igt@gem_huc_copy@huc-copy.html
* igt@gem_lmem_swapping@verify-random:
- fi-cfl-8109u: NOTRUN -> [SKIP][43] ([i915#4613]) +3 other tests skip
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-cfl-8109u/igt@gem_lmem_swapping@verify-random.html
* igt@i915_selftest@live@gt_engines:
- bat-adls-6: [PASS][44] -> [TIMEOUT][45] ([i915#10026])
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/bat-adls-6/igt@i915_selftest@live@gt_engines.html
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/bat-adls-6/igt@i915_selftest@live@gt_engines.html
* igt@kms_pm_backlight@basic-brightness:
- fi-cfl-8109u: NOTRUN -> [SKIP][46] +11 other tests skip
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-cfl-8109u/igt@kms_pm_backlight@basic-brightness.html
#### Possible fixes ####
* igt@gem_lmem_swapping@basic@lmem0:
- bat-dg2-14: [FAIL][47] ([i915#10378]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/bat-dg2-14/igt@gem_lmem_swapping@basic@lmem0.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/bat-dg2-14/igt@gem_lmem_swapping@basic@lmem0.html
* igt@i915_selftest@live@execlists:
- bat-dg2-14: [ABORT][49] ([i915#10366]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/bat-dg2-14/igt@i915_selftest@live@execlists.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/bat-dg2-14/igt@i915_selftest@live@execlists.html
* igt@i915_selftest@live@gt_pm:
- bat-dg2-9: [ABORT][51] ([i915#10366]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/bat-dg2-9/igt@i915_selftest@live@gt_pm.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/bat-dg2-9/igt@i915_selftest@live@gt_pm.html
* igt@i915_selftest@live@mman:
- bat-dg2-8: [ABORT][53] ([i915#10366]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/bat-dg2-8/igt@i915_selftest@live@mman.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/bat-dg2-8/igt@i915_selftest@live@mman.html
#### Warnings ####
* igt@i915_module_load@load:
- fi-kbl-7567u: [DMESG-WARN][55] ([i915#180] / [i915#1982] / [i915#8585]) -> [DMESG-WARN][56] ([i915#180] / [i915#8585])
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/fi-kbl-7567u/igt@i915_module_load@load.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-kbl-7567u/igt@i915_module_load@load.html
* igt@kms_pm_rpm@basic-pci-d3-state:
- fi-kbl-7567u: [DMESG-WARN][57] ([i915#180] / [i915#8585]) -> [DMESG-WARN][58] ([i915#180] / [i915#1982] / [i915#8585])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14482/fi-kbl-7567u/igt@kms_pm_rpm@basic-pci-d3-state.html
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/fi-kbl-7567u/igt@kms_pm_rpm@basic-pci-d3-state.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#10026]: https://gitlab.freedesktop.org/drm/intel/issues/10026
[i915#10196]: https://gitlab.freedesktop.org/drm/intel/issues/10196
[i915#10197]: https://gitlab.freedesktop.org/drm/intel/issues/10197
[i915#10200]: https://gitlab.freedesktop.org/drm/intel/issues/10200
[i915#10202]: https://gitlab.freedesktop.org/drm/intel/issues/10202
[i915#10206]: https://gitlab.freedesktop.org/drm/intel/issues/10206
[i915#10207]: https://gitlab.freedesktop.org/drm/intel/issues/10207
[i915#10208]: https://gitlab.freedesktop.org/drm/intel/issues/10208
[i915#10209]: https://gitlab.freedesktop.org/drm/intel/issues/10209
[i915#10211]: https://gitlab.freedesktop.org/drm/intel/issues/10211
[i915#10212]: https://gitlab.freedesktop.org/drm/intel/issues/10212
[i915#10213]: https://gitlab.freedesktop.org/drm/intel/issues/10213
[i915#10214]: https://gitlab.freedesktop.org/drm/intel/issues/10214
[i915#10216]: https://gitlab.freedesktop.org/drm/intel/issues/10216
[i915#10366]: https://gitlab.freedesktop.org/drm/intel/issues/10366
[i915#10378]: https://gitlab.freedesktop.org/drm/intel/issues/10378
[i915#10491]: https://gitlab.freedesktop.org/drm/intel/issues/10491
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#8293]: https://gitlab.freedesktop.org/drm/intel/issues/8293
[i915#8585]: https://gitlab.freedesktop.org/drm/intel/issues/8585
[i915#8809]: https://gitlab.freedesktop.org/drm/intel/issues/8809
[i915#9157]: https://gitlab.freedesktop.org/drm/intel/issues/9157
[i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318
[i915#9732]: https://gitlab.freedesktop.org/drm/intel/issues/9732
[i915#9812]: https://gitlab.freedesktop.org/drm/intel/issues/9812
[i915#9886]: https://gitlab.freedesktop.org/drm/intel/issues/9886
Build changes
-------------
* Linux: CI_DRM_14482 -> Patchwork_131582v1
CI-20190529: 20190529
CI_DRM_14482: 4a8fabcf2f1aadbbb777a94edd01549c2aa95caf @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7782: a404f73182948e843640d00cc279883391cf6ef4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_131582v1: 4a8fabcf2f1aadbbb777a94edd01549c2aa95caf @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
6185edd61e52 drm/i915/gem: Calculate object page offset for partial memory mapping
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_131582v1/index.html
[-- Attachment #2: Type: text/html, Size: 13651 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915/gem: Calculate object page offset for partial memory mapping
2024-03-25 23:19 ` Nirmoy Das
@ 2024-03-26 11:12 ` Andi Shyti
2024-03-26 12:05 ` Nirmoy Das
0 siblings, 1 reply; 7+ messages in thread
From: Andi Shyti @ 2024-03-26 11:12 UTC (permalink / raw)
To: Nirmoy Das
Cc: Andi Shyti, intel-gfx, dri-devel, Andi Shyti, Chris Wilson,
Lionel Landwerlin
Hi Nirmoy,
...
> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> > index a2195e28b625..57a2dda2c3cc 100644
> > --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> > @@ -276,7 +276,7 @@ static vm_fault_t vm_fault_cpu(struct vm_fault *vmf)
> > /* PTEs are revoked in obj->ops->put_pages() */
> > err = remap_io_sg(area,
> > area->vm_start, area->vm_end - area->vm_start,
> > - obj->mm.pages->sgl, iomap);
> > + obj->mm.pages->sgl, 0, iomap);
>
> Why don't we need partial mmap for CPU but only for GTT ?
As far as I understood we don't. I have a version with the CPU
offset as well in trybot[*]
But without support for segmented buffer objects, I don't know
how much this has any effect.
> Sounds like this also need to be cover by a IGT tests.
Yes, I it does need some igt work, working on it.
> Don't we need "Fixes" tag for this?
Why should we? I'm not fixing anything here, I'm just
recalculating the mapping not starting from the beginning of the
scatter page.
Andi
[*] https://patchwork.freedesktop.org/patch/584474/?series=131539&rev=2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915/gem: Calculate object page offset for partial memory mapping
2024-03-26 11:12 ` Andi Shyti
@ 2024-03-26 12:05 ` Nirmoy Das
2024-03-28 10:53 ` Andi Shyti
0 siblings, 1 reply; 7+ messages in thread
From: Nirmoy Das @ 2024-03-26 12:05 UTC (permalink / raw)
To: Andi Shyti
Cc: intel-gfx, dri-devel, Andi Shyti, Chris Wilson, Lionel Landwerlin
Hi Andi,
On 3/26/2024 12:12 PM, Andi Shyti wrote:
> Hi Nirmoy,
>
> ...
>
>>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
>>> index a2195e28b625..57a2dda2c3cc 100644
>>> --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
>>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
>>> @@ -276,7 +276,7 @@ static vm_fault_t vm_fault_cpu(struct vm_fault *vmf)
>>> /* PTEs are revoked in obj->ops->put_pages() */
>>> err = remap_io_sg(area,
>>> area->vm_start, area->vm_end - area->vm_start,
>>> - obj->mm.pages->sgl, iomap);
>>> + obj->mm.pages->sgl, 0, iomap);
>> Why don't we need partial mmap for CPU but only for GTT ?
> As far as I understood we don't. I have a version with the CPU
> offset as well in trybot[*]
>
> But without support for segmented buffer objects, I don't know
> how much this has any effect.
You confused me more :) Why segmented buffer object is needed for
partial CPU mmap but not for GTT ?
From high level, GTT and CPU both should support partial mmap unless I
missing something here.
>
>> Sounds like this also need to be cover by a IGT tests.
> Yes, I it does need some igt work, working on it.
>
>> Don't we need "Fixes" tag for this?
> Why should we? I'm not fixing anything here,
If userspace expects partial mmap to work then this is a bug/gap in
i915 so we need to
backport this as far as possible. Need some information about the
requirement about why we need this patch suddenly?
Regards,
Nirmoy
> I'm just
> recalculating the mapping not starting from the beginning of the
> scatter page.
>
> Andi
>
> [*] https://patchwork.freedesktop.org/patch/584474/?series=131539&rev=2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915/gem: Calculate object page offset for partial memory mapping
2024-03-26 12:05 ` Nirmoy Das
@ 2024-03-28 10:53 ` Andi Shyti
0 siblings, 0 replies; 7+ messages in thread
From: Andi Shyti @ 2024-03-28 10:53 UTC (permalink / raw)
To: Nirmoy Das
Cc: Andi Shyti, intel-gfx, dri-devel, Andi Shyti, Chris Wilson,
Lionel Landwerlin
Hi Nirmoy,
On Tue, Mar 26, 2024 at 01:05:37PM +0100, Nirmoy Das wrote:
> On 3/26/2024 12:12 PM, Andi Shyti wrote:
> > > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> > > > index a2195e28b625..57a2dda2c3cc 100644
> > > > --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> > > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> > > > @@ -276,7 +276,7 @@ static vm_fault_t vm_fault_cpu(struct vm_fault *vmf)
> > > > /* PTEs are revoked in obj->ops->put_pages() */
> > > > err = remap_io_sg(area,
> > > > area->vm_start, area->vm_end - area->vm_start,
> > > > - obj->mm.pages->sgl, iomap);
> > > > + obj->mm.pages->sgl, 0, iomap);
> > > Why don't we need partial mmap for CPU but only for GTT ?
> > As far as I understood we don't. I have a version with the CPU
> > offset as well in trybot[*]
> >
> > But without support for segmented buffer objects, I don't know
> > how much this has any effect.
>
> You confused me more :) Why segmented buffer object is needed for partial
> CPU mmap but not for GTT ?
atually segmented bo's were introduced to support single dma
buffers instead of fragmented buffers. But this goes beyond the
scope of this patch.
> From high level, GTT and CPU both should support partial mmap unless I
> missing something here.
But yes, we could take the patch I linked which adds some offset
to the cpu memory. I will add it in V2.
> >
> > > Sounds like this also need to be cover by a IGT tests.
> > Yes, I it does need some igt work, working on it.
> >
> > > Don't we need "Fixes" tag for this?
> > Why should we? I'm not fixing anything here,
>
> If userspace expects partial mmap to work then this is a bug/gap in i915 so
> we need to
>
> backport this as far as possible. Need some information about the
> requirement about why we need this patch suddenly?
But a gap is not a bug. Theoretically we are adding a feature.
On the other hand it would be a bug if the API promises to add
the offset but in reality it doesn't. I will check if this is the
case and it needs to be well described in the commit message.
Thanks,
Andi
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-03-28 10:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 13:40 [PATCH] drm/i915/gem: Calculate object page offset for partial memory mapping Andi Shyti
2024-03-25 23:19 ` Nirmoy Das
2024-03-26 11:12 ` Andi Shyti
2024-03-26 12:05 ` Nirmoy Das
2024-03-28 10:53 ` Andi Shyti
2024-03-26 0:59 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2024-03-26 1:14 ` ✗ Fi.CI.BAT: failure " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.