All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: andi.shyti@intel.com, chris.p.wilson@linux.intel.com,
	matthew.d.roper@intel.com, Nirmoy Das <nirmoy.das@intel.com>
Subject: [Intel-gfx] [PATCH v2 6/7] drm/i915: Toggle binder context ready status
Date: Tue, 26 Sep 2023 10:37:41 +0200	[thread overview]
Message-ID: <20230926083742.14740-7-nirmoy.das@intel.com> (raw)
In-Reply-To: <20230926083742.14740-1-nirmoy.das@intel.com>

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.

v2: move changes to lower levels from i915_driver.c(Jani).
    use new function for setting context ready status.

Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Signed-off-by: Oak Zeng <oak.zeng@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt_pm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
index 5a942af0a14e..5682f9faee07 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
@@ -280,6 +280,7 @@ int intel_gt_resume(struct intel_gt *gt)
 out_fw:
 	intel_uncore_forcewake_put(gt->uncore, FORCEWAKE_ALL);
 	intel_gt_pm_put(gt);
+	intel_gt_bind_context_set_ready(gt);
 	return err;
 
 err_wedged:
@@ -306,6 +307,7 @@ static void wait_for_suspend(struct intel_gt *gt)
 
 void intel_gt_suspend_prepare(struct intel_gt *gt)
 {
+	intel_gt_bind_context_set_unready(gt);
 	user_forcewake(gt, true);
 	wait_for_suspend(gt);
 }
@@ -359,6 +361,7 @@ void intel_gt_suspend_late(struct intel_gt *gt)
 
 void intel_gt_runtime_suspend(struct intel_gt *gt)
 {
+	intel_gt_bind_context_set_unready(gt);
 	intel_uc_runtime_suspend(&gt->uc);
 
 	GT_TRACE(gt, "\n");
@@ -376,6 +379,7 @@ int intel_gt_runtime_resume(struct intel_gt *gt)
 	if (ret)
 		return ret;
 
+	intel_gt_bind_context_set_ready(gt);
 	return 0;
 }
 
-- 
2.41.0


  parent reply	other threads:[~2023-09-26  8:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26  8:37 [Intel-gfx] [PATCH 0/7] Update GGTT with MI_UPDATE_GTT on MTL Nirmoy Das
2023-09-26  8:37 ` [Intel-gfx] [PATCH v2 1/7] drm/i915: Lift runtime-pm acquire callbacks out of intel_wakeref.mutex Nirmoy Das
2023-09-26  8:37 ` [Intel-gfx] [PATCH v3 2/7] drm/i915: Create a kernel context for GGTT updates Nirmoy Das
2023-09-26  8:37 ` [Intel-gfx] [PATCH 3/7] drm/i915: Implement for_each_sgt_daddr_next Nirmoy Das
2023-09-26  8:37 ` [Intel-gfx] [PATCH 4/7] drm/i915: Parameterize binder context creation Nirmoy Das
2023-09-26  8:37 ` [Intel-gfx] [PATCH v2 5/7] drm/i915: Implement GGTT update method with MI_UPDATE_GTT Nirmoy Das
2023-09-26  8:37 ` Nirmoy Das [this message]
2023-09-26  8:37 ` [Intel-gfx] [PATCH 7/7] drm/i915: Enable GGTT updates with binder in MTL Nirmoy Das
2023-09-26 16:00 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Update GGTT with MI_UPDATE_GTT on MTL (rev10) Patchwork
2023-09-26 16:00 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-26 16:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-09-26 21:35 ` [Intel-gfx] [PATCH 0/7] Update GGTT with MI_UPDATE_GTT on MTL Andi Shyti
2023-09-27  3:20 ` [Intel-gfx] ✓ Fi.CI.IGT: success for Update GGTT with MI_UPDATE_GTT on MTL (rev10) Patchwork
2023-09-29 13:49 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Update GGTT with MI_UPDATE_GTT on MTL (rev11) Patchwork
2023-09-29 13:49 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-29 14:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-09-29 20:10 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-01  1:51 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Update GGTT with MI_UPDATE_GTT on MTL (rev12) 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=20230926083742.14740-7-nirmoy.das@intel.com \
    --to=nirmoy.das@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 \
    /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.