All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH v2 6/7] drm/i915/pxp: un-inline intel_pxp_is_enabled()
Date: Fri, 10 Dec 2021 15:17:00 +0200	[thread overview]
Message-ID: <36bbb3708f3b1f84f0718afff94212dde93cb479.1639142167.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1639142167.git.jani.nikula@intel.com>

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ä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <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(-)

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 <linux/errno.h>
+#include <linux/types.h>
 
+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;
-- 
2.30.2


  parent reply	other threads:[~2021-12-10 13:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10 13:16 [Intel-gfx] [PATCH v2 0/7] drm/i915: include reductions Jani Nikula
2021-12-10 13:16 ` [Intel-gfx] [PATCH v2 1/7] drm/i915/reset: include intel_display.h instead of intel_display_types.h Jani Nikula
2021-12-10 13:16 ` [Intel-gfx] [PATCH v2 2/7] drm/i915/active: remove useless i915_utils.h include Jani Nikula
2021-12-10 13:16 ` [Intel-gfx] [PATCH v2 3/7] drm/i915/psr: avoid intel_frontbuffer.h include with declaration Jani Nikula
2021-12-10 13:16 ` [Intel-gfx] [PATCH v2 4/7] drm/i915/fbc: " Jani Nikula
2021-12-10 13:16 ` [Intel-gfx] [PATCH v2 5/7] drm/i915/fb: reduce include dependencies Jani Nikula
2021-12-10 13:17 ` Jani Nikula [this message]
2021-12-10 13:17 ` [Intel-gfx] [PATCH v2 7/7] drm/i915/pxp: remove useless includes Jani Nikula
2021-12-10 16:13 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: include reductions (rev2) Patchwork
2021-12-10 16:41 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-12-11 13:10 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=36bbb3708f3b1f84f0718afff94212dde93cb479.1639142167.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.