Skip to content

Commit ee0ff28

Browse files
committed
drm/i915/pxp: un-inline intel_pxp_is_enabled()
In the interest of reducing include dependencies, un-inline intel_pxp_is_enabled(). v2: Fix build for CONFIG_DRM_I915_PXP=n Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/36bbb3708f3b1f84f0718afff94212dde93cb479.1639142167.git.jani.nikula@intel.com
1 parent 0cdbab8 commit ee0ff28

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

drivers/gpu/drm/i915/pxp/intel_pxp.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ struct intel_gt *pxp_to_gt(const struct intel_pxp *pxp)
4444
return container_of(pxp, struct intel_gt, pxp);
4545
}
4646

47+
bool intel_pxp_is_enabled(const struct intel_pxp *pxp)
48+
{
49+
return pxp->ce;
50+
}
51+
4752
bool intel_pxp_is_active(const struct intel_pxp *pxp)
4853
{
4954
return pxp->arb_is_valid;

drivers/gpu/drm/i915/pxp/intel_pxp.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@
66
#ifndef __INTEL_PXP_H__
77
#define __INTEL_PXP_H__
88

9-
#include "intel_pxp_types.h"
9+
#include <linux/errno.h>
10+
#include <linux/types.h>
1011

12+
struct intel_pxp;
1113
struct drm_i915_gem_object;
1214

13-
static inline bool intel_pxp_is_enabled(const struct intel_pxp *pxp)
14-
{
15-
return pxp->ce;
16-
}
17-
1815
#ifdef CONFIG_DRM_I915_PXP
1916
struct intel_gt *pxp_to_gt(const struct intel_pxp *pxp);
17+
bool intel_pxp_is_enabled(const struct intel_pxp *pxp);
2018
bool intel_pxp_is_active(const struct intel_pxp *pxp);
2119

2220
void intel_pxp_init(struct intel_pxp *pxp);
@@ -48,6 +46,11 @@ static inline int intel_pxp_start(struct intel_pxp *pxp)
4846
return -ENODEV;
4947
}
5048

49+
static inline bool intel_pxp_is_enabled(const struct intel_pxp *pxp)
50+
{
51+
return false;
52+
}
53+
5154
static inline bool intel_pxp_is_active(const struct intel_pxp *pxp)
5255
{
5356
return false;

0 commit comments

Comments
 (0)