mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-31 21:23:31 +00:00

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>
30 lines
596 B
C
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
|