All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Assert intel_wait and its rb_node are complimentary
@ 2018-10-12 15:15 Chris Wilson
  2018-10-12 15:55 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2018-10-12 15:15 UTC (permalink / raw)
  To: intel-gfx

For convenience, we want to interchange intel_wait/rb_node and treat a
NULL rb_node as a NULL intel_wait and vice versa. Assert that the
rb_node is at offset 0 in the intel_wait to ensure this.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/intel_breadcrumbs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
index 84bf8d827136..44f117612193 100644
--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
@@ -342,6 +342,7 @@ static bool __intel_breadcrumbs_enable_irq(struct intel_breadcrumbs *b)
 
 static inline struct intel_wait *to_wait(struct rb_node *node)
 {
+	BUILD_BUG_ON(offsetof(struct intel_wait, node));
 	return rb_entry(node, struct intel_wait, node);
 }
 
-- 
2.19.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

* ✓ Fi.CI.BAT: success for drm/i915: Assert intel_wait and its rb_node are complimentary
  2018-10-12 15:15 [PATCH] drm/i915: Assert intel_wait and its rb_node are complimentary Chris Wilson
@ 2018-10-12 15:55 ` Patchwork
  2018-10-12 19:06 ` ✓ Fi.CI.IGT: " Patchwork
  2018-10-15 12:58 ` [PATCH] " Tvrtko Ursulin
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-10-12 15:55 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Assert intel_wait and its rb_node are complimentary
URL   : https://patchwork.freedesktop.org/series/50934/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4978 -> Patchwork_10441 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/50934/revisions/1/mbox/

== Known issues ==

  Here are the changes found in Patchwork_10441 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_hangcheck:
      fi-icl-u:           NOTRUN -> INCOMPLETE (fdo#108315)

    
    ==== Possible fixes ====

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     FAIL (fdo#103167) -> PASS

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
      fi-byt-clapper:     FAIL (fdo#107362, fdo#103191) -> PASS +1

    
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#108315 https://bugs.freedesktop.org/show_bug.cgi?id=108315


== Participating hosts (44 -> 42) ==

  Additional (1): fi-icl-u 
  Missing    (3): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 


== Build changes ==

    * Linux: CI_DRM_4978 -> Patchwork_10441

  CI_DRM_4978: ca98b2681a49a1417f8157af2d94a4f2d0bd0e47 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4674: 93871c6fb3c25e5d350c9faf36ded917174214de @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10441: 3150743ddd59b29bbd7441612f91496c7b56b56c @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

3150743ddd59 drm/i915: Assert intel_wait and its rb_node are complimentary

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10441/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: Assert intel_wait and its rb_node are complimentary
  2018-10-12 15:15 [PATCH] drm/i915: Assert intel_wait and its rb_node are complimentary Chris Wilson
  2018-10-12 15:55 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-10-12 19:06 ` Patchwork
  2018-10-15 12:58 ` [PATCH] " Tvrtko Ursulin
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-10-12 19:06 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Assert intel_wait and its rb_node are complimentary
URL   : https://patchwork.freedesktop.org/series/50934/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4978_full -> Patchwork_10441_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_10441_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10441_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10441_full:

  === IGT changes ===

    ==== Warnings ====

    igt@perf_pmu@rc6:
      shard-kbl:          PASS -> SKIP

    
== Known issues ==

  Here are the changes found in Patchwork_10441_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-skl:          NOTRUN -> TIMEOUT (fdo#108039)

    igt@gem_ppgtt@blt-vs-render-ctxn:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665, fdo#106023)

    igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
      shard-skl:          NOTRUN -> DMESG-WARN (fdo#107956)

    igt@kms_chv_cursor_fail@pipe-a-64x64-right-edge:
      shard-skl:          PASS -> FAIL (fdo#104671)

    igt@kms_cursor_crc@cursor-256x256-suspend:
      shard-skl:          NOTRUN -> INCOMPLETE (fdo#104108)
      shard-apl:          PASS -> FAIL (fdo#103232, fdo#103191)

    igt@kms_cursor_crc@cursor-64x21-random:
      shard-apl:          PASS -> FAIL (fdo#103232)

    igt@kms_fbcon_fbt@fbc:
      shard-skl:          NOTRUN -> FAIL (fdo#103833, fdo#105682)

    igt@kms_fbcon_fbt@psr:
      shard-skl:          NOTRUN -> FAIL (fdo#107882)

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
      shard-apl:          PASS -> FAIL (fdo#103167)

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-gtt:
      shard-glk:          PASS -> FAIL (fdo#103167) +1

    igt@kms_frontbuffer_tracking@fbc-rgb565-draw-render:
      shard-skl:          NOTRUN -> FAIL (fdo#103167) +1

    igt@kms_frontbuffer_tracking@fbcpsr-1p-indfb-fliptrack:
      shard-skl:          NOTRUN -> FAIL (fdo#105682)

    igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-mmap-wc:
      shard-skl:          PASS -> FAIL (fdo#103167)

    igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
      shard-skl:          NOTRUN -> FAIL (fdo#108145) +1

    igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
      shard-apl:          PASS -> FAIL (fdo#103166) +3

    
    ==== Possible fixes ====

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-kbl:          INCOMPLETE (fdo#103665, fdo#106023) -> PASS

    igt@kms_cursor_crc@cursor-128x42-onscreen:
      shard-apl:          FAIL (fdo#103232) -> PASS +2

    igt@kms_cursor_crc@cursor-64x64-suspend:
      shard-apl:          FAIL (fdo#103232, fdo#103191) -> PASS

    igt@kms_cursor_legacy@cursora-vs-flipa-toggle:
      shard-glk:          DMESG-WARN (fdo#105763, fdo#106538) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
      shard-apl:          FAIL (fdo#103167) -> PASS +2

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
      shard-glk:          FAIL (fdo#103167) -> PASS

    igt@kms_plane_multiple@atomic-pipe-a-tiling-yf:
      shard-apl:          FAIL (fdo#103166) -> PASS

    igt@kms_setmode@basic:
      shard-kbl:          FAIL (fdo#99912) -> PASS

    
  fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103833 https://bugs.freedesktop.org/show_bug.cgi?id=103833
  fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
  fdo#104671 https://bugs.freedesktop.org/show_bug.cgi?id=104671
  fdo#105682 https://bugs.freedesktop.org/show_bug.cgi?id=105682
  fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
  fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
  fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
  fdo#107882 https://bugs.freedesktop.org/show_bug.cgi?id=107882
  fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
  fdo#108039 https://bugs.freedesktop.org/show_bug.cgi?id=108039
  fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (6 -> 6) ==

  No changes in participating hosts


== Build changes ==

    * Linux: CI_DRM_4978 -> Patchwork_10441

  CI_DRM_4978: ca98b2681a49a1417f8157af2d94a4f2d0bd0e47 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4674: 93871c6fb3c25e5d350c9faf36ded917174214de @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10441: 3150743ddd59b29bbd7441612f91496c7b56b56c @ 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_10441/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: Assert intel_wait and its rb_node are complimentary
  2018-10-12 15:15 [PATCH] drm/i915: Assert intel_wait and its rb_node are complimentary Chris Wilson
  2018-10-12 15:55 ` ✓ Fi.CI.BAT: success for " Patchwork
  2018-10-12 19:06 ` ✓ Fi.CI.IGT: " Patchwork
@ 2018-10-15 12:58 ` Tvrtko Ursulin
  2018-10-15 13:04   ` Chris Wilson
  2 siblings, 1 reply; 5+ messages in thread
From: Tvrtko Ursulin @ 2018-10-15 12:58 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx


On 12/10/2018 16:15, Chris Wilson wrote:
> For convenience, we want to interchange intel_wait/rb_node and treat a
> NULL rb_node as a NULL intel_wait and vice versa. Assert that the
> rb_node is at offset 0 in the intel_wait to ensure this.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_breadcrumbs.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> index 84bf8d827136..44f117612193 100644
> --- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
> +++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> @@ -342,6 +342,7 @@ static bool __intel_breadcrumbs_enable_irq(struct intel_breadcrumbs *b)
>   
>   static inline struct intel_wait *to_wait(struct rb_node *node)
>   {
> +	BUILD_BUG_ON(offsetof(struct intel_wait, node));
>   	return rb_entry(node, struct intel_wait, node);
>   }
>   
> 

I expected to see someone checking to_wait(...) for (non)-null but can't 
really spot it. Only potential candidate might be GEM_BUG_ON(b->irq_wait 
== wait) in __intel_breadrcumbs_finish, but that one could check it 
explicitly. Am I missing some?

Regards,

Tvrtko
_______________________________________________
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: Assert intel_wait and its rb_node are complimentary
  2018-10-15 12:58 ` [PATCH] " Tvrtko Ursulin
