From ee0ff28a497eed4e23e0d617e6f5feacca69e0f1 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Fri, 10 Dec 2021 15:17:00 +0200 Subject: drm/i915/pxp: un-inline intel_pxp_is_enabled() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/36bbb3708f3b1f84f0718afff94212dde93cb479.1639142167.git.jani.nikula@intel.com --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 5 +++++ drivers/gpu/drm/i915/pxp/intel_pxp.h | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/drm/i915/pxp') diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.c b/drivers/gpu/drm/i915/pxp/intel_pxp.c index e2314ad9546d..15311eaed848 100644 --- a/drivers/gpu/drm/i915/pxp/intel_pxp.c +++ b/drivers/gpu/drm/i915/pxp/intel_pxp.c @@ -44,6 +44,11 @@ struct intel_gt *pxp_to_gt(const struct intel_pxp *pxp) return container_of(pxp, struct intel_gt, pxp); } +bool intel_pxp_is_enabled(const struct intel_pxp *pxp) +{ + return pxp->ce; +} + bool intel_pxp_is_active(const struct intel_pxp *pxp) { return pxp->arb_is_valid; diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.h b/drivers/gpu/drm/i915/pxp/intel_pxp.h index aa262258d4d4..73847e535cab 100644 --- a/drivers/gpu/drm/i915/pxp/intel_pxp.h +++ b/drivers/gpu/drm/i915/pxp/intel_pxp.h @@ -6,17 +6,15 @@ #ifndef __INTEL_PXP_H__ #define __INTEL_PXP_H__ -#include "intel_pxp_types.h" +#include +#include +struct intel_pxp; struct drm_i915_gem_object; -static inline bool intel_pxp_is_enabled(const struct intel_pxp *pxp) -{ - return pxp->ce; -} - #ifdef CONFIG_DRM_I915_PXP struct intel_gt *pxp_to_gt(const struct intel_pxp *pxp); +bool intel_pxp_is_enabled(const struct intel_pxp *pxp); bool intel_pxp_is_active(const struct intel_pxp *pxp); void intel_pxp_init(struct intel_pxp *pxp); @@ -48,6 +46,11 @@ static inline int intel_pxp_start(struct intel_pxp *pxp) return -ENODEV; } +static inline bool intel_pxp_is_enabled(const struct intel_pxp *pxp) +{ + return false; +} + static inline bool intel_pxp_is_active(const struct intel_pxp *pxp) { return false; -- cgit v1.2.3-58-ga151 From a09147188f7fc0d1ce9b5fb6b7fa6a81c6806073 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Fri, 10 Dec 2021 15:17:01 +0200 Subject: drm/i915/pxp: remove useless includes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not needed. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/01c4ea0cea17eead027c83dc9eaca3c181ce3a24.1639142167.git.jani.nikula@intel.com --- drivers/gpu/drm/i915/pxp/intel_pxp_types.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/gpu/drm/i915/pxp') diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_types.h b/drivers/gpu/drm/i915/pxp/intel_pxp_types.h index 73ef7d1754e1..7ce5f37ee12e 100644 --- a/drivers/gpu/drm/i915/pxp/intel_pxp_types.h +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_types.h @@ -7,9 +7,7 @@ #define __INTEL_PXP_TYPES_H__ #include -#include #include -#include #include #include -- cgit v1.2.3-58-ga151