All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Nirmoy Das <nirmoy.das@intel.com>, intel-gfx@lists.freedesktop.org
Cc: matthew.d.roper@intel.com, chris.p.wilson@linux.intel.com,
	andi.shyti@intel.com, Nirmoy Das <nirmoy.das@intel.com>
Subject: Re: [Intel-gfx] [PATCH 6/7] drm/i915: Toggle binder context ready status
Date: Fri, 15 Sep 2023 12:50:08 +0300	[thread overview]
Message-ID: <87o7i3vk8f.fsf@intel.com> (raw)
In-Reply-To: <20230915083412.4572-7-nirmoy.das@intel.com>

On Fri, 15 Sep 2023, Nirmoy Das <nirmoy.das@intel.com> wrote:
> Toggle binder context ready status when needed.
>
> To issue gpu commands, the driver must be primed to receive
> requests. Maintain binder-based GGTT update disablement until driver
> probing completes. Moreover, implement a temporary disablement
> of blitter prior to entering suspend, followed by re-enablement
> post-resume. This is acceptable as those transition periods are
> mostly single threaded.
>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> Signed-off-by: Oak Zeng <oak.zeng@intel.com>

Not a fan of adding more gt (or gem, or display) specific details at the
top level driver hooks. The direction should be to remove stuff from
there, and move to lower levels.

The top level functions have become really hard to understand because we
don't know the ordering constraints. This adds more constraints, and
looks like very specific and complicated ones too.

BR,
Jani.


> ---
>  drivers/gpu/drm/i915/i915_driver.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index f8dbee7a5af7..8cc289acdb39 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -815,6 +815,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	i915_welcome_messages(i915);
>  
>  	i915->do_release = true;
> +	intel_gt_bind_context_set_ready(to_gt(i915), true);
>  
>  	return 0;
>  
> @@ -855,6 +856,7 @@ void i915_driver_remove(struct drm_i915_private *i915)
>  {
>  	intel_wakeref_t wakeref;
>  
> +	intel_gt_bind_context_set_ready(to_gt(i915), false);
>  	wakeref = intel_runtime_pm_get(&i915->runtime_pm);
>  
>  	i915_driver_unregister(i915);
> @@ -1077,6 +1079,8 @@ static int i915_drm_suspend(struct drm_device *dev)
>  	struct pci_dev *pdev = to_pci_dev(dev_priv->drm.dev);
>  	pci_power_t opregion_target_state;
>  
> +	intel_gt_bind_context_set_ready(to_gt(dev_priv), false);
> +
>  	disable_rpm_wakeref_asserts(&dev_priv->runtime_pm);
>  
>  	/* We do a lot of poking in a lot of registers, make sure they work
> @@ -1264,6 +1268,7 @@ static int i915_drm_resume(struct drm_device *dev)
>  	intel_gvt_resume(dev_priv);
>  
>  	enable_rpm_wakeref_asserts(&dev_priv->runtime_pm);
> +	intel_gt_bind_context_set_ready(to_gt(dev_priv), true);
>  
>  	return 0;
>  }

-- 
Jani Nikula, Intel

  reply	other threads:[~2023-09-15  9:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-15  8:34 [Intel-gfx] [PATCH 0/7] Update GGTT with MI_UPDATE_GTT on MTL Nirmoy Das
2023-09-15  8:34 ` [Intel-gfx] [PATCH 1/7] drm/i915: Lift runtime-pm acquire callbacks out of intel_wakeref.mutex Nirmoy Das
2023-09-15  8:34 ` [Intel-gfx] [PATCH 2/7] drm/i915: Create a kernel context for GGTT updates Nirmoy Das
2023-09-15 15:44   ` Zeng, Oak
2023-09-15  8:34 ` [Intel-gfx] [PATCH 3/7] drm/i915: Implement for_each_sgt_daddr_next Nirmoy Das
2023-09-15  8:34 ` [Intel-gfx] [PATCH 4/7] drm/i915: Parameterize binder context creation Nirmoy Das
2023-09-15  8:34 ` [Intel-gfx] [PATCH 5/7] drm/i915: Implement GGTT update method with MI_UPDATE_GTT Nirmoy Das
2023-09-15 15:56   ` Zeng, Oak
2023-09-15 16:06     ` Piotr Piórkowski
2023-09-18 10:25     ` Nirmoy Das
2023-09-18 14:50       ` Zeng, Oak
2023-09-15  8:34 ` [Intel-gfx] [PATCH 6/7] drm/i915: Toggle binder context ready status Nirmoy Das
2023-09-15  9:50   ` Jani Nikula [this message]
2023-09-15 14:22     ` Nirmoy Das
2023-09-15  8:34 ` [Intel-gfx] [PATCH 7/7] drm/i915: Enable GGTT updates with binder in MTL Nirmoy Das
2023-09-15 10:45 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Update GGTT with MI_UPDATE_GTT on MTL (rev5) Patchwork
2023-09-15 10:45 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-15 10:56 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-09-15 18:28 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-09-18 17:02 [Intel-gfx] [PATCH 0/7] Update GGTT with MI_UPDATE_GTT on MTL Nirmoy Das
2023-09-18 17:02 ` [Intel-gfx] [PATCH 6/7] drm/i915: Toggle binder context ready status Nirmoy Das
2023-09-21 13:23   ` Andi Shyti
2023-09-13 13:09 [Intel-gfx] [PATCH 0/7] Update GGTT with MI_UPDATE_GTT on MTL Nirmoy Das
2023-09-13 13:09 ` [Intel-gfx] [PATCH 6/7] drm/i915: Toggle binder context ready status Nirmoy Das

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=87o7i3vk8f.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=andi.shyti@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 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.