@ 2018-10-15 13:04   ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2018-10-15 13:04 UTC (permalink / raw)
  To: Tvrtko Ursulin, intel-gfx

Quoting Tvrtko Ursulin (2018-10-15 13:58:06)
> 
> On 12/10/2018 16:15, Chris Wilson wrote:
> > For convenience, we want to interchange intel_wait/rb_node and treat a
> > NULL rb_node as a NULL intel_wait and vice versa. Assert that the
> > rb_node is at offset 0 in the intel_wait to ensure this.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > ---
> >   drivers/gpu/drm/i915/intel_breadcrumbs.c | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> > index 84bf8d827136..44f117612193 100644
> > --- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
> > +++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> > @@ -342,6 +342,7 @@ static bool __intel_breadcrumbs_enable_irq(struct intel_breadcrumbs *b)
> >   
> >   static inline struct intel_wait *to_wait(struct rb_node *node)
> >   {
> > +     BUILD_BUG_ON(offsetof(struct intel_wait, node));
> >       return rb_entry(node, struct intel_wait, node);
> >   }
> >   
> > 
> 
> I expected to see someone checking to_wait(...) for (non)-null but can't 
> really spot it. Only potential candidate might be GEM_BUG_ON(b->irq_wait 
> == wait) in __intel_breadrcumbs_finish, but that one could check it 
> explicitly. Am I missing some?

It was actually chain_wakeup() that caught my eye. There we check the
rb_node is not NULL, and was thinking about whether that required that
intel_wait itself is not NULL (thinking along the lines of extracting it
from the container, but as it is returned by rb_next() there isn't
actually a dependency to worry about.)
-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-10-15 13:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-12 15:15 [PATCH] drm/i915: Assert intel_wait and its rb_node are complimentary Chris Wilson
2018-10-12 15:55 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-10-12 19:06 ` ✓ Fi.CI.IGT: " Patchwork
2018-10-15 12:58 ` [PATCH] " Tvrtko Ursulin
2018-10-15 13:04   ` Chris Wilson

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.