summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2025-12-01 19:27:30 +0200
committerJani Nikula <jani.nikula@intel.com>2025-12-02 12:08:46 +0200
commitee30fde96bbae259fb8a744ee747b2ec733e9fc4 (patch)
treecb070c1ebead24ba194400c80a0ecce2bee28450 /drivers/gpu/drm/xe
parent156fd724e18dd099267b4ceab485a995b8ba54bb (diff)
drm/{i915, xe}/display: make pxp key check part of bo interface
Add intel_bo_key_check() next to intel_bo_is_protected() where it feels like it belongs, and drop the extra pxp compat header. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/20251201172730.2154668-1-jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe')
-rw-r--r--drivers/gpu/drm/xe/compat-i915-headers/pxp/intel_pxp.h29
-rw-r--r--drivers/gpu/drm/xe/display/intel_bo.c8
2 files changed, 7 insertions, 30 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
deleted file mode 100644
index 97fd0ddf0b3a..000000000000
--- a/drivers/gpu/drm/xe/compat-i915-headers/pxp/intel_pxp.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* 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
diff --git a/drivers/gpu/drm/xe/display/intel_bo.c b/drivers/gpu/drm/xe/display/intel_bo.c
index bad2243b9114..e8049a255d21 100644
--- a/drivers/gpu/drm/xe/display/intel_bo.c
+++ b/drivers/gpu/drm/xe/display/intel_bo.c
@@ -3,9 +3,10 @@
#include <drm/drm_gem.h>
-#include "xe_bo.h"
#include "intel_bo.h"
#include "intel_frontbuffer.h"
+#include "xe_bo.h"
+#include "xe_pxp.h"
bool intel_bo_is_tiled(struct drm_gem_object *obj)
{
@@ -29,6 +30,11 @@ bool intel_bo_is_protected(struct drm_gem_object *obj)
return xe_bo_is_protected(gem_to_xe_bo(obj));
}
+int intel_bo_key_check(struct drm_gem_object *obj)
+{
+ return xe_pxp_obj_key_check(obj);
+}
+
int intel_bo_fb_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
{
return drm_gem_prime_mmap(obj, vma);