Skip to content

Commit b39c705

Browse files
kpoosalucasdemarchi
authored andcommitted
drm/xe: Define xe_reg_is_valid
Add a function to check if struct xe_reg has valid address. v2: - Rebase. - Make xe_reg_is_valid as inline function instead of a macro. (Badal). - Update commit msg. Signed-off-by: Karthik Poosa <[email protected]> Suggested-by: Lucas De Marchi <[email protected]> Cc: Badal Nilawar <[email protected]> Reviewed-by: Badal Nilawar <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Lucas De Marchi <[email protected]>
1 parent c151ff5 commit b39c705

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/gpu/drm/xe/regs/xe_reg_defs.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,9 @@ struct xe_reg_mcr {
131131
.__reg = XE_REG_INITIALIZER(r_, ##__VA_ARGS__, .mcr = 1) \
132132
})
133133

134+
static inline bool xe_reg_is_valid(struct xe_reg r)
135+
{
136+
return r.addr;
137+
}
138+
134139
#endif

0 commit comments

Comments
 (0)