diff options
Diffstat (limited to 'drivers/gpu/drm/xe/compat-i915-headers/pxp/intel_pxp.h')
-rw-r--r-- | drivers/gpu/drm/xe/compat-i915-headers/pxp/intel_pxp.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/gpu/drm/xe/compat-i915-headers/pxp/intel_pxp.h b/drivers/gpu/drm/xe/compat-i915-headers/pxp/intel_pxp.h index c2c30ece8f77..97fd0ddf0b3a 100644 --- a/drivers/gpu/drm/xe/compat-i915-headers/pxp/intel_pxp.h +++ b/drivers/gpu/drm/xe/compat-i915-headers/pxp/intel_pxp.h @@ -9,20 +9,21 @@ #include <linux/errno.h> #include <linux/types.h> -struct drm_i915_gem_object; -struct intel_pxp; +#include "xe_pxp.h" -static inline int intel_pxp_key_check(struct intel_pxp *pxp, - struct drm_i915_gem_object *obj, - bool assign) -{ - return -ENODEV; -} +struct drm_gem_object; -static inline bool -i915_gem_object_is_protected(const struct drm_i915_gem_object *obj) +static inline int intel_pxp_key_check(struct drm_gem_object *obj, bool assign) { - return false; + /* + * The assign variable is used in i915 to assign the key to the BO at + * first submission time. In Xe the key is instead assigned at BO + * creation time, so the assign variable must always be false. + */ + if (assign) + return -EINVAL; + + return xe_pxp_obj_key_check(obj); } #endif |