All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix gtt_view asserts
@ 2018-08-28 13:37 Ville Syrjala
  2018-08-28 13:46 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ville Syrjala @ 2018-08-28 13:37 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

gcc is too smart for us and doesn't evaluate BUILD_BUG_ON()s in
unused static inlines. Collect them up in one static inline and
actually call it to make sure gcc sees it.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem_gtt.h | 15 ++++-----------
 drivers/gpu/drm/i915/i915_vma.h     |  2 ++
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
index dd161c187a68..01d83a943142 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.h
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
@@ -167,29 +167,22 @@ struct intel_rotation_info {
 	} plane[2];
 } __packed;
 
-static inline void assert_intel_rotation_info_is_packed(void)
-{
-	BUILD_BUG_ON(sizeof(struct intel_rotation_info) != 8*sizeof(unsigned int));
-}
-
 struct intel_partial_info {
 	u64 offset;
 	unsigned int size;
 } __packed;
 
-static inline void assert_intel_partial_info_is_packed(void)
-{
-	BUILD_BUG_ON(sizeof(struct intel_partial_info) != sizeof(u64) + sizeof(unsigned int));
-}
-
 enum i915_ggtt_view_type {
 	I915_GGTT_VIEW_NORMAL = 0,
 	I915_GGTT_VIEW_ROTATED = sizeof(struct intel_rotation_info),
 	I915_GGTT_VIEW_PARTIAL = sizeof(struct intel_partial_info),
 };
 
-static inline void assert_i915_ggtt_view_type_is_unique(void)
+static inline void assert_i915_gem_gtt_types(void)
 {
+	BUILD_BUG_ON(sizeof(struct intel_rotation_info) != 8*sizeof(unsigned int));
+	BUILD_BUG_ON(sizeof(struct intel_partial_info) != sizeof(u64) + sizeof(unsigned int));
+
 	/* As we encode the size of each branch inside the union into its type,
 	 * we have to be careful that each branch has a unique size.
 	 */
diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h
index f1ba40bbe6f9..4f7c1c7599f4 100644
--- a/drivers/gpu/drm/i915/i915_vma.h
+++ b/drivers/gpu/drm/i915/i915_vma.h
@@ -251,6 +251,8 @@ i915_vma_compare(struct i915_vma *vma,
 	if (cmp)
 		return cmp;
 
+	assert_i915_gem_gtt_types();
+
 	/* ggtt_view.type also encodes its size so that we both distinguish
 	 * different views using it as a "type" and also use a compact (no
 	 * accessing of uninitialised padding bytes) memcmp without storing
-- 
2.16.4

_______________________________________________
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.CHECKPATCH: warning for drm/i915: Fix gtt_view asserts
  2018-08-28 13:37 [PATCH] drm/i915: Fix gtt_view asserts Ville Syrjala
@ 2018-08-28 13:46 ` Patchwork
  2018-08-28 13:48 ` [PATCH] " Chris Wilson
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-08-28 13:46 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Fix gtt_view asserts
URL   : https://patchwork.freedesktop.org/series/48801/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
4ae3a32128f9 drm/i915: Fix gtt_view asserts
-:49: CHECK:SPACING: spaces preferred around that '*' (ctx:VxV)
#49: FILE: drivers/gpu/drm/i915/i915_gem_gtt.h:183:
+	BUILD_BUG_ON(sizeof(struct intel_rotation_info) != 8*sizeof(unsigned int));
 	                                                    ^

total: 0 errors, 0 warnings, 1 checks, 41 lines checked

_______________________________________________
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: Fix gtt_view asserts
  2018-08-28 13:37 [PATCH] drm/i915: Fix gtt_view asserts Ville Syrjala
  2018-08-28 13:46 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2018-08-28 13:48 ` Chris Wilson
  2018-08-28 14:14 ` ✓ Fi.CI.BAT: success for " Patchwork
  2018-08-28 15:23 ` ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2018-08-28 13:48 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx

Quoting Ville Syrjala (2018-08-28 14:37:23)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> gcc is too smart for us and doesn't evaluate BUILD_BUG_ON()s in
> unused static inlines. Collect them up in one static inline and
> actually call it to make sure gcc sees it.
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-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

* ✓ Fi.CI.BAT: success for drm/i915: Fix gtt_view asserts
  2018-08-28 13:37 [PATCH] drm/i915: Fix gtt_view asserts Ville Syrjala
  2018-08-28 13:46 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
  2018-08-28 13:48 ` [PATCH] " Chris Wilson
@ 2018-08-28 14:14 ` Patchwork
  2018-08-28 15:23 ` ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-08-28 14:14 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Fix gtt_view asserts
URL   : https://patchwork.freedesktop.org/series/48801/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4715 -> Patchwork_10029 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_hangcheck:
      fi-kbl-7500u:       PASS -> DMESG-FAIL (fdo#106947, fdo#106560)

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

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       NOTRUN -> INCOMPLETE (fdo#103713)

    
    ==== Possible fixes ====

    igt@debugfs_test@read_all_entries:
      fi-snb-2520m:       INCOMPLETE (fdo#103713) -> PASS

    {igt@kms_psr@primary_page_flip}:
      fi-cnl-psr:         FAIL (fdo#107336) -> 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#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
  fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
  fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336


== Participating hosts (53 -> 48) ==

  Additional (1): fi-bxt-dsi 
  Missing    (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-gdg-551 


== Build changes ==

    * Linux: CI_DRM_4715 -> Patchwork_10029

  CI_DRM_4715: 1b73a69651beab39192502181c83e77a1022014a @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4610: c40743d3fce5055682d31610519758dd7379c0f8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10029: 4ae3a32128f91272703b5279f9e41f7b3cac953d @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

4ae3a32128f9 drm/i915: Fix gtt_view asserts

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10029/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: Fix gtt_view asserts
  2018-08-28 13:37 [PATCH] drm/i915: Fix gtt_view asserts Ville Syrjala
                   ` (2 preceding siblings ...)
  2018-08-28 14:14 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-08-28 15:23 ` Patchwork
  3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2018-08-28 15:23 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Fix gtt_view asserts
URL   : https://patchwork.freedesktop.org/series/48801/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4715_full -> Patchwork_10029_full =

== Summary - SUCCESS ==

  No regressions found.

  

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

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

    
    ==== Possible fixes ====

    igt@drv_suspend@debugfs-reader:
      shard-apl:          INCOMPLETE (fdo#103927) -> PASS

    igt@drv_suspend@shrink:
      shard-kbl:          INCOMPLETE (fdo#103665, fdo#106886) -> PASS

    igt@gem_ctx_isolation@vcs0-s3:
      shard-kbl:          INCOMPLETE (fdo#107556, fdo#103665) -> PASS

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

    
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
  fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * Linux: CI_DRM_4715 -> Patchwork_10029

  CI_DRM_4715: 1b73a69651beab39192502181c83e77a1022014a @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4610: c40743d3fce5055682d31610519758dd7379c0f8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10029: 4ae3a32128f91272703b5279f9e41f7b3cac953d @ 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_10029/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

end of thread, other threads:[~2018-08-28 15:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-28 13:37 [PATCH] drm/i915: Fix gtt_view asserts Ville Syrjala
2018-08-28 13:46 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-08-28 13:48 ` [PATCH] " Chris Wilson
2018-08-28 14:14 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-08-28 15:23 ` ✓ 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.