public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Jonathan Gray <jsg@jsg.id.au>, alan.previn.teres.alexis@intel.com
Cc: joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com,
	tursulin@ursulin.net, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/pxp: fix non-optimised !CONFIG_DRM_I915_PXP build
Date: Mon, 04 Nov 2024 12:16:44 +0200	[thread overview]
Message-ID: <87r07ri9rn.fsf@intel.com> (raw)
In-Reply-To: <20241103110230.11035-1-jsg@jsg.id.au>

On Sun, 03 Nov 2024, Jonathan Gray <jsg@jsg.id.au> wrote:
> intel_pxp_gsccs_is_ready_for_sessions() is gated by CONFIG_DRM_I915_PXP
> but called from intel_pxp.c which isn't.  Provide a fallback inline
> function to fix the non-optimised build.

What does this have to do with optimization? Isn't the build just plain
broken for PXP=n?

BR,
Jani.


>
> Fixes: 99afb7cc8c44 ("drm/i915/pxp: Add ARB session creation and cleanup")
> Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
> ---
>  drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h
> index 9aae779c4da3..b93488e99685 100644
> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h
> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h
> @@ -16,26 +16,30 @@ struct intel_pxp;
>  #define GSC_PENDING_RETRY_PAUSE_MS 50
>  #define GSCFW_MAX_ROUND_TRIP_LATENCY_MS (GSC_HECI_REPLY_LATENCY_MS + \
>  					 (GSC_PENDING_RETRY_MAXCOUNT * GSC_PENDING_RETRY_PAUSE_MS))
>  
>  #ifdef CONFIG_DRM_I915_PXP
>  void intel_pxp_gsccs_fini(struct intel_pxp *pxp);
>  int intel_pxp_gsccs_init(struct intel_pxp *pxp);
> +bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp);
>  
>  int intel_pxp_gsccs_create_session(struct intel_pxp *pxp, int arb_session_id);
>  void intel_pxp_gsccs_end_arb_fw_session(struct intel_pxp *pxp, u32 arb_session_id);
>  
>  #else
>  static inline void intel_pxp_gsccs_fini(struct intel_pxp *pxp)
>  {
>  }
>  
>  static inline int intel_pxp_gsccs_init(struct intel_pxp *pxp)
>  {
>  	return 0;
>  }
>  
> -#endif
> +static inline bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp)
> +{
> +	return false;
> +}
>  
> -bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp);
> +#endif
>  
>  #endif /*__INTEL_PXP_GSCCS_H__ */

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-11-04 10:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-03 11:02 [PATCH] drm/i915/pxp: fix non-optimised !CONFIG_DRM_I915_PXP build Jonathan Gray
2024-11-04 10:16 ` Jani Nikula [this message]
2024-11-04 11:44   ` Jonathan Gray
2024-11-04 13:40     ` Jani Nikula
2024-11-04 14:20 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-11-05  1:35 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-11-05  9:23 ` [PATCH] " Jani Nikula
2025-05-06 12:42   ` Jonathan Gray
2025-05-06 13:04     ` Jani Nikula
2025-05-06 14:45       ` Jonathan Gray

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=87r07ri9rn.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=alan.previn.teres.alexis@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=jsg@jsg.id.au \
    --cc=rodrigo.vivi@intel.com \
    --cc=tursulin@ursulin.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox