Skip to content

Commit 0014868

Browse files
icklejlahtine-intel
authored andcommitted
drm/i915: Mark pin flags as u64
Since the flags are being used to operate on a u64 variable, they too need to be marked as such so that the inverses are full width (and not zero extended on 32b kernels and bdw+). Reported-by: Sergii Romantsov <sergii.romantsov@globallogic.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@vger.kernel.org Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181102161232.17742-2-chris@chris-wilson.co.uk (cherry picked from commit 83b466b) Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
1 parent e528c2a commit 0014868

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

drivers/gpu/drm/i915/i915_gem_gtt.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -661,20 +661,20 @@ int i915_gem_gtt_insert(struct i915_address_space *vm,
661661
u64 start, u64 end, unsigned int flags);
662662

663663
/* Flags used by pin/bind&friends. */
664-
#define PIN_NONBLOCK BIT(0)
665-
#define PIN_MAPPABLE BIT(1)
666-
#define PIN_ZONE_4G BIT(2)
667-
#define PIN_NONFAULT BIT(3)
668-
#define PIN_NOEVICT BIT(4)
669-
670-
#define PIN_MBZ BIT(5) /* I915_VMA_PIN_OVERFLOW */
671-
#define PIN_GLOBAL BIT(6) /* I915_VMA_GLOBAL_BIND */
672-
#define PIN_USER BIT(7) /* I915_VMA_LOCAL_BIND */
673-
#define PIN_UPDATE BIT(8)
674-
675-
#define PIN_HIGH BIT(9)
676-
#define PIN_OFFSET_BIAS BIT(10)
677-
#define PIN_OFFSET_FIXED BIT(11)
664+
#define PIN_NONBLOCK BIT_ULL(0)
665+
#define PIN_MAPPABLE BIT_ULL(1)
666+
#define PIN_ZONE_4G BIT_ULL(2)
667+
#define PIN_NONFAULT BIT_ULL(3)
668+
#define PIN_NOEVICT BIT_ULL(4)
669+
670+
#define PIN_MBZ BIT_ULL(5) /* I915_VMA_PIN_OVERFLOW */
671+
#define PIN_GLOBAL BIT_ULL(6) /* I915_VMA_GLOBAL_BIND */
672+
#define PIN_USER BIT_ULL(7) /* I915_VMA_LOCAL_BIND */
673+
#define PIN_UPDATE BIT_ULL(8)
674+
675+
#define PIN_HIGH BIT_ULL(9)
676+
#define PIN_OFFSET_BIAS BIT_ULL(10)
677+
#define PIN_OFFSET_FIXED BIT_ULL(11)
678678
#define PIN_OFFSET_MASK (-I915_GTT_PAGE_SIZE)
679679

680680
#endif

0 commit comments

Comments
 (0)