Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@linux.intel.com>
To: Andi Shyti <andi.shyti@linux.intel.com>,
	Nirmoy Das <nirmoy.das@intel.com>
Cc: matthew.d.roper@intel.com, intel-gfx@lists.freedesktop.org,
	chris.p.wilson@linux.intel.com
Subject: Re: [Intel-gfx] [PATCH 2/5] drm/i915: Create a kernel context for GGTT updates
Date: Wed, 13 Sep 2023 14:05:07 +0200	[thread overview]
Message-ID: <2cfdb5f2-ec2b-ed58-292c-5a74d76e9297@linux.intel.com> (raw)
In-Reply-To: <ZPnS9+0exyFPAYue@ashyti-mobl2.lan>


On 9/7/2023 3:41 PM, Andi Shyti wrote:
> Hi Nirmoy,
>
> [...]
>
>> +	/* mark the bind context's availability status */
>> +	bool bind_context_ready;
> Do we need some locking here?

bind_context_ready is changed in suspend/resume or after mod probe so no need to
worry about locking here.


>
>>   	/**
>>   	 * pinned_contexts_list: List of pinned contexts. This list is only
>> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
>> index 449f0b7fc843..cd0ff1597db9 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_gt.c
>> +++ b/drivers/gpu/drm/i915/gt/intel_gt.c
>> @@ -1019,3 +1019,21 @@ enum i915_map_type intel_gt_coherent_map_type(struct intel_gt *gt,
>>   	else
>>   		return I915_MAP_WC;
>>   }
>> +
>> +void intel_gt_bind_context_set_ready(struct intel_gt *gt, bool ready)
>> +{
>> +	struct intel_engine_cs *engine = gt->engine[BCS0];
>> +
>> +	if (engine && engine->bind_context)
>> +		engine->bind_context_ready = ready;
>> +}
>> +
>> +bool intel_gt_is_bind_context_ready(struct intel_gt *gt)
>> +{
>> +	struct intel_engine_cs *engine = gt->engine[BCS0];
>> +
>> +	if (engine)
>> +		return engine->bind_context_ready;
>> +
>> +	return false;
>> +}
>> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.h b/drivers/gpu/drm/i915/gt/intel_gt.h
>> index 239848bcb2a4..9e70e625cebc 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_gt.h
>> +++ b/drivers/gpu/drm/i915/gt/intel_gt.h
>> @@ -180,4 +180,6 @@ enum i915_map_type intel_gt_coherent_map_type(struct intel_gt *gt,
>>   					      struct drm_i915_gem_object *obj,
>>   					      bool always_coherent);
>>   
>> +void intel_gt_bind_context_set_ready(struct intel_gt *gt, bool ready);
>> +bool intel_gt_is_bind_context_ready(struct intel_gt *gt);
> Can you put all this part in patch 4 or make it a separate patch?


This patch contains the new member intel_engine_cs->bind_context_ready 
which is why I added these two function in this.

Probably it makes sense to move only i915_ggtt_require_binder() out of 
this patch ?


Regards,

Nirmoy

>
> Andi

  reply	other threads:[~2023-09-13 12:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 11:31 [Intel-gfx] [PATCH 0/5] Update GGTT with MI_UPDATE_GTT on MTL Nirmoy Das
2023-09-06 11:31 ` [Intel-gfx] [PATCH 1/5] drm/i915: Lift runtime-pm acquire callbacks out of intel_wakeref.mutex Nirmoy Das
2023-09-07 11:03   ` Andi Shyti
2023-09-06 11:31 ` [Intel-gfx] [PATCH 2/5] drm/i915: Create a kernel context for GGTT updates Nirmoy Das
2023-09-07 13:41   ` Andi Shyti
2023-09-13 12:05     ` Nirmoy Das [this message]
2023-09-06 11:31 ` [Intel-gfx] [PATCH 3/5] drm/i915: Implement __for_each_sgt_daddr_next Nirmoy Das
2023-09-07 13:46   ` Andi Shyti
2023-09-06 11:31 ` [Intel-gfx] [PATCH 4/5] drm/i915: Implement GGTT update method with MI_UPDATE_GTT Nirmoy Das
2023-09-07 13:48   ` Andi Shyti
2023-09-13 12:07     ` Nirmoy Das
2023-09-06 11:31 ` [Intel-gfx] [PATCH 5/5] drm/i915: Enable GGTT updates with binder in MTL Nirmoy Das
2023-09-06 12:25 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Update GGTT with MI_UPDATE_GTT on MTL Patchwork
2023-09-06 12:25 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-06 12:43 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-09-07 11:37 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Update GGTT with MI_UPDATE_GTT on MTL (rev2) Patchwork
2023-09-07 11:37 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-07 11:55 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-09-07 13:08 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-09-12 18:38 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Update GGTT with MI_UPDATE_GTT on MTL (rev3) Patchwork
2023-09-12 18:38 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-12 18:57 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " 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=2cfdb5f2-ec2b-ed58-292c-5a74d76e9297@linux.intel.com \
    --to=nirmoy.das@linux.intel.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=chris.p.wilson@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.com \
    --cc=nirmoy.das@intel.com \
    /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