* [PATCH] drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg()
@ 2018-01-04 16:38 Chris Wilson
2018-01-04 17:20 ` Matthew Auld
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2018-01-04 16:38 UTC (permalink / raw)
To: intel-gfx; +Cc: Matthew Auld
In some iommu, e.g. swiotlb, the available space can be quite limited.
So we employ a trial-and-error approach to seeing if our large
contiguous chunks can fit, and if that fails we try again with smaller
chunks after trying to free our own lazily allocated blobs. As we use a
trial-and-error approach, we do not want dma_map_sg() to emit a WARN of
its own accord, we want to gracefully report the error back to the caller
instead.
Note that our noisy culprit, swiotlb, doesn't honour the flag, yet.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index c5f393870532..f2a0f556da21 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -2335,9 +2335,10 @@ int i915_gem_gtt_prepare_pages(struct drm_i915_gem_object *obj,
struct sg_table *pages)
{
do {
- if (dma_map_sg(&obj->base.dev->pdev->dev,
- pages->sgl, pages->nents,
- PCI_DMA_BIDIRECTIONAL))
+ if (dma_map_sg_attrs(&obj->base.dev->pdev->dev,
+ pages->sgl, pages->nents,
+ PCI_DMA_BIDIRECTIONAL,
+ DMA_ATTR_NO_WARN))
return 0;
/* If the DMA remap fails, one cause can be that we have
--
2.15.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg()
2018-01-04 16:38 [PATCH] drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg() Chris Wilson
@ 2018-01-04 17:20 ` Matthew Auld
2018-01-04 18:50 ` Chris Wilson
2018-01-04 17:25 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-01-04 18:12 ` ✓ Fi.CI.IGT: " Patchwork
2 siblings, 1 reply; 5+ messages in thread
From: Matthew Auld @ 2018-01-04 17:20 UTC (permalink / raw)
To: Chris Wilson; +Cc: Intel Graphics Development, Matthew Auld
On 4 January 2018 at 16:38, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> In some iommu, e.g. swiotlb, the available space can be quite limited.
> So we employ a trial-and-error approach to seeing if our large
> contiguous chunks can fit, and if that fails we try again with smaller
> chunks after trying to free our own lazily allocated blobs. As we use a
> trial-and-error approach, we do not want dma_map_sg() to emit a WARN of
> its own accord, we want to gracefully report the error back to the caller
> instead.
>
> Note that our noisy culprit, swiotlb, doesn't honour the flag, yet.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg()
2018-01-04 16:38 [PATCH] drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg() Chris Wilson
2018-01-04 17:20 ` Matthew Auld
@ 2018-01-04 17:25 ` Patchwork
2018-01-04 18:12 ` ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-01-04 17:25 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg()
URL : https://patchwork.freedesktop.org/series/36025/
State : success
== Summary ==
Series 36025v1 drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg()
https://patchwork.freedesktop.org/api/1.0/series/36025/revisions/1/mbox/
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
pass -> FAIL (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass -> FAIL (fi-skl-6700k2) fdo#103191
Subgroup suspend-read-crc-pipe-b:
pass -> INCOMPLETE (fi-snb-2520m) fdo#103713
pass -> DMESG-WARN (fi-kbl-r) fdo#104172 +1
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:425s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:423s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:367s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:481s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:275s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:482s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:480s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:469s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:459s
fi-elk-e7500 total:224 pass:168 dwarn:10 dfail:0 fail:0 skip:45
fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:261s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:516s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:388s
fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:400s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:411s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:455s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:411s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:465s
fi-kbl-7560u total:288 pass:268 dwarn:1 dfail:0 fail:0 skip:19 time:492s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:452s
fi-kbl-r total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:499s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:572s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:437s
fi-skl-6600u total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:506s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:525s
fi-skl-6700k2 total:288 pass:263 dwarn:0 dfail:0 fail:1 skip:24 time:480s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:490s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:431s
fi-snb-2520m total:245 pass:211 dwarn:0 dfail:0 fail:0 skip:33
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:400s
Blacklisted hosts:
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:556s
fi-cnl-y total:249 pass:224 dwarn:0 dfail:0 fail:0 skip:24
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:466s
eb3dae33ff20a9460034bbfa8a95c1c56c173116 drm-tip: 2018y-01m-04d-13h-53m-17s UTC integration manifest
f668d8cdecde drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7608/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg()
2018-01-04 16:38 [PATCH] drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg() Chris Wilson
2018-01-04 17:20 ` Matthew Auld
2018-01-04 17:25 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-01-04 18:12 ` Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-01-04 18:12 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg()
URL : https://patchwork.freedesktop.org/series/36025/
State : success
== Summary ==
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-primscrn-pri-shrfb-draw-render:
fail -> PASS (shard-hsw) fdo#103167 +1
Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
fail -> PASS (shard-snb) fdo#101623
Test kms_flip:
Subgroup flip-vs-panning-vs-hang-interruptible:
pass -> DMESG-WARN (shard-snb) fdo#103821
Subgroup vblank-vs-modeset-suspend-interruptible:
skip -> PASS (shard-snb)
incomplete -> PASS (shard-hsw) fdo#103540
Subgroup modeset-vs-vblank-race-interruptible:
fail -> PASS (shard-hsw) fdo#103060
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103821 https://bugs.freedesktop.org/show_bug.cgi?id=103821
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
shard-hsw total:2636 pass:1491 dwarn:1 dfail:0 fail:10 skip:1134 time:8724s
shard-snb total:2713 pass:1308 dwarn:2 dfail:0 fail:12 skip:1391 time:7785s
Blacklisted hosts:
shard-apl total:2636 pass:1635 dwarn:1 dfail:0 fail:26 skip:974 time:12926s
shard-kbl total:2713 pass:1791 dwarn:14 dfail:0 fail:29 skip:879 time:10541s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7608/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg()
2018-01-04 17:20 ` Matthew Auld
@ 2018-01-04 18:50 ` Chris Wilson
0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2018-01-04 18:50 UTC (permalink / raw)
To: Matthew Auld; +Cc: Intel Graphics Development, Matthew Auld
Quoting Matthew Auld (2018-01-04 17:20:16)
> On 4 January 2018 at 16:38, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > In some iommu, e.g. swiotlb, the available space can be quite limited.
> > So we employ a trial-and-error approach to seeing if our large
> > contiguous chunks can fit, and if that fails we try again with smaller
> > chunks after trying to free our own lazily allocated blobs. As we use a
> > trial-and-error approach, we do not want dma_map_sg() to emit a WARN of
> > its own accord, we want to gracefully report the error back to the caller
> > instead.
> >
> > Note that our noisy culprit, swiotlb, doesn't honour the flag, yet.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Matthew Auld <matthew.auld@intel.com>
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Thanks, pushed the small tweak for a silent future.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-01-04 18:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-04 16:38 [PATCH] drm/i915: Pass DMA_ATTR_NO_WARN to dma_map_sg() Chris Wilson
2018-01-04 17:20 ` Matthew Auld
2018-01-04 18:50 ` Chris Wilson
2018-01-04 17:25 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-01-04 18:12 ` ✓ Fi.CI.IGT: " 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.