All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: make REG_BIT() and REG_GENMASK() work with variables
@ 2019-05-24 18:52 Jani Nikula
  2019-05-24 19:43 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jani Nikula @ 2019-05-24 18:52 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

REG_BIT() and REG_GENMASK() were intended to work with both constant
expressions and otherwise, with the former having extra compile time
checks for the bit ranges. Incredibly, the result of
__builtin_constant_p() is not an integer constant expression when given
a non-constant expression, leading to errors in BUILD_BUG_ON_ZERO().

Replace __builtin_constant_p() with the __is_constexpr() magic spell.

Reported-by: Ville Syrjala <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 49dce04dd688..019c48748dc9 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -126,7 +126,7 @@
  */
 #define REG_BIT(__n)							\
 	((u32)(BIT(__n) +						\
-	       BUILD_BUG_ON_ZERO(__builtin_constant_p(__n) &&		\
+	       BUILD_BUG_ON_ZERO(__is_constexpr(__n) &&		\
 				 ((__n) < 0 || (__n) > 31))))
 
 /**
@@ -140,8 +140,8 @@
  */
 #define REG_GENMASK(__high, __low)					\
 	((u32)(GENMASK(__high, __low) +					\
-	       BUILD_BUG_ON_ZERO(__builtin_constant_p(__high) &&	\
-				 __builtin_constant_p(__low) &&		\
+	       BUILD_BUG_ON_ZERO(__is_constexpr(__high) &&	\
+				 __is_constexpr(__low) &&		\
 				 ((__low) < 0 || (__high) > 31 || (__low) > (__high)))))
 
 /*
-- 
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] 5+ messages in thread

* Re: [PATCH] drm/i915: make REG_BIT() and REG_GENMASK() work with variables
  2019-05-24 18:52 [PATCH] drm/i915: make REG_BIT() and REG_GENMASK() work with variables Jani Nikula
@ 2019-05-24 19:43 ` Chris Wilson
  2019-05-27 10:13   ` Jani Nikula
  2019-05-26 14:47 ` ✓ Fi.CI.BAT: success for " Patchwork
  2019-05-27  8:57 ` ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2019-05-24 19:43 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Quoting Jani Nikula (2019-05-24 19:52:53)
> REG_BIT() and REG_GENMASK() were intended to work with both constant
> expressions and otherwise, with the former having extra compile time
> checks for the bit ranges. Incredibly, the result of
> __builtin_constant_p() is not an integer constant expression when given
> a non-constant expression, leading to errors in BUILD_BUG_ON_ZERO().
> 
> Replace __builtin_constant_p() with the __is_constexpr() magic spell.
> 
> Reported-by: Ville Syrjala <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_reg.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 49dce04dd688..019c48748dc9 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -126,7 +126,7 @@
>   */
>  #define REG_BIT(__n)                                                   \
>         ((u32)(BIT(__n) +                                               \
> -              BUILD_BUG_ON_ZERO(__builtin_constant_p(__n) &&           \
> +              BUILD_BUG_ON_ZERO(__is_constexpr(__n) &&         \
>                                  ((__n) < 0 || (__n) > 31))))
>  
>  /**
> @@ -140,8 +140,8 @@
>   */
>  #define REG_GENMASK(__high, __low)                                     \
>         ((u32)(GENMASK(__high, __low) +                                 \
> -              BUILD_BUG_ON_ZERO(__builtin_constant_p(__high) &&        \
> -                                __builtin_constant_p(__low) &&         \
> +              BUILD_BUG_ON_ZERO(__is_constexpr(__high) &&      \
> +                                __is_constexpr(__low) &&               \
>                                  ((__low) < 0 || (__high) > 31 || (__low) > (__high)))))

Ok, one old one remaining in _MASKED_FIELD().

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: make REG_BIT() and REG_GENMASK() work with variables
  2019-05-24 18:52 [PATCH] drm/i915: make REG_BIT() and REG_GENMASK() work with variables Jani Nikula
  2019-05-24 19:43 ` Chris Wilson
@ 2019-05-26 14:47 ` Patchwork
  2019-05-27  8:57 ` ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-05-26 14:47 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: make REG_BIT() and REG_GENMASK() work with variables
URL   : https://patchwork.freedesktop.org/series/61129/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6142 -> Patchwork_13099
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live_hangcheck:
    - fi-icl-u3:          [PASS][1] -> [INCOMPLETE][2] ([fdo#107713] / [fdo#108569])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/fi-icl-u3/igt@i915_selftest@live_hangcheck.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/fi-icl-u3/igt@i915_selftest@live_hangcheck.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-blb-e6850:       [INCOMPLETE][3] ([fdo#107718]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/fi-blb-e6850/igt@gem_exec_suspend@basic-s4-devices.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/fi-blb-e6850/igt@gem_exec_suspend@basic-s4-devices.html

  * igt@i915_selftest@live_contexts:
    - fi-bdw-gvtdvm:      [DMESG-FAIL][5] ([fdo#110235]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html

  * igt@i915_selftest@live_hangcheck:
    - fi-icl-y:           [INCOMPLETE][7] ([fdo#107713] / [fdo#108569]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/fi-icl-y/igt@i915_selftest@live_hangcheck.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/fi-icl-y/igt@i915_selftest@live_hangcheck.html

  * {igt@i915_selftest@live_vma}:
    - {fi-icl-dsi}:       [INCOMPLETE][9] ([fdo#107713]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/fi-icl-dsi/igt@i915_selftest@live_vma.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/fi-icl-dsi/igt@i915_selftest@live_vma.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][11] ([fdo#109485]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
  [fdo#110235]: https://bugs.freedesktop.org/show_bug.cgi?id=110235


Participating hosts (53 -> 46)
------------------------------

  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * Linux: CI_DRM_6142 -> Patchwork_13099

  CI_DRM_6142: a388075b2bdc3f714c11e90afb32d65e121987f3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5015: cdd6b0a7630762cec14596b9863f418b48c32f46 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_13099: 24b014d078bb51192c6458aed75c3e6823779604 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

24b014d078bb drm/i915: make REG_BIT() and REG_GENMASK() work with variables

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/
_______________________________________________
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: make REG_BIT() and REG_GENMASK() work with variables
  2019-05-24 18:52 [PATCH] drm/i915: make REG_BIT() and REG_GENMASK() work with variables Jani Nikula
  2019-05-24 19:43 ` Chris Wilson
  2019-05-26 14:47 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2019-05-27  8:57 ` Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-05-27  8:57 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: make REG_BIT() and REG_GENMASK() work with variables
URL   : https://patchwork.freedesktop.org/series/61129/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6142_full -> Patchwork_13099_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_eio@unwedge-stress:
    - shard-snb:          [PASS][1] -> [FAIL][2] ([fdo#109661])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-snb5/igt@gem_eio@unwedge-stress.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-snb1/igt@gem_eio@unwedge-stress.html

  * igt@i915_pm_rpm@cursor-dpms:
    - shard-skl:          [PASS][3] -> [INCOMPLETE][4] ([fdo#107807])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl2/igt@i915_pm_rpm@cursor-dpms.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-skl8/igt@i915_pm_rpm@cursor-dpms.html

  * igt@i915_pm_rpm@gem-execbuf:
    - shard-skl:          [PASS][5] -> [INCOMPLETE][6] ([fdo#107803] / [fdo#107807])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl1/igt@i915_pm_rpm@gem-execbuf.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-skl7/igt@i915_pm_rpm@gem-execbuf.html

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-apl:          [PASS][7] -> [DMESG-WARN][8] ([fdo#108566]) +2 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-apl7/igt@i915_suspend@fence-restore-tiled2untiled.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-apl3/igt@i915_suspend@fence-restore-tiled2untiled.html

  * igt@kms_cursor_crc@pipe-a-cursor-suspend:
    - shard-skl:          [PASS][9] -> [INCOMPLETE][10] ([fdo#110741])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl7/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-skl6/igt@kms_cursor_crc@pipe-a-cursor-suspend.html

  * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
    - shard-hsw:          [PASS][11] -> [FAIL][12] ([fdo#105767])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-hsw5/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-hsw1/igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy.html

  * igt@kms_dp_dsc@basic-dsc-enable-edp:
    - shard-iclb:         [PASS][13] -> [SKIP][14] ([fdo#109349])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb2/igt@kms_dp_dsc@basic-dsc-enable-edp.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-iclb8/igt@kms_dp_dsc@basic-dsc-enable-edp.html

  * igt@kms_flip@2x-plain-flip:
    - shard-hsw:          [PASS][15] -> [SKIP][16] ([fdo#109271]) +8 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-hsw6/igt@kms_flip@2x-plain-flip.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-hsw1/igt@kms_flip@2x-plain-flip.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible:
    - shard-skl:          [PASS][17] -> [FAIL][18] ([fdo#105363])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl8/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-skl10/igt@kms_flip@flip-vs-expired-vblank-interruptible.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
    - shard-iclb:         [PASS][19] -> [FAIL][20] ([fdo#103167]) +4 similar issues
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render.html

  * igt@kms_plane_lowres@pipe-a-tiling-x:
    - shard-iclb:         [PASS][21] -> [FAIL][22] ([fdo#103166])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb6/igt@kms_plane_lowres@pipe-a-tiling-x.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-iclb6/igt@kms_plane_lowres@pipe-a-tiling-x.html

  * igt@kms_psr2_su@frontbuffer:
    - shard-iclb:         [PASS][23] -> [SKIP][24] ([fdo#109642])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb2/igt@kms_psr2_su@frontbuffer.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-iclb8/igt@kms_psr2_su@frontbuffer.html

  * igt@kms_psr@psr2_cursor_mmap_cpu:
    - shard-iclb:         [PASS][25] -> [SKIP][26] ([fdo#109441]) +2 similar issues
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-iclb3/igt@kms_psr@psr2_cursor_mmap_cpu.html

  * igt@kms_sysfs_edid_timing:
    - shard-iclb:         [PASS][27] -> [FAIL][28] ([fdo#100047])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb1/igt@kms_sysfs_edid_timing.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-iclb3/igt@kms_sysfs_edid_timing.html
    - shard-hsw:          [PASS][29] -> [FAIL][30] ([fdo#100047])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-hsw6/igt@kms_sysfs_edid_timing.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-hsw1/igt@kms_sysfs_edid_timing.html

  * igt@kms_vblank@pipe-a-ts-continuation-suspend:
    - shard-skl:          [PASS][31] -> [INCOMPLETE][32] ([fdo#104108])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl3/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-skl1/igt@kms_vblank@pipe-a-ts-continuation-suspend.html

  * igt@prime_busy@wait-hang-blt:
    - shard-iclb:         [PASS][33] -> [INCOMPLETE][34] ([fdo#107713])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb7/igt@prime_busy@wait-hang-blt.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-iclb7/igt@prime_busy@wait-hang-blt.html

  
#### Possible fixes ####

  * igt@gem_ctx_isolation@vecs0-s3:
    - shard-apl:          [DMESG-WARN][35] ([fdo#108566]) -> [PASS][36] +5 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-apl4/igt@gem_ctx_isolation@vecs0-s3.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-apl4/igt@gem_ctx_isolation@vecs0-s3.html

  * igt@gem_exec_schedule@preemptive-hang-render:
    - shard-glk:          [INCOMPLETE][37] ([fdo#103359] / [k.org#198133]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-glk7/igt@gem_exec_schedule@preemptive-hang-render.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-glk8/igt@gem_exec_schedule@preemptive-hang-render.html

  * igt@gem_tiled_swapping@non-threaded:
    - shard-apl:          [DMESG-WARN][39] ([fdo#108686]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-apl8/igt@gem_tiled_swapping@non-threaded.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-apl1/igt@gem_tiled_swapping@non-threaded.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-kbl:          [DMESG-WARN][41] ([fdo#108566]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-kbl1/igt@gem_workarounds@suspend-resume-context.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-kbl3/igt@gem_workarounds@suspend-resume-context.html

  * igt@i915_pm_rpm@system-suspend:
    - shard-skl:          [INCOMPLETE][43] ([fdo#104108] / [fdo#107807]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl2/igt@i915_pm_rpm@system-suspend.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-skl2/igt@i915_pm_rpm@system-suspend.html

  * igt@i915_pm_rpm@system-suspend-devices:
    - shard-skl:          [INCOMPLETE][45] ([fdo#107807]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl5/igt@i915_pm_rpm@system-suspend-devices.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-skl4/igt@i915_pm_rpm@system-suspend-devices.html

  * igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy:
    - shard-glk:          [FAIL][47] ([fdo#104873]) -> [PASS][48]
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-glk2/igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-glk2/igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy.html

  * igt@kms_flip@flip-vs-suspend:
    - shard-hsw:          [INCOMPLETE][49] ([fdo#103540]) -> [PASS][50]
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-hsw6/igt@kms_flip@flip-vs-suspend.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-hsw6/igt@kms_flip@flip-vs-suspend.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-skl:          [INCOMPLETE][51] ([fdo#109507]) -> [PASS][52]
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl7/igt@kms_flip@flip-vs-suspend-interruptible.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-skl6/igt@kms_flip@flip-vs-suspend-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt:
    - shard-iclb:         [FAIL][53] ([fdo#103167]) -> [PASS][54] +6 similar issues
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-msflip-blt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-onoff:
    - shard-skl:          [FAIL][55] ([fdo#103167]) -> [PASS][56]
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-onoff.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-skl9/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-onoff.html

  * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-pwrite:
    - shard-skl:          [FAIL][57] ([fdo#103167] / [fdo#110379]) -> [PASS][58]
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl4/igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-pwrite.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-skl9/igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-pwrite.html

  * igt@kms_psr@psr2_primary_mmap_cpu:
    - shard-iclb:         [SKIP][59] ([fdo#109441]) -> [PASS][60]
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb5/igt@kms_psr@psr2_primary_mmap_cpu.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html

  * igt@kms_setmode@basic:
    - shard-skl:          [FAIL][61] ([fdo#99912]) -> [PASS][62]
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl8/igt@kms_setmode@basic.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-skl2/igt@kms_setmode@basic.html
    - shard-kbl:          [FAIL][63] ([fdo#99912]) -> [PASS][64]
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-kbl2/igt@kms_setmode@basic.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-kbl2/igt@kms_setmode@basic.html

  
#### Warnings ####

  * igt@gem_mmap_gtt@forked-big-copy-xy:
    - shard-iclb:         [TIMEOUT][65] ([fdo#109673]) -> [INCOMPLETE][66] ([fdo#107713] / [fdo#109100])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-iclb5/igt@gem_mmap_gtt@forked-big-copy-xy.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-iclb2/igt@gem_mmap_gtt@forked-big-copy-xy.html

  * igt@i915_pm_rpm@pc8-residency:
    - shard-skl:          [INCOMPLETE][67] ([fdo#107807]) -> [SKIP][68] ([fdo#109271])
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl9/igt@i915_pm_rpm@pc8-residency.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-skl1/igt@i915_pm_rpm@pc8-residency.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-onoff:
    - shard-skl:          [FAIL][69] ([fdo#108040]) -> [FAIL][70] ([fdo#103167]) +1 similar issue
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6142/shard-skl4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-onoff.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13099/shard-skl8/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-onoff.html

  
  [fdo#100047]: https://bugs.freedesktop.org/show_bug.cgi?id=100047
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107803]: https://bugs.freedesktop.org/show_bug.cgi?id=107803
  [fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
  [fdo#108040]: https://bugs.freedesktop.org/show_bug.cgi?id=108040
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661
  [fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
  [fdo#110379]: https://bugs.freedesktop.org/show_bug.cgi?id=110379
  [fdo#110741]: https://bugs.freedesktop.org/show_bug.cgi?id=110741
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts


Build changes
-------------

  * Linux: CI_DRM_6142 -> Patchwork_13099

  CI_DRM_6142: a388075b2bdc3f714c11e90afb32d65e121987f3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5015: cdd6b0a7630762cec14596b9863f418b48c32f46 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_13099: 24b014d078bb51192c6458aed75c3e6823779604 @ 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_13099/
_______________________________________________
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: make REG_BIT() and REG_GENMASK() work with variables
  2019-05-24 19:43 ` Chris Wilson
@ 2019-05-27 10:13   ` Jani Nikula
  0 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2019-05-27 10:13 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On Fri, 24 May 2019, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Jani Nikula (2019-05-24 19:52:53)
>> REG_BIT() and REG_GENMASK() were intended to work with both constant
>> expressions and otherwise, with the former having extra compile time
>> checks for the bit ranges. Incredibly, the result of
>> __builtin_constant_p() is not an integer constant expression when given
>> a non-constant expression, leading to errors in BUILD_BUG_ON_ZERO().
>> 
>> Replace __builtin_constant_p() with the __is_constexpr() magic spell.
>> 
>> Reported-by: Ville Syrjala <ville.syrjala@linux.intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  drivers/gpu/drm/i915/i915_reg.h | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
>> index 49dce04dd688..019c48748dc9 100644
>> --- a/drivers/gpu/drm/i915/i915_reg.h
>> +++ b/drivers/gpu/drm/i915/i915_reg.h
>> @@ -126,7 +126,7 @@
>>   */
>>  #define REG_BIT(__n)                                                   \
>>         ((u32)(BIT(__n) +                                               \
>> -              BUILD_BUG_ON_ZERO(__builtin_constant_p(__n) &&           \
>> +              BUILD_BUG_ON_ZERO(__is_constexpr(__n) &&         \
>>                                  ((__n) < 0 || (__n) > 31))))
>>  
>>  /**
>> @@ -140,8 +140,8 @@
>>   */
>>  #define REG_GENMASK(__high, __low)                                     \
>>         ((u32)(GENMASK(__high, __low) +                                 \
>> -              BUILD_BUG_ON_ZERO(__builtin_constant_p(__high) &&        \
>> -                                __builtin_constant_p(__low) &&         \
>> +              BUILD_BUG_ON_ZERO(__is_constexpr(__high) &&      \
>> +                                __is_constexpr(__low) &&               \
>>                                  ((__low) < 0 || (__high) > 31 || (__low) > (__high)))))
>
> Ok, one old one remaining in _MASKED_FIELD().
>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Thanks, pushed to dinq.

BR,
Jani.


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

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
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:[~2019-05-27 10:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 18:52 [PATCH] drm/i915: make REG_BIT() and REG_GENMASK() work with variables Jani Nikula
2019-05-24 19:43 ` Chris Wilson
2019-05-27 10:13   ` Jani Nikula
2019-05-26 14:47 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-05-27  8:57 ` ✓ 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.