Re: [PATCH 4/7] drm/i915: Parameterize binder context creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Oak Zeng <oak.zeng@xxxxxxxxx>

Thanks,
Oak

> -----Original Message-----
> From: Das, Nirmoy <nirmoy.das@xxxxxxxxx>
> Sent: Wednesday, September 13, 2023 9:10 AM
> To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Zeng, Oak <oak.zeng@xxxxxxxxx>; chris.p.wilson@xxxxxxxxxxxxxxx; Piorkowski,
> Piotr <piotr.piorkowski@xxxxxxxxx>; Shyti, Andi <andi.shyti@xxxxxxxxx>; Mun,
> Gwan-gyeong <gwan-gyeong.mun@xxxxxxxxx>; Roper, Matthew D
> <matthew.d.roper@xxxxxxxxx>; Das, Nirmoy <nirmoy.das@xxxxxxxxx>
> Subject: [PATCH 4/7] drm/i915: Parameterize binder context creation
> 
> Add i915_ggtt_require_binder() to indicate that i915
> needs to create binder context which will be used
> by subsequent patch to enable i915_address_space vfuncs
> that will use GPU commands to update GGTT.
> 
> Signed-off-by: Nirmoy Das <nirmoy.das@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +-
>  drivers/gpu/drm/i915/gt/intel_gtt.c       | 4 ++++
>  drivers/gpu/drm/i915/gt/intel_gtt.h       | 2 ++
>  3 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> index 52a24f55cb57..12af594e9164 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> @@ -1478,7 +1478,7 @@ static int engine_init_common(struct intel_engine_cs
> *engine)
>  	 * engines as well but BCS should be less busy engine so pick that for
>  	 * GGTT updates.
>  	 */
> -	if (engine->id == BCS0) {
> +	if (i915_ggtt_require_binder(engine->i915) && engine->id == BCS0) {
>  		bce = create_ggtt_bind_context(engine);
>  		if (IS_ERR(bce))
>  			return PTR_ERR(bce);
> diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c
> b/drivers/gpu/drm/i915/gt/intel_gtt.c
> index 13944a14ea2d..4c89eb8d9af7 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gtt.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gtt.c
> @@ -21,6 +21,10 @@
>  #include "intel_gt_regs.h"
>  #include "intel_gtt.h"
> 
> +bool i915_ggtt_require_binder(struct drm_i915_private *i915)
> +{
> +	return false;
> +}
> 
>  static bool intel_ggtt_update_needs_vtd_wa(struct drm_i915_private *i915)
>  {
> diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.h
> b/drivers/gpu/drm/i915/gt/intel_gtt.h
> index 41e530d0a4e9..b471edac2699 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gtt.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gtt.h
> @@ -691,4 +691,6 @@ static inline struct sgt_dma {
>  	return (struct sgt_dma){ sg, addr, addr + sg_dma_len(sg) };
>  }
> 
> +bool i915_ggtt_require_binder(struct drm_i915_private *i915);
> +
>  #endif
> --
> 2.41.0





[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux