linux/drivers/gpu/drm/xe/compat-i915-headers/pxp/intel_pxp.h
Jani Nikula fe7fad476e drm/i915/pxp & drm/xe/pxp: Figure out pxp instance from the gem object
It's undesirable to have to figure out the pxp pointer in display
code. For one thing, its type is different for i915 and xe.

Since we can figure the pxp pointer out in the pxp code from the gem
object, offload it there.

v2: Rebase

Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250228114527.3091620-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2025-03-03 12:16:04 +02:00

30 lines
596 B
C

/* SPDX-License-Identifier: MIT */
/*
* Copyright © 2023 Intel Corporation
*/
#ifndef __INTEL_PXP_H__
#define __INTEL_PXP_H__
#include <linux/errno.h>
#include <linux/types.h>
#include "xe_pxp.h"
struct drm_gem_object;
static inline int intel_pxp_key_check(struct drm_gem_object *obj, bool assign)
{
/*
* 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