drm/i915: permit zero valued dmap in for_each_sgt_dma
Subsystems (2)
PATCH 1/1 drm/i915: permit zero valued dmap in for_each_sgt_dma
Break on NULL iter.sgp, rather than dmap == 0, on the off chance that we have some hypothetical selftest or similar in the future that considers dmap = 0 to be perfectly valid.
--- drivers/gpu/drm/i915/i915_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -2181,7 +2181,7 @@ static inline struct scatterlist *__sg_next(struct scatterlist *sg)*/ #define for_each_sgt_dma (__dmap, __iter, __sgt) \ for ((__iter) = __sgt_iter((__sgt)->sgl, true); \ - ((__dmap) = (__iter).dma + (__iter).curr); \ + ((__dmap) = (__iter).dma + (__iter).curr), (__iter).sgp; \ (((__iter).curr += I915_GTT_PAGE_SIZE) >= (__iter).max) ? \ (__iter) = __sgt_iter(__sg_next((__iter).sgp), true), 0 : 0)
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Matthew Auld (2019-01-30 19:18:25)
Quoted 3 lines
Break on NULL iter.sgp, rather than dmap == 0, on the off chance that we have some hypothetical selftest or similar in the future that considers dmap = 0 to be perfectly valid.
0 == DMA_MAPPING_ERROR
It wouldn't be a dma iterator at that point.
for_each_sgt_device_addr, _daddr?
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 7 lines · Chris Wilson
Quoting Matthew Auld (2019-01-30 19:18:25)
Quoted 3 lines
Break on NULL iter.sgp, rather than dmap == 0, on the off chance that we have some hypothetical selftest or similar in the future that considers dmap = 0 to be perfectly valid.
0 ==
DMA_MAPPING_ERROR
Ah, I have DMA_MAPPING_ERROR (~(dma_addr_t)0), and I guess zero is also invalid...
Quoted 4 lines
It wouldn't be a dma iterator at that point.
for_each_sgt_device_addr,_daddr?
Do you mean just rename it to say for_each_sgt_device_addr, or introduce a new helper with that name?
So say in ggtt_insert_entries:
if (something)
for_each_sgt_device_addr() {}
else
for_each_sgt_dma() {}?
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Matthew Auld (2019-02-11 14:39:38)
Quoted 20 lines · Chris Wilson
Quoted 7 lines
Quoting Matthew Auld (2019-01-30 19:18:25)
Quoted 3 lines
Break on NULL iter.sgp, rather than dmap == 0, on the off chance that we have some hypothetical selftest or similar in the future that considers dmap = 0 to be perfectly valid.
0 ==
DMA_MAPPING_ERRORAh, I have
DMA_MAPPING_ERROR(~(dma_addr_t)0), and I guess zero is also invalid...Quoted 4 lines
It wouldn't be a dma iterator at that point.
for_each_sgt_device_addr,_daddr?Do you mean just rename it to say
for_each_sgt_device_addr, or introduce a new helper with that name?
Quoted 6 lines
So say in
ggtt_insert_entries:if (something)
for_each_sgt_device_addr() {} else for_each_sgt_dma() {}
If our vfuncs naturally split down into different semantics then keeping both around can prove useful. If not, let's just call it device_addr and move on.
I hope it's the former, as we may need to review some contention over dma-mapping apis and so knowing what semantics apply will be useful. (Perhaps an alternative would be to start ring-fencing x86-only code so that we have some excuse to our abuses.)
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: permit zero valued dmap in for_each_sgt_dma
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: drm/i915: permit zero valued dmap in for_each_sgt_dma
URL : https://patchwork.freedesktop.org/series/56006/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5512 -> Patchwork_12097
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/56006/revisions/1/mbox/
Known issues
------------
Here are the changes found in Patchwork_12097 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_module_load@reload:
- fi-blb-e6850: NOTRUN -> INCOMPLETE [fdo#107718]
* igt@kms_busy@basic-flip-a:
- fi-gdg-551: NOTRUN -> FAIL [fdo#103182]
* igt@kms_flip@basic-flip-vs-modeset:
- fi-skl-6700hq: PASS -> DMESG-WARN [fdo#105998]
#### Possible fixes ####
* igt@i915_selftest@live_execlists:
- fi-apl-guc: INCOMPLETE [fdo#103927] -> PASS
* igt@kms_frontbuffer_tracking@basic:
- {fi-icl-u2}: FAIL [fdo#103167] -> PASS
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#105998]: https://bugs.freedesktop.org/show_bug.cgi?id=105998
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
Participating hosts (42 -> 38)
------------------------------
Additional (1): fi-gdg-551
Missing (5): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-icl-y
Build changes
-------------
* Linux: CI_DRM_5512 -> Patchwork_12097
CI_DRM_5512: bf1da2552de642ebce4ea3f91a3259ef819b13ce @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4801: 6f6bacf12759fb319ade3ba37861ae711f8a5cd9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12097: 5ec03297993445d429769a94baaaed83167173a7 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
5ec032979934 drm/i915: permit zero valued dmap in for_each_sgt_dma
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12097/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915: permit zero valued dmap in for_each_sgt_dma
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: drm/i915: permit zero valued dmap in for_each_sgt_dma
URL : https://patchwork.freedesktop.org/series/56006/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5512_full -> Patchwork_12097_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_12097_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_softpin@noreloc-s3:
- shard-apl: PASS -> INCOMPLETE [fdo#103927]
* igt@kms_color@pipe-a-legacy-gamma:
- shard-apl: PASS -> FAIL [fdo#104782] / [fdo#108145]
* igt@kms_cursor_crc@cursor-128x42-random:
- shard-hsw: PASS -> INCOMPLETE [fdo#103540]
* igt@kms_cursor_crc@cursor-256x85-random:
- shard-apl: PASS -> FAIL [fdo#103232] +1
* igt@kms_cursor_crc@cursor-64x64-random:
- shard-glk: PASS -> FAIL [fdo#103232]
* igt@kms_cursor_legacy@2x-long-nonblocking-modeset-vs-cursor-atomic:
- shard-glk: PASS -> FAIL [fdo#105454] / [fdo#106509]
* igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
- shard-apl: PASS -> FAIL [fdo#103166] +1
#### Possible fixes ####
* igt@gem_eio@reset-stress:
- shard-hsw: INCOMPLETE [fdo#103540] / [fdo#109482] -> PASS
* igt@kms_busy@extended-modeset-hang-newfb-render-b:
- shard-kbl: DMESG-WARN [fdo#107956] -> PASS
* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
- shard-apl: DMESG-WARN [fdo#107956] -> PASS
* igt@kms_color@pipe-a-degamma:
- shard-apl: FAIL [fdo#104782] / [fdo#108145] -> PASS
* igt@kms_flip@2x-flip-vs-modeset:
- shard-hsw: DMESG-WARN [fdo#102614] -> PASS
* igt@kms_flip@flip-vs-expired-vblank:
- shard-kbl: FAIL [fdo#102887] / [fdo#105363] -> PASS
* igt@kms_plane@pixel-format-pipe-a-planes:
- shard-apl: FAIL [fdo#103166] -> PASS +1
* igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
- shard-glk: FAIL [fdo#108145] -> PASS
* igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
- shard-glk: FAIL [fdo#103166] -> PASS
* igt@kms_setmode@basic:
- shard-hsw: FAIL [fdo#99912] -> PASS
* igt@pm_rc6_residency@rc6-accuracy:
- shard-kbl: {SKIP} [fdo#109271] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105454]: https://bugs.freedesktop.org/show_bug.cgi?id=105454
[fdo#106509]: https://bugs.freedesktop.org/show_bug.cgi?id=106509
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109482]: https://bugs.freedesktop.org/show_bug.cgi?id=109482
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (7 -> 5)
------------------------------
Missing (2): shard-skl shard-iclb
Build changes
-------------
* Linux: CI_DRM_5512 -> Patchwork_12097
CI_DRM_5512: bf1da2552de642ebce4ea3f91a3259ef819b13ce @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4801: 6f6bacf12759fb319ade3ba37861ae711f8a5cd9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12097: 5ec03297993445d429769a94baaaed83167173a7 @ 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_12097/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx