Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: matthew.d.roper@intel.com, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [PATCH] drm/xe: Grab mem_access when disabling C6 on skip_guc_pc platforms
Date: Fri, 26 Jan 2024 14:06:14 -0800	[thread overview]
Message-ID: <20240126220613.865939-2-matthew.d.roper@intel.com> (raw)

If skip_guc_pc is set for a platform, C6 is disabled directly without
acquiring a mem_access reference, triggering an assertion inside
xe_gt_idle_disable_c6.

Fixes: 975e4a3795d4 ("drm/xe: Manually setup C6 when skip_guc_pc is set")
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
Rodrigo has a pending series to kill off mem_access in general, but
that's a large, complicated series that will probably take some time to
land.  This quick fix is still useful in the meantime.

 drivers/gpu/drm/xe/xe_guc_pc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
index f71085228cb3..d91702592520 100644
--- a/drivers/gpu/drm/xe/xe_guc_pc.c
+++ b/drivers/gpu/drm/xe/xe_guc_pc.c
@@ -963,7 +963,9 @@ void xe_guc_pc_fini(struct xe_guc_pc *pc)
 	struct xe_device *xe = pc_to_xe(pc);
 
 	if (xe->info.skip_guc_pc) {
+		xe_device_mem_access_get(xe);
 		xe_gt_idle_disable_c6(pc_to_gt(pc));
+		xe_device_mem_access_put(xe);
 		return;
 	}
 
-- 
2.43.0


             reply	other threads:[~2024-01-26 22:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 22:06 Matt Roper [this message]
2024-01-26 22:09 ` ✓ CI.Patch_applied: success for drm/xe: Grab mem_access when disabling C6 on skip_guc_pc platforms Patchwork
2024-01-26 22:09 ` ✗ CI.checkpatch: warning " Patchwork
2024-01-26 22:09 ` ✗ CI.KUnit: failure " Patchwork
2024-01-29 10:40 ` [PATCH] " Matthew Auld
2024-01-29 15:56 ` ✓ CI.Patch_applied: success for drm/xe: Grab mem_access when disabling C6 on skip_guc_pc platforms (rev2) Patchwork
2024-01-29 15:56 ` ✗ CI.checkpatch: warning " Patchwork
2024-01-29 15:57 ` ✓ CI.KUnit: success " Patchwork
2024-01-29 16:04 ` ✓ CI.Build: " Patchwork
2024-01-29 16:04 ` ✓ CI.Hooks: " Patchwork
2024-01-29 16:06 ` ✓ CI.checksparse: " Patchwork
2024-01-29 16:29 ` ✓ CI.BAT: " Patchwork
2024-01-29 16:57   ` Matt Roper

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=20240126220613.865939-2-matthew.d.roper@intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=rodrigo.vivi@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