public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: permit zero valued dmap in for_each_sgt_dma
@ 2019-01-30 19:18 Matthew Auld
  2019-01-30 20:02 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Matthew Auld @ 2019-01-30 19:18 UTC (permalink / raw)
  To: intel-gfx

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.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index d072f3369ee1..04f102d5bbe9 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -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)
 
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: permit zero valued dmap in for_each_sgt_dma
  2019-01-30 19:18 [PATCH] drm/i915: permit zero valued dmap in for_each_sgt_dma Matthew Auld
@ 2019-01-30 20:02 ` Chris Wilson
  2019-02-11 14:39   ` Matthew Auld
  2019-01-30 20:35 ` ✓ Fi.CI.BAT: success for " Patchwork
  2019-01-31  2:56 ` ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2019-01-30 20:02 UTC (permalink / raw)
  To: Matthew Auld, intel-gfx

Quoting Matthew Auld (2019-01-30 19:18:25)
> 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: permit zero valued dmap in for_each_sgt_dma
  2019-01-30 19:18 [PATCH] drm/i915: permit zero valued dmap in for_each_sgt_dma Matthew Auld
  2019-01-30 20:02 ` Chris Wilson
@ 2019-01-30 20:35 ` Patchwork
  2019-01-31  2:56 ` ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-01-30 20:35 UTC (permalink / raw)
  To: Matthew Auld; +Cc: intel-gfx

== 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* ✓ Fi.CI.IGT: success for drm/i915: permit zero valued dmap in for_each_sgt_dma
  2019-01-30 19:18 [PATCH] drm/i915: permit zero valued dmap in for_each_sgt_dma Matthew Auld
  2019-01-30 20:02 ` Chris Wilson
  2019-01-30 20:35 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2019-01-31  2:56 ` Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-01-31  2:56 UTC (permalink / raw)
  To: Matthew Auld; +Cc: intel-gfx

== 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: permit zero valued dmap in for_each_sgt_dma
  2019-01-30 20:02 ` Chris Wilson
@ 2019-02-11 14:39   ` Matthew Auld
  2019-02-11 14:50     ` Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Matthew Auld @ 2019-02-11 14:39 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Intel Graphics Development, Matthew Auld

On Wed, 30 Jan 2019 at 20:03, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>
> Quoting Matthew Auld (2019-01-30 19:18:25)
> > 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...

>
> 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: permit zero valued dmap in for_each_sgt_dma
  2019-02-11 14:39   ` Matthew Auld
@ 2019-02-11 14:50     ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2019-02-11 14:50 UTC (permalink / raw)
  To: Matthew Auld; +Cc: Intel Graphics Development, Matthew Auld

Quoting Matthew Auld (2019-02-11 14:39:38)
> On Wed, 30 Jan 2019 at 20:03, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> >
> > Quoting Matthew Auld (2019-01-30 19:18:25)
> > > 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...
> 
> >
> > 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() {}

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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-02-11 14:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-30 19:18 [PATCH] drm/i915: permit zero valued dmap in for_each_sgt_dma Matthew Auld
2019-01-30 20:02 ` Chris Wilson
2019-02-11 14:39   ` Matthew Auld
2019-02-11 14:50     ` Chris Wilson
2019-01-30 20:35 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-01-31  2:56 ` ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox