Commit b39c7056 authored by Karthik Poosa's avatar Karthik Poosa Committed by Lucas De Marchi

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: default avatarKarthik Poosa <karthik.poosa@intel.com>
Suggested-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Cc: Badal Nilawar <badal.nilawar@intel.com>
Reviewed-by: default avatarBadal Nilawar <badal.nilawar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240405130127.1392426-2-karthik.poosa@intel.comSigned-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
parent c151ff5c
......@@ -131,4 +131,9 @@ struct xe_reg_mcr {
.__reg = XE_REG_INITIALIZER(r_, ##__VA_ARGS__, .mcr = 1) \
})
static inline bool xe_reg_is_valid(struct xe_reg r)
{
return r.addr;
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment