All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: use appropriate integer types for flags
@ 2018-11-14 12:08 Lionel Landwerlin
  2018-11-14 12:41 ` Chris Wilson
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Lionel Landwerlin @ 2018-11-14 12:08 UTC (permalink / raw)
  To: intel-gfx

We've been dealing a number of 32/64 bits flags issues lately :

 - 085603287452fc ("drm/i915: Compare user's 64b GTT offset even on 32b")
 - c58281056a8b26 ("drm/i915: Mark up GTT sizes as u64")
 - 83b466b1dc5f0b ("drm/i915: Mark pin flags as u64")

As userspace and in particular Mesa pulls in the uAPI headers and
builds up flags using the uAPI defines we should probably make those
more explicitly 32/64bits aware.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 include/uapi/drm/i915_drm.h | 90 ++++++++++++++++++-------------------
 1 file changed, 45 insertions(+), 45 deletions(-)

diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index e477ef8c644e..f562c4239bd8 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -895,12 +895,12 @@ struct drm_i915_gem_exec_object2 {
 	 */
 	__u64 offset;
 
-#define EXEC_OBJECT_NEEDS_FENCE		 (1<<0)
-#define EXEC_OBJECT_NEEDS_GTT		 (1<<1)
-#define EXEC_OBJECT_WRITE		 (1<<2)
-#define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1<<3)
-#define EXEC_OBJECT_PINNED		 (1<<4)
-#define EXEC_OBJECT_PAD_TO_SIZE		 (1<<5)
+#define EXEC_OBJECT_NEEDS_FENCE		 (1ULL<<0)
+#define EXEC_OBJECT_NEEDS_GTT		 (1ULL<<1)
+#define EXEC_OBJECT_WRITE		 (1ULL<<2)
+#define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1ULL<<3)
+#define EXEC_OBJECT_PINNED		 (1ULL<<4)
+#define EXEC_OBJECT_PAD_TO_SIZE		 (1ULL<<5)
 /* The kernel implicitly tracks GPU activity on all GEM objects, and
  * synchronises operations with outstanding rendering. This includes
  * rendering on other devices if exported via dma-buf. However, sometimes
@@ -921,14 +921,14 @@ struct drm_i915_gem_exec_object2 {
  * explicit tracking to avoid rendering corruption. See, for example,
  * I915_PARAM_HAS_EXEC_FENCE to order execbufs and execute them asynchronously.
  */
-#define EXEC_OBJECT_ASYNC		(1<<6)
+#define EXEC_OBJECT_ASYNC		(1ULL<<6)
 /* Request that the contents of this execobject be copied into the error
  * state upon a GPU hang involving this batch for post-mortem debugging.
  * These buffers are recorded in no particular order as "user" in
  * /sys/class/drm/cardN/error. Query I915_PARAM_HAS_EXEC_CAPTURE to see
  * if the kernel supports this flag.
  */
-#define EXEC_OBJECT_CAPTURE		(1<<7)
+#define EXEC_OBJECT_CAPTURE		(1ULL<<7)
 /* All remaining bits are MBZ and RESERVED FOR FUTURE USE */
 #define __EXEC_OBJECT_UNKNOWN_FLAGS -(EXEC_OBJECT_CAPTURE<<1)
 	__u64 flags;
@@ -946,8 +946,8 @@ struct drm_i915_gem_exec_fence {
 	 */
 	__u32 handle;
 
-#define I915_EXEC_FENCE_WAIT            (1<<0)
-#define I915_EXEC_FENCE_SIGNAL          (1<<1)
+#define I915_EXEC_FENCE_WAIT            (1UL<<0)
+#define I915_EXEC_FENCE_SIGNAL          (1UL<<1)
 #define __I915_EXEC_FENCE_UNKNOWN_FLAGS (-(I915_EXEC_FENCE_SIGNAL << 1))
 	__u32 flags;
 };
@@ -972,12 +972,12 @@ struct drm_i915_gem_execbuffer2 {
 	 * struct drm_i915_gem_exec_fence *fences.
 	 */
 	__u64 cliprects_ptr;
-#define I915_EXEC_RING_MASK              (7<<0)
-#define I915_EXEC_DEFAULT                (0<<0)
-#define I915_EXEC_RENDER                 (1<<0)
-#define I915_EXEC_BSD                    (2<<0)
-#define I915_EXEC_BLT                    (3<<0)
-#define I915_EXEC_VEBOX                  (4<<0)
+#define I915_EXEC_RING_MASK              (7ULL<<0)
+#define I915_EXEC_DEFAULT                (0ULL<<0)
+#define I915_EXEC_RENDER                 (1ULL<<0)
+#define I915_EXEC_BSD                    (2ULL<<0)
+#define I915_EXEC_BLT                    (3ULL<<0)
+#define I915_EXEC_VEBOX                  (4ULL<<0)
 
 /* Used for switching the constants addressing mode on gen4+ RENDER ring.
  * Gen6+ only supports relative addressing to dynamic state (default) and
@@ -985,22 +985,22 @@ struct drm_i915_gem_execbuffer2 {
  *
  * These flags are ignored for the BSD and BLT rings.
  */
-#define I915_EXEC_CONSTANTS_MASK 	(3<<6)
-#define I915_EXEC_CONSTANTS_REL_GENERAL (0<<6) /* default */
-#define I915_EXEC_CONSTANTS_ABSOLUTE 	(1<<6)
-#define I915_EXEC_CONSTANTS_REL_SURFACE (2<<6) /* gen4/5 only */
+#define I915_EXEC_CONSTANTS_MASK 	(3ULL<<6)
+#define I915_EXEC_CONSTANTS_REL_GENERAL (0ULL<<6) /* default */
+#define I915_EXEC_CONSTANTS_ABSOLUTE 	(1ULL<<6)
+#define I915_EXEC_CONSTANTS_REL_SURFACE (2ULL<<6) /* gen4/5 only */
 	__u64 flags;
 	__u64 rsvd1; /* now used for context info */
 	__u64 rsvd2;
 };
 
 /** Resets the SO write offset registers for transform feedback on gen7. */
-#define I915_EXEC_GEN7_SOL_RESET	(1<<8)
+#define I915_EXEC_GEN7_SOL_RESET	(1ULL<<8)
 
 /** Request a privileged ("secure") batch buffer. Note only available for
  * DRM_ROOT_ONLY | DRM_MASTER processes.
  */
-#define I915_EXEC_SECURE		(1<<9)
+#define I915_EXEC_SECURE		(1ULL<<9)
 
 /** Inform the kernel that the batch is and will always be pinned. This
  * negates the requirement for a workaround to be performed to avoid
@@ -1009,32 +1009,32 @@ struct drm_i915_gem_execbuffer2 {
  * coherent with the CS before execution. If this flag is passed,
  * userspace assumes the responsibility for ensuring the same.
  */
-#define I915_EXEC_IS_PINNED		(1<<10)
+#define I915_EXEC_IS_PINNED		(1ULL<<10)
 
 /** Provide a hint to the kernel that the command stream and auxiliary
  * state buffers already holds the correct presumed addresses and so the
  * relocation process may be skipped if no buffers need to be moved in
  * preparation for the execbuffer.
  */
-#define I915_EXEC_NO_RELOC		(1<<11)
+#define I915_EXEC_NO_RELOC		(1ULL<<11)
 
 /** Use the reloc.handle as an index into the exec object array rather
  * than as the per-file handle.
  */
-#define I915_EXEC_HANDLE_LUT		(1<<12)
+#define I915_EXEC_HANDLE_LUT		(1ULL<<12)
 
 /** Used for switching BSD rings on the platforms with two BSD rings */
 #define I915_EXEC_BSD_SHIFT	 (13)
-#define I915_EXEC_BSD_MASK	 (3 << I915_EXEC_BSD_SHIFT)
+#define I915_EXEC_BSD_MASK	 (3ULL << I915_EXEC_BSD_SHIFT)
 /* default ping-pong mode */
-#define I915_EXEC_BSD_DEFAULT	 (0 << I915_EXEC_BSD_SHIFT)
-#define I915_EXEC_BSD_RING1	 (1 << I915_EXEC_BSD_SHIFT)
-#define I915_EXEC_BSD_RING2	 (2 << I915_EXEC_BSD_SHIFT)
+#define I915_EXEC_BSD_DEFAULT	 (0ULL << I915_EXEC_BSD_SHIFT)
+#define I915_EXEC_BSD_RING1	 (1ULL << I915_EXEC_BSD_SHIFT)
+#define I915_EXEC_BSD_RING2	 (2ULL << I915_EXEC_BSD_SHIFT)
 
 /** Tell the kernel that the batchbuffer is processed by
  *  the resource streamer.
  */
-#define I915_EXEC_RESOURCE_STREAMER     (1<<15)
+#define I915_EXEC_RESOURCE_STREAMER     (1ULL<<15)
 
 /* Setting I915_EXEC_FENCE_IN implies that lower_32_bits(rsvd2) represent
  * a sync_file fd to wait upon (in a nonblocking manner) prior to executing
@@ -1042,7 +1042,7 @@ struct drm_i915_gem_execbuffer2 {
  *
  * Returns -EINVAL if the sync_file fd cannot be found.
  */
-#define I915_EXEC_FENCE_IN		(1<<16)
+#define I915_EXEC_FENCE_IN		(1ULL<<16)
 
 /* Setting I915_EXEC_FENCE_OUT causes the ioctl to return a sync_file fd
  * in the upper_32_bits(rsvd2) upon success. Ownership of the fd is given
@@ -1059,7 +1059,7 @@ struct drm_i915_gem_execbuffer2 {
  * back to userspace. Failure to do so will cause the out-fence to always
  * be reported as zero, and the real fence fd to be leaked.
  */
-#define I915_EXEC_FENCE_OUT		(1<<17)
+#define I915_EXEC_FENCE_OUT		(1ULL<<17)
 
 /*
  * Traditionally the execbuf ioctl has only considered the final element in
@@ -1070,13 +1070,13 @@ struct drm_i915_gem_execbuffer2 {
  * execobject[] as the * batch instead (the default is to use the last
  * element).
  */
-#define I915_EXEC_BATCH_FIRST		(1<<18)
+#define I915_EXEC_BATCH_FIRST		(1ULL<<18)
 
 /* Setting I915_FENCE_ARRAY implies that num_cliprects and cliprects_ptr
  * define an array of i915_gem_exec_fence structures which specify a set of
  * dma fences to wait upon or signal.
  */
-#define I915_EXEC_FENCE_ARRAY   (1<<19)
+#define I915_EXEC_FENCE_ARRAY   (1ULL<<19)
 
 #define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_FENCE_ARRAY<<1))
 
@@ -1352,9 +1352,9 @@ struct drm_intel_overlay_put_image {
 };
 
 /* flags */
-#define I915_OVERLAY_UPDATE_ATTRS	(1<<0)
-#define I915_OVERLAY_UPDATE_GAMMA	(1<<1)
-#define I915_OVERLAY_DISABLE_DEST_COLORKEY	(1<<2)
+#define I915_OVERLAY_UPDATE_ATTRS	(1UL<<0)
+#define I915_OVERLAY_UPDATE_GAMMA	(1UL<<1)
+#define I915_OVERLAY_DISABLE_DEST_COLORKEY	(1UL<<2)
 struct drm_intel_overlay_attrs {
 	__u32 flags;
 	__u32 color_key;
@@ -1390,11 +1390,11 @@ struct drm_intel_overlay_attrs {
  * active on a given plane.
  */
 
-#define I915_SET_COLORKEY_NONE		(1<<0) /* Deprecated. Instead set
-						* flags==0 to disable colorkeying.
-						*/
-#define I915_SET_COLORKEY_DESTINATION	(1<<1)
-#define I915_SET_COLORKEY_SOURCE	(1<<2)
+#define I915_SET_COLORKEY_NONE		(1UL<<0) /* Deprecated. Instead set
+                                                  * flags==0 to disable colorkeying.
+                                                  */
+#define I915_SET_COLORKEY_DESTINATION	(1UL<<1)
+#define I915_SET_COLORKEY_SOURCE	(1UL<<2)
 struct drm_intel_sprite_colorkey {
 	__u32 plane_id;
 	__u32 min_value;
@@ -1552,9 +1552,9 @@ enum drm_i915_perf_property_id {
 
 struct drm_i915_perf_open_param {
 	__u32 flags;
-#define I915_PERF_FLAG_FD_CLOEXEC	(1<<0)
-#define I915_PERF_FLAG_FD_NONBLOCK	(1<<1)
-#define I915_PERF_FLAG_DISABLED		(1<<2)
+#define I915_PERF_FLAG_FD_CLOEXEC	(1UL<<0)
+#define I915_PERF_FLAG_FD_NONBLOCK	(1UL<<1)
+#define I915_PERF_FLAG_DISABLED		(1UL<<2)
 
 	/** The number of u64 (id, value) pairs */
 	__u32 num_properties;
-- 
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] 8+ messages in thread

* Re: [PATCH] drm/i915: use appropriate integer types for flags
  2018-11-14 12:08 [PATCH] drm/i915: use appropriate integer types for flags Lionel Landwerlin
@ 2018-11-14 12:41 ` Chris Wilson
  2018-11-14 12:58 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Chris Wilson @ 2018-11-14 12:41 UTC (permalink / raw)
  To: Lionel Landwerlin, intel-gfx

Quoting Lionel Landwerlin (2018-11-14 12:08:06)
> We've been dealing a number of 32/64 bits flags issues lately :
> 
>  - 085603287452fc ("drm/i915: Compare user's 64b GTT offset even on 32b")
>  - c58281056a8b26 ("drm/i915: Mark up GTT sizes as u64")
>  - 83b466b1dc5f0b ("drm/i915: Mark pin flags as u64")
> 
> As userspace and in particular Mesa pulls in the uAPI headers and
> builds up flags using the uAPI defines we should probably make those
> more explicitly 32/64bits aware.

I just want to note that since these happen to be signed values, we
don't have the same issue with zero-extension of their inverses. I don't
think there's user impact here; no requirement for cc:stable.
 
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> ---
>  include/uapi/drm/i915_drm.h | 90 ++++++++++++++++++-------------------
>  1 file changed, 45 insertions(+), 45 deletions(-)
> 
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index e477ef8c644e..f562c4239bd8 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
> @@ -895,12 +895,12 @@ struct drm_i915_gem_exec_object2 {
>          */
>         __u64 offset;
>  
> -#define EXEC_OBJECT_NEEDS_FENCE                 (1<<0)
> -#define EXEC_OBJECT_NEEDS_GTT           (1<<1)
> -#define EXEC_OBJECT_WRITE               (1<<2)
> -#define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1<<3)
> -#define EXEC_OBJECT_PINNED              (1<<4)
> -#define EXEC_OBJECT_PAD_TO_SIZE                 (1<<5)
> +#define EXEC_OBJECT_NEEDS_FENCE                 (1ULL<<0)

We should probably appease CODING_STYLE a bit more while we are here;
	(1ULL << 0)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915: use appropriate integer types for flags
  2018-11-14 12:08 [PATCH] drm/i915: use appropriate integer types for flags Lionel Landwerlin
  2018-11-14 12:41 ` Chris Wilson
@ 2018-11-14 12:58 ` Patchwork
  2018-11-14 13:22 ` [PATCH] " Ville Syrjälä
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2018-11-14 12:58 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: use appropriate integer types for flags
URL   : https://patchwork.freedesktop.org/series/52481/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
04bef9eefcf0 drm/i915: use appropriate integer types for flags
-:8: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 085603287452 ("drm/i915: Compare user's 64b GTT offset even on 32b")'
#8: 
 - 085603287452fc ("drm/i915: Compare user's 64b GTT offset even on 32b")

-:9: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit c58281056a8b ("drm/i915: Mark up GTT sizes as u64")'
#9: 
 - c58281056a8b26 ("drm/i915: Mark up GTT sizes as u64")

-:10: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 83b466b1dc5f ("drm/i915: Mark pin flags as u64")'
#10: 
 - 83b466b1dc5f0b ("drm/i915: Mark pin flags as u64")

-:32: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#32: FILE: include/uapi/drm/i915_drm.h:898:
+#define EXEC_OBJECT_NEEDS_FENCE		 (1ULL<<0)
                                		      ^

-:33: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#33: FILE: include/uapi/drm/i915_drm.h:899:
+#define EXEC_OBJECT_NEEDS_GTT		 (1ULL<<1)
                              		      ^

-:34: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#34: FILE: include/uapi/drm/i915_drm.h:900:
+#define EXEC_OBJECT_WRITE		 (1ULL<<2)
                          		      ^

-:35: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#35: FILE: include/uapi/drm/i915_drm.h:901:
+#define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1ULL<<3)
                                               ^

-:36: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#36: FILE: include/uapi/drm/i915_drm.h:902:
+#define EXEC_OBJECT_PINNED		 (1ULL<<4)
                           		      ^

-:37: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#37: FILE: include/uapi/drm/i915_drm.h:903:
+#define EXEC_OBJECT_PAD_TO_SIZE		 (1ULL<<5)
                                		      ^

-:46: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#46: FILE: include/uapi/drm/i915_drm.h:924:
+#define EXEC_OBJECT_ASYNC		(1ULL<<6)
                          		     ^

-:54: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#54: FILE: include/uapi/drm/i915_drm.h:931:
+#define EXEC_OBJECT_CAPTURE		(1ULL<<7)
                            		     ^

-:64: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#64: FILE: include/uapi/drm/i915_drm.h:949:
+#define I915_EXEC_FENCE_WAIT            (1UL<<0)
                                             ^

-:65: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#65: FILE: include/uapi/drm/i915_drm.h:950:
+#define I915_EXEC_FENCE_SIGNAL          (1UL<<1)
                                             ^

-:79: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#79: FILE: include/uapi/drm/i915_drm.h:975:
+#define I915_EXEC_RING_MASK              (7ULL<<0)
                                               ^

-:80: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#80: FILE: include/uapi/drm/i915_drm.h:976:
+#define I915_EXEC_DEFAULT                (0ULL<<0)
                                               ^

-:81: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#81: FILE: include/uapi/drm/i915_drm.h:977:
+#define I915_EXEC_RENDER                 (1ULL<<0)
                                               ^

-:82: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#82: FILE: include/uapi/drm/i915_drm.h:978:
+#define I915_EXEC_BSD                    (2ULL<<0)
                                               ^

-:83: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#83: FILE: include/uapi/drm/i915_drm.h:979:
+#define I915_EXEC_BLT                    (3ULL<<0)
                                               ^

-:84: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#84: FILE: include/uapi/drm/i915_drm.h:980:
+#define I915_EXEC_VEBOX                  (4ULL<<0)
                                               ^

-:96: WARNING:SPACE_BEFORE_TAB: please, no space before tabs
#96: FILE: include/uapi/drm/i915_drm.h:988:
+#define I915_EXEC_CONSTANTS_MASK ^I(3ULL<<6)$

-:96: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#96: FILE: include/uapi/drm/i915_drm.h:988:
+#define I915_EXEC_CONSTANTS_MASK 	(3ULL<<6)
                                  	     ^

-:97: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#97: FILE: include/uapi/drm/i915_drm.h:989:
+#define I915_EXEC_CONSTANTS_REL_GENERAL (0ULL<<6) /* default */
                                              ^

-:98: WARNING:SPACE_BEFORE_TAB: please, no space before tabs
#98: FILE: include/uapi/drm/i915_drm.h:990:
+#define I915_EXEC_CONSTANTS_ABSOLUTE ^I(1ULL<<6)$

-:98: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#98: FILE: include/uapi/drm/i915_drm.h:990:
+#define I915_EXEC_CONSTANTS_ABSOLUTE 	(1ULL<<6)
                                      	     ^

-:99: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#99: FILE: include/uapi/drm/i915_drm.h:991:
+#define I915_EXEC_CONSTANTS_REL_SURFACE (2ULL<<6) /* gen4/5 only */
                                              ^

-:107: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#107: FILE: include/uapi/drm/i915_drm.h:998:
+#define I915_EXEC_GEN7_SOL_RESET	(1ULL<<8)
                                 	     ^

-:113: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#113: FILE: include/uapi/drm/i915_drm.h:1003:
+#define I915_EXEC_SECURE		(1ULL<<9)
                         		     ^

-:122: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#122: FILE: include/uapi/drm/i915_drm.h:1012:
+#define I915_EXEC_IS_PINNED		(1ULL<<10)
                            		     ^

-:130: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#130: FILE: include/uapi/drm/i915_drm.h:1019:
+#define I915_EXEC_NO_RELOC		(1ULL<<11)
                           		     ^

-:136: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#136: FILE: include/uapi/drm/i915_drm.h:1024:
+#define I915_EXEC_HANDLE_LUT		(1ULL<<12)
                             		     ^

-:154: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#154: FILE: include/uapi/drm/i915_drm.h:1037:
+#define I915_EXEC_RESOURCE_STREAMER     (1ULL<<15)
                                              ^

-:163: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#163: FILE: include/uapi/drm/i915_drm.h:1045:
+#define I915_EXEC_FENCE_IN		(1ULL<<16)
                           		     ^

-:172: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#172: FILE: include/uapi/drm/i915_drm.h:1062:
+#define I915_EXEC_FENCE_OUT		(1ULL<<17)
                            		     ^

-:181: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#181: FILE: include/uapi/drm/i915_drm.h:1073:
+#define I915_EXEC_BATCH_FIRST		(1ULL<<18)
                              		     ^

-:188: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#188: FILE: include/uapi/drm/i915_drm.h:1079:
+#define I915_EXEC_FENCE_ARRAY   (1ULL<<19)
                                      ^

-:199: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#199: FILE: include/uapi/drm/i915_drm.h:1355:
+#define I915_OVERLAY_UPDATE_ATTRS	(1UL<<0)
                                  	    ^

-:200: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#200: FILE: include/uapi/drm/i915_drm.h:1356:
+#define I915_OVERLAY_UPDATE_GAMMA	(1UL<<1)
                                  	    ^

-:201: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#201: FILE: include/uapi/drm/i915_drm.h:1357:
+#define I915_OVERLAY_DISABLE_DEST_COLORKEY	(1UL<<2)
                                           	    ^

-:214: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#214: FILE: include/uapi/drm/i915_drm.h:1393:
+#define I915_SET_COLORKEY_NONE		(1UL<<0) /* Deprecated. Instead set
                               		    ^

-:215: ERROR:CODE_INDENT: code indent should use tabs where possible
#215: FILE: include/uapi/drm/i915_drm.h:1394:
+                                                  * flags==0 to disable colorkeying.$

-:216: ERROR:CODE_INDENT: code indent should use tabs where possible
#216: FILE: include/uapi/drm/i915_drm.h:1395:
+                                                  */$

-:217: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#217: FILE: include/uapi/drm/i915_drm.h:1396:
+#define I915_SET_COLORKEY_DESTINATION	(1UL<<1)
                                      	    ^

-:218: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#218: FILE: include/uapi/drm/i915_drm.h:1397:
+#define I915_SET_COLORKEY_SOURCE	(1UL<<2)
                                 	    ^

-:229: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#229: FILE: include/uapi/drm/i915_drm.h:1555:
+#define I915_PERF_FLAG_FD_CLOEXEC	(1UL<<0)
                                  	    ^

-:230: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#230: FILE: include/uapi/drm/i915_drm.h:1556:
+#define I915_PERF_FLAG_FD_NONBLOCK	(1UL<<1)
                                   	    ^

-:231: CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV)
#231: FILE: include/uapi/drm/i915_drm.h:1557:
+#define I915_PERF_FLAG_DISABLED		(1UL<<2)
                                		    ^

total: 5 errors, 2 warnings, 39 checks, 201 lines checked

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

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

* Re: [PATCH] drm/i915: use appropriate integer types for flags
  2018-11-14 12:08 [PATCH] drm/i915: use appropriate integer types for flags Lionel Landwerlin
  2018-11-14 12:41 ` Chris Wilson
  2018-11-14 12:58 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2018-11-14 13:22 ` Ville Syrjälä
  2018-11-16 10:43   ` Lionel Landwerlin
  2018-11-14 14:15 ` ✓ Fi.CI.BAT: success for " Patchwork
  2018-11-14 20:53 ` ✓ Fi.CI.IGT: " Patchwork
  4 siblings, 1 reply; 8+ messages in thread
From: Ville Syrjälä @ 2018-11-14 13:22 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: intel-gfx

On Wed, Nov 14, 2018 at 12:08:06PM +0000, Lionel Landwerlin wrote:
> We've been dealing a number of 32/64 bits flags issues lately :
> 
>  - 085603287452fc ("drm/i915: Compare user's 64b GTT offset even on 32b")
>  - c58281056a8b26 ("drm/i915: Mark up GTT sizes as u64")
>  - 83b466b1dc5f0b ("drm/i915: Mark pin flags as u64")
> 
> As userspace and in particular Mesa pulls in the uAPI headers and
> builds up flags using the uAPI defines we should probably make those
> more explicitly 32/64bits aware.
> 
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> ---
>  include/uapi/drm/i915_drm.h | 90 ++++++++++++++++++-------------------
>  1 file changed, 45 insertions(+), 45 deletions(-)
> 
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index e477ef8c644e..f562c4239bd8 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
> @@ -895,12 +895,12 @@ struct drm_i915_gem_exec_object2 {
>  	 */
>  	__u64 offset;
>  
> -#define EXEC_OBJECT_NEEDS_FENCE		 (1<<0)
> -#define EXEC_OBJECT_NEEDS_GTT		 (1<<1)
> -#define EXEC_OBJECT_WRITE		 (1<<2)
> -#define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1<<3)
> -#define EXEC_OBJECT_PINNED		 (1<<4)
> -#define EXEC_OBJECT_PAD_TO_SIZE		 (1<<5)
> +#define EXEC_OBJECT_NEEDS_FENCE		 (1ULL<<0)
> +#define EXEC_OBJECT_NEEDS_GTT		 (1ULL<<1)
> +#define EXEC_OBJECT_WRITE		 (1ULL<<2)
> +#define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1ULL<<3)
> +#define EXEC_OBJECT_PINNED		 (1ULL<<4)
> +#define EXEC_OBJECT_PAD_TO_SIZE		 (1ULL<<5)
>  /* The kernel implicitly tracks GPU activity on all GEM objects, and
>   * synchronises operations with outstanding rendering. This includes
>   * rendering on other devices if exported via dma-buf. However, sometimes
> @@ -921,14 +921,14 @@ struct drm_i915_gem_exec_object2 {
>   * explicit tracking to avoid rendering corruption. See, for example,
>   * I915_PARAM_HAS_EXEC_FENCE to order execbufs and execute them asynchronously.
>   */
> -#define EXEC_OBJECT_ASYNC		(1<<6)
> +#define EXEC_OBJECT_ASYNC		(1ULL<<6)
>  /* Request that the contents of this execobject be copied into the error
>   * state upon a GPU hang involving this batch for post-mortem debugging.
>   * These buffers are recorded in no particular order as "user" in
>   * /sys/class/drm/cardN/error. Query I915_PARAM_HAS_EXEC_CAPTURE to see
>   * if the kernel supports this flag.
>   */
> -#define EXEC_OBJECT_CAPTURE		(1<<7)
> +#define EXEC_OBJECT_CAPTURE		(1ULL<<7)
>  /* All remaining bits are MBZ and RESERVED FOR FUTURE USE */
>  #define __EXEC_OBJECT_UNKNOWN_FLAGS -(EXEC_OBJECT_CAPTURE<<1)
>  	__u64 flags;
> @@ -946,8 +946,8 @@ struct drm_i915_gem_exec_fence {
>  	 */
>  	__u32 handle;
>  
> -#define I915_EXEC_FENCE_WAIT            (1<<0)
> -#define I915_EXEC_FENCE_SIGNAL          (1<<1)
> +#define I915_EXEC_FENCE_WAIT            (1UL<<0)
> +#define I915_EXEC_FENCE_SIGNAL          (1UL<<1)

UL doesn't make much sense to me. It can be 32 or 64 bits depending on
the architecture.

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

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

* ✓ Fi.CI.BAT: success for drm/i915: use appropriate integer types for flags
  2018-11-14 12:08 [PATCH] drm/i915: use appropriate integer types for flags Lionel Landwerlin
                   ` (2 preceding siblings ...)
  2018-11-14 13:22 ` [PATCH] " Ville Syrjälä
@ 2018-11-14 14:15 ` Patchwork
  2018-11-14 20:53 ` ✓ Fi.CI.IGT: " Patchwork
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2018-11-14 14:15 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: use appropriate integer types for flags
URL   : https://patchwork.freedesktop.org/series/52481/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_5138 -> Patchwork_10824 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_hangcheck:
      fi-kbl-7560u:       PASS -> INCOMPLETE (fdo#108044)

    igt@drv_selftest@live_objects:
      fi-cfl-8109u:       PASS -> INCOMPLETE (fdo#108474)

    igt@gem_exec_suspend@basic-s3:
      fi-cfl-8109u:       PASS -> DMESG-WARN (k.org#200587, fdo#106612)
      fi-icl-u2:          PASS -> DMESG-WARN (fdo#107724)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-byt-clapper:     PASS -> FAIL (fdo#103191, fdo#107362)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_contexts:
      fi-bsw-n3050:       DMESG-FAIL (fdo#108656, fdo#108626) -> PASS

    igt@drv_selftest@live_hangcheck:
      fi-skl-6700k2:      INCOMPLETE -> PASS

    igt@gem_ctx_create@basic-files:
      fi-bsw-n3050:       FAIL (fdo#108656) -> PASS

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
      fi-byt-clapper:     FAIL (fdo#103191, fdo#107362) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-skl-6600u:       INCOMPLETE (fdo#104108) -> PASS
      fi-blb-e6850:       INCOMPLETE (fdo#107718) -> PASS

    
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
  fdo#106612 https://bugs.freedesktop.org/show_bug.cgi?id=106612
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
  fdo#107724 https://bugs.freedesktop.org/show_bug.cgi?id=107724
  fdo#108044 https://bugs.freedesktop.org/show_bug.cgi?id=108044
  fdo#108474 https://bugs.freedesktop.org/show_bug.cgi?id=108474
  fdo#108626 https://bugs.freedesktop.org/show_bug.cgi?id=108626
  fdo#108656 https://bugs.freedesktop.org/show_bug.cgi?id=108656
  k.org#200587 https://bugzilla.kernel.org/show_bug.cgi?id=200587


== Participating hosts (52 -> 46) ==

  Additional (1): fi-pnv-d510 
  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-u 


== Build changes ==

    * Linux: CI_DRM_5138 -> Patchwork_10824

  CI_DRM_5138: 60c8a0cfdd1e3f7eb3e093a39f231e5d8aa507e3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4714: cab148ca3ec904a94d0cd43476cf7e1f8663f906 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10824: 04bef9eefcf094d2a1693b711ec91c3ac3942746 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

04bef9eefcf0 drm/i915: use appropriate integer types for flags

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10824/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for drm/i915: use appropriate integer types for flags
  2018-11-14 12:08 [PATCH] drm/i915: use appropriate integer types for flags Lionel Landwerlin
                   ` (3 preceding siblings ...)
  2018-11-14 14:15 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-11-14 20:53 ` Patchwork
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2018-11-14 20:53 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: use appropriate integer types for flags
URL   : https://patchwork.freedesktop.org/series/52481/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_5138_full -> Patchwork_10824_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_10824_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10824_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_10824_full:

  === IGT changes ===

    ==== Warnings ====

    igt@kms_lease@lease_invalid_connector:
      shard-snb:          PASS -> SKIP +2

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

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@forcewake:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@gem_exec_schedule@pi-ringfull-bsd:
      shard-skl:          NOTRUN -> FAIL (fdo#103158)

    igt@gem_exec_schedule@preempt-self-blt:
      shard-snb:          NOTRUN -> INCOMPLETE (fdo#105411)

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

    igt@gem_userptr_blits@forbidden-operations:
      shard-apl:          PASS -> INCOMPLETE (fdo#103927)

    igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
      shard-skl:          NOTRUN -> FAIL (fdo#108228, fdo#108470)

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

    igt@kms_chv_cursor_fail@pipe-b-64x64-right-edge:
      shard-glk:          PASS -> DMESG-FAIL (fdo#104671, fdo#106538)

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

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-skl:          PASS -> FAIL (fdo#105363)

    igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
      shard-skl:          NOTRUN -> FAIL (fdo#105682) +2

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

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

    igt@kms_frontbuffer_tracking@fbc-1p-rte:
      shard-apl:          PASS -> DMESG-WARN (fdo#105602, fdo#108131, fdo#103558)

    igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-indfb-draw-render:
      shard-glk:          PASS -> DMESG-FAIL (fdo#106538)

    igt@kms_frontbuffer_tracking@fbc-stridechange:
      shard-skl:          NOTRUN -> FAIL (fdo#105683)

    igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-pwrite:
      shard-skl:          NOTRUN -> FAIL (fdo#103167) +2

    igt@kms_plane@pixel-format-pipe-c-planes:
      shard-skl:          NOTRUN -> DMESG-WARN (fdo#106885)

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

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

    igt@kms_properties@connector-properties-atomic:
      shard-glk:          NOTRUN -> FAIL (fdo#108642)

    igt@kms_rotation_crc@primary-rotation-90:
      shard-skl:          NOTRUN -> FAIL (fdo#107815, fdo#103925)

    
    ==== Possible fixes ====

    igt@drv_suspend@forcewake:
      shard-skl:          INCOMPLETE (fdo#107773, fdo#104108) -> PASS

    igt@gem_cpu_reloc@full:
      shard-skl:          INCOMPLETE (fdo#108073) -> PASS

    igt@gem_userptr_blits@readonly-unsync:
      shard-skl:          INCOMPLETE (fdo#108074) -> PASS

    igt@kms_busy@extended-modeset-hang-newfb-render-a:
      shard-hsw:          DMESG-WARN (fdo#107956) -> PASS

    igt@kms_color@pipe-c-degamma:
      shard-apl:          FAIL (fdo#104782) -> PASS

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

    igt@kms_cursor_crc@cursor-256x256-suspend:
      shard-skl:          INCOMPLETE (fdo#104108) -> PASS

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

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

    igt@kms_frontbuffer_tracking@fbc-suspend:
      shard-kbl:          FAIL (fdo#103375) -> PASS

    igt@kms_plane@pixel-format-pipe-c-planes:
      shard-apl:          FAIL (fdo#103166) -> PASS +1

    igt@kms_plane@plane-panning-bottom-right-pipe-b-planes:
      shard-skl:          FAIL (fdo#103166) -> PASS

    igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
      shard-glk:          FAIL (fdo#108145) -> PASS

    igt@perf@polling:
      shard-hsw:          FAIL (fdo#102252) -> PASS

    igt@pm_rpm@system-suspend-devices:
      shard-skl:          INCOMPLETE (fdo#107807) -> PASS +2

    
    ==== Warnings ====

    igt@kms_vblank@pipe-a-query-busy:
      shard-snb:          INCOMPLETE (fdo#105411) -> DMESG-WARN (fdo#107469)

    
  fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
  fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
  fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
  fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
  fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
  fdo#104671 https://bugs.freedesktop.org/show_bug.cgi?id=104671
  fdo#104782 https://bugs.freedesktop.org/show_bug.cgi?id=104782
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#105682 https://bugs.freedesktop.org/show_bug.cgi?id=105682
  fdo#105683 https://bugs.freedesktop.org/show_bug.cgi?id=105683
  fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
  fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
  fdo#106885 https://bugs.freedesktop.org/show_bug.cgi?id=106885
  fdo#107469 https://bugs.freedesktop.org/show_bug.cgi?id=107469
  fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
  fdo#107807 https://bugs.freedesktop.org/show_bug.cgi?id=107807
  fdo#107815 https://bugs.freedesktop.org/show_bug.cgi?id=107815
  fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
  fdo#108039 https://bugs.freedesktop.org/show_bug.cgi?id=108039
  fdo#108073 https://bugs.freedesktop.org/show_bug.cgi?id=108073
  fdo#108074 https://bugs.freedesktop.org/show_bug.cgi?id=108074
  fdo#108131 https://bugs.freedesktop.org/show_bug.cgi?id=108131
  fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
  fdo#108228 https://bugs.freedesktop.org/show_bug.cgi?id=108228
  fdo#108470 https://bugs.freedesktop.org/show_bug.cgi?id=108470
  fdo#108642 https://bugs.freedesktop.org/show_bug.cgi?id=108642


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

  No changes in participating hosts


== Build changes ==

    * Linux: CI_DRM_5138 -> Patchwork_10824

  CI_DRM_5138: 60c8a0cfdd1e3f7eb3e093a39f231e5d8aa507e3 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4714: cab148ca3ec904a94d0cd43476cf7e1f8663f906 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10824: 04bef9eefcf094d2a1693b711ec91c3ac3942746 @ 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_10824/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: use appropriate integer types for flags
  2018-11-14 13:22 ` [PATCH] " Ville Syrjälä
@ 2018-11-16 10:43   ` Lionel Landwerlin
  2018-11-16 11:03     ` Ville Syrjälä
  0 siblings, 1 reply; 8+ messages in thread
From: Lionel Landwerlin @ 2018-11-16 10:43 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

On 14/11/2018 13:22, Ville Syrjälä wrote:
> On Wed, Nov 14, 2018 at 12:08:06PM +0000, Lionel Landwerlin wrote:
>> We've been dealing a number of 32/64 bits flags issues lately :
>>
>>   - 085603287452fc ("drm/i915: Compare user's 64b GTT offset even on 32b")
>>   - c58281056a8b26 ("drm/i915: Mark up GTT sizes as u64")
>>   - 83b466b1dc5f0b ("drm/i915: Mark pin flags as u64")
>>
>> As userspace and in particular Mesa pulls in the uAPI headers and
>> builds up flags using the uAPI defines we should probably make those
>> more explicitly 32/64bits aware.
>>
>> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
>> ---
>>   include/uapi/drm/i915_drm.h | 90 ++++++++++++++++++-------------------
>>   1 file changed, 45 insertions(+), 45 deletions(-)
>>
>> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
>> index e477ef8c644e..f562c4239bd8 100644
>> --- a/include/uapi/drm/i915_drm.h
>> +++ b/include/uapi/drm/i915_drm.h
>> @@ -895,12 +895,12 @@ struct drm_i915_gem_exec_object2 {
>>   	 */
>>   	__u64 offset;
>>   
>> -#define EXEC_OBJECT_NEEDS_FENCE		 (1<<0)
>> -#define EXEC_OBJECT_NEEDS_GTT		 (1<<1)
>> -#define EXEC_OBJECT_WRITE		 (1<<2)
>> -#define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1<<3)
>> -#define EXEC_OBJECT_PINNED		 (1<<4)
>> -#define EXEC_OBJECT_PAD_TO_SIZE		 (1<<5)
>> +#define EXEC_OBJECT_NEEDS_FENCE		 (1ULL<<0)
>> +#define EXEC_OBJECT_NEEDS_GTT		 (1ULL<<1)
>> +#define EXEC_OBJECT_WRITE		 (1ULL<<2)
>> +#define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1ULL<<3)
>> +#define EXEC_OBJECT_PINNED		 (1ULL<<4)
>> +#define EXEC_OBJECT_PAD_TO_SIZE		 (1ULL<<5)
>>   /* The kernel implicitly tracks GPU activity on all GEM objects, and
>>    * synchronises operations with outstanding rendering. This includes
>>    * rendering on other devices if exported via dma-buf. However, sometimes
>> @@ -921,14 +921,14 @@ struct drm_i915_gem_exec_object2 {
>>    * explicit tracking to avoid rendering corruption. See, for example,
>>    * I915_PARAM_HAS_EXEC_FENCE to order execbufs and execute them asynchronously.
>>    */
>> -#define EXEC_OBJECT_ASYNC		(1<<6)
>> +#define EXEC_OBJECT_ASYNC		(1ULL<<6)
>>   /* Request that the contents of this execobject be copied into the error
>>    * state upon a GPU hang involving this batch for post-mortem debugging.
>>    * These buffers are recorded in no particular order as "user" in
>>    * /sys/class/drm/cardN/error. Query I915_PARAM_HAS_EXEC_CAPTURE to see
>>    * if the kernel supports this flag.
>>    */
>> -#define EXEC_OBJECT_CAPTURE		(1<<7)
>> +#define EXEC_OBJECT_CAPTURE		(1ULL<<7)
>>   /* All remaining bits are MBZ and RESERVED FOR FUTURE USE */
>>   #define __EXEC_OBJECT_UNKNOWN_FLAGS -(EXEC_OBJECT_CAPTURE<<1)
>>   	__u64 flags;
>> @@ -946,8 +946,8 @@ struct drm_i915_gem_exec_fence {
>>   	 */
>>   	__u32 handle;
>>   
>> -#define I915_EXEC_FENCE_WAIT            (1<<0)
>> -#define I915_EXEC_FENCE_SIGNAL          (1<<1)
>> +#define I915_EXEC_FENCE_WAIT            (1UL<<0)
>> +#define I915_EXEC_FENCE_SIGNAL          (1UL<<1)
> UL doesn't make much sense to me. It can be 32 or 64 bits depending on
> the architecture.
>
Are you suggesting ULL instead?

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

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

* Re: [PATCH] drm/i915: use appropriate integer types for flags
  2018-11-16 10:43   ` Lionel Landwerlin
@ 2018-11-16 11:03     ` Ville Syrjälä
  0 siblings, 0 replies; 8+ messages in thread
From: Ville Syrjälä @ 2018-11-16 11:03 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: intel-gfx

On Fri, Nov 16, 2018 at 10:43:39AM +0000, Lionel Landwerlin wrote:
> On 14/11/2018 13:22, Ville Syrjälä wrote:
> > On Wed, Nov 14, 2018 at 12:08:06PM +0000, Lionel Landwerlin wrote:
> >> We've been dealing a number of 32/64 bits flags issues lately :
> >>
> >>   - 085603287452fc ("drm/i915: Compare user's 64b GTT offset even on 32b")
> >>   - c58281056a8b26 ("drm/i915: Mark up GTT sizes as u64")
> >>   - 83b466b1dc5f0b ("drm/i915: Mark pin flags as u64")
> >>
> >> As userspace and in particular Mesa pulls in the uAPI headers and
> >> builds up flags using the uAPI defines we should probably make those
> >> more explicitly 32/64bits aware.
> >>
> >> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> >> ---
> >>   include/uapi/drm/i915_drm.h | 90 ++++++++++++++++++-------------------
> >>   1 file changed, 45 insertions(+), 45 deletions(-)
> >>
> >> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> >> index e477ef8c644e..f562c4239bd8 100644
> >> --- a/include/uapi/drm/i915_drm.h
> >> +++ b/include/uapi/drm/i915_drm.h
> >> @@ -895,12 +895,12 @@ struct drm_i915_gem_exec_object2 {
> >>   	 */
> >>   	__u64 offset;
> >>   
> >> -#define EXEC_OBJECT_NEEDS_FENCE		 (1<<0)
> >> -#define EXEC_OBJECT_NEEDS_GTT		 (1<<1)
> >> -#define EXEC_OBJECT_WRITE		 (1<<2)
> >> -#define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1<<3)
> >> -#define EXEC_OBJECT_PINNED		 (1<<4)
> >> -#define EXEC_OBJECT_PAD_TO_SIZE		 (1<<5)
> >> +#define EXEC_OBJECT_NEEDS_FENCE		 (1ULL<<0)
> >> +#define EXEC_OBJECT_NEEDS_GTT		 (1ULL<<1)
> >> +#define EXEC_OBJECT_WRITE		 (1ULL<<2)
> >> +#define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1ULL<<3)
> >> +#define EXEC_OBJECT_PINNED		 (1ULL<<4)
> >> +#define EXEC_OBJECT_PAD_TO_SIZE		 (1ULL<<5)
> >>   /* The kernel implicitly tracks GPU activity on all GEM objects, and
> >>    * synchronises operations with outstanding rendering. This includes
> >>    * rendering on other devices if exported via dma-buf. However, sometimes
> >> @@ -921,14 +921,14 @@ struct drm_i915_gem_exec_object2 {
> >>    * explicit tracking to avoid rendering corruption. See, for example,
> >>    * I915_PARAM_HAS_EXEC_FENCE to order execbufs and execute them asynchronously.
> >>    */
> >> -#define EXEC_OBJECT_ASYNC		(1<<6)
> >> +#define EXEC_OBJECT_ASYNC		(1ULL<<6)
> >>   /* Request that the contents of this execobject be copied into the error
> >>    * state upon a GPU hang involving this batch for post-mortem debugging.
> >>    * These buffers are recorded in no particular order as "user" in
> >>    * /sys/class/drm/cardN/error. Query I915_PARAM_HAS_EXEC_CAPTURE to see
> >>    * if the kernel supports this flag.
> >>    */
> >> -#define EXEC_OBJECT_CAPTURE		(1<<7)
> >> +#define EXEC_OBJECT_CAPTURE		(1ULL<<7)
> >>   /* All remaining bits are MBZ and RESERVED FOR FUTURE USE */
> >>   #define __EXEC_OBJECT_UNKNOWN_FLAGS -(EXEC_OBJECT_CAPTURE<<1)
> >>   	__u64 flags;
> >> @@ -946,8 +946,8 @@ struct drm_i915_gem_exec_fence {
> >>   	 */
> >>   	__u32 handle;
> >>   
> >> -#define I915_EXEC_FENCE_WAIT            (1<<0)
> >> -#define I915_EXEC_FENCE_SIGNAL          (1<<1)
> >> +#define I915_EXEC_FENCE_WAIT            (1UL<<0)
> >> +#define I915_EXEC_FENCE_SIGNAL          (1UL<<1)
> > UL doesn't make much sense to me. It can be 32 or 64 bits depending on
> > the architecture.
> >
> Are you suggesting ULL instead?

What's wrong with a plain u?

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

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

end of thread, other threads:[~2018-11-16 11:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-14 12:08 [PATCH] drm/i915: use appropriate integer types for flags Lionel Landwerlin
2018-11-14 12:41 ` Chris Wilson
2018-11-14 12:58 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-11-14 13:22 ` [PATCH] " Ville Syrjälä
2018-11-16 10:43   ` Lionel Landwerlin
2018-11-16 11:03     ` Ville Syrjälä
2018-11-14 14:15 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-11-14 20:53 ` ✓ 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.