From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/{i915, xe}/display: make pxp key check part of bo interface
Date: Mon, 1 Dec 2025 12:34:57 -0500 [thread overview]
Message-ID: <aS3RwWnBy2nHtLLo@intel.com> (raw)
In-Reply-To: <20251201172730.2154668-1-jani.nikula@intel.com>
On Mon, Dec 01, 2025 at 07:27:30PM +0200, Jani Nikula wrote:
> Add intel_bo_key_check() next to intel_bo_is_protected() where it feels
> like it belongs, and drop the extra pxp compat header.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_bo.c | 6 ++++
> drivers/gpu/drm/i915/display/intel_bo.h | 1 +
> .../drm/i915/display/skl_universal_plane.c | 3 +-
> .../xe/compat-i915-headers/pxp/intel_pxp.h | 29 -------------------
> drivers/gpu/drm/xe/display/intel_bo.c | 8 ++++-
> 5 files changed, 15 insertions(+), 32 deletions(-)
> delete mode 100644 drivers/gpu/drm/xe/compat-i915-headers/pxp/intel_pxp.h
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bo.c b/drivers/gpu/drm/i915/display/intel_bo.c
> index f3687eb63467..8f372b33d48b 100644
> --- a/drivers/gpu/drm/i915/display/intel_bo.c
> +++ b/drivers/gpu/drm/i915/display/intel_bo.c
> @@ -6,6 +6,7 @@
> #include "gem/i915_gem_mman.h"
> #include "gem/i915_gem_object.h"
> #include "gem/i915_gem_object_frontbuffer.h"
> +#include "pxp/intel_pxp.h"
> #include "i915_debugfs.h"
> #include "intel_bo.h"
>
> @@ -29,6 +30,11 @@ bool intel_bo_is_protected(struct drm_gem_object *obj)
> return i915_gem_object_is_protected(to_intel_bo(obj));
> }
>
> +int intel_bo_key_check(struct drm_gem_object *obj)
> +{
> + return intel_pxp_key_check(obj, false);
> +}
> +
> int intel_bo_fb_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
> {
> return i915_gem_fb_mmap(to_intel_bo(obj), vma);
> diff --git a/drivers/gpu/drm/i915/display/intel_bo.h b/drivers/gpu/drm/i915/display/intel_bo.h
> index fc05f680dc76..516a3836a6bc 100644
> --- a/drivers/gpu/drm/i915/display/intel_bo.h
> +++ b/drivers/gpu/drm/i915/display/intel_bo.h
> @@ -16,6 +16,7 @@ bool intel_bo_is_tiled(struct drm_gem_object *obj);
> bool intel_bo_is_userptr(struct drm_gem_object *obj);
> bool intel_bo_is_shmem(struct drm_gem_object *obj);
> bool intel_bo_is_protected(struct drm_gem_object *obj);
> +int intel_bo_key_check(struct drm_gem_object *obj);
> int intel_bo_fb_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma);
> int intel_bo_read_from_page(struct drm_gem_object *obj, u64 offset, void *dst, int size);
>
> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> index 6880f9d89a4e..d38582af6b39 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> @@ -9,7 +9,6 @@
> #include <drm/drm_fourcc.h>
> #include <drm/drm_print.h>
>
> -#include "pxp/intel_pxp.h"
> #include "intel_bo.h"
> #include "intel_de.h"
> #include "intel_display_irq.h"
> @@ -2290,7 +2289,7 @@ static void check_protection(struct intel_plane_state *plane_state)
> if (DISPLAY_VER(display) < 11)
> return;
>
> - plane_state->decrypt = intel_pxp_key_check(obj, false) == 0;
> + plane_state->decrypt = intel_bo_key_check(obj) == 0;
> plane_state->force_black = intel_bo_is_protected(obj) &&
> !plane_state->decrypt;
> }
> 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);
> --
> 2.47.3
>
next prev parent reply other threads:[~2025-12-01 17:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 17:27 [PATCH] drm/{i915, xe}/display: make pxp key check part of bo interface Jani Nikula
2025-12-01 17:34 ` Rodrigo Vivi [this message]
2025-12-02 10:15 ` Jani Nikula
2025-12-01 22:23 ` ✓ i915.CI.BAT: success for " Patchwork
2025-12-01 22:27 ` ✗ CI.checkpatch: warning " Patchwork
2025-12-01 22:29 ` ✓ CI.KUnit: success " Patchwork
2025-12-01 23:18 ` ✓ Xe.CI.BAT: " Patchwork
2025-12-01 23:44 ` ✓ i915.CI.Full: " Patchwork
2025-12-02 2:38 ` ✗ Xe.CI.Full: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aS3RwWnBy2nHtLLo@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.