Skip to content

Commit ad614a7

Browse files
geerturodrigovivi
authored andcommitted
drm/xe/oa/uapi: Make bit masks unsigned
When building with gcc-5: In function ‘decode_oa_format.isra.26’, inlined from ‘xe_oa_set_prop_oa_format’ at drivers/gpu/drm/xe/xe_oa.c:1664:6: ././include/linux/compiler_types.h:510:38: error: call to ‘__compiletime_assert_1336’ declared with attribute error: FIELD_GET: mask is not constant [...] ./include/linux/bitfield.h:155:3: note: in expansion of macro ‘__BF_FIELD_CHECK’ __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \ ^ drivers/gpu/drm/xe/xe_oa.c:1573:18: note: in expansion of macro ‘FIELD_GET’ u32 bc_report = FIELD_GET(DRM_XE_OA_FORMAT_MASK_BC_REPORT, fmt); ^ Fixes: b6fd51c ("drm/xe/oa/uapi: Define and parse OA stream properties") Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Lucas De Marchi <[email protected]> (cherry picked from commit f2881df) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent ddf6492 commit ad614a7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/uapi/drm/xe_drm.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,10 +1590,10 @@ enum drm_xe_oa_property_id {
15901590
* b. Counter select c. Counter size and d. BC report. Also refer to the
15911591
* oa_formats array in drivers/gpu/drm/xe/xe_oa.c.
15921592
*/
1593-
#define DRM_XE_OA_FORMAT_MASK_FMT_TYPE (0xff << 0)
1594-
#define DRM_XE_OA_FORMAT_MASK_COUNTER_SEL (0xff << 8)
1595-
#define DRM_XE_OA_FORMAT_MASK_COUNTER_SIZE (0xff << 16)
1596-
#define DRM_XE_OA_FORMAT_MASK_BC_REPORT (0xff << 24)
1593+
#define DRM_XE_OA_FORMAT_MASK_FMT_TYPE (0xffu << 0)
1594+
#define DRM_XE_OA_FORMAT_MASK_COUNTER_SEL (0xffu << 8)
1595+
#define DRM_XE_OA_FORMAT_MASK_COUNTER_SIZE (0xffu << 16)
1596+
#define DRM_XE_OA_FORMAT_MASK_BC_REPORT (0xffu << 24)
15971597

15981598
/**
15991599
* @DRM_XE_OA_PROPERTY_OA_PERIOD_EXPONENT: Requests periodic OA unit

0 commit comments

Comments
 (0)