Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ashutosh Dixit <ashutosh.dixit@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Matthew Brost <matthew.brost@intel.com>
Subject: [PATCH] drm/xe/exec: Fix minor bug related to xe_sync_entry_cleanup
Date: Thu, 11 Jul 2024 13:48:32 -0700	[thread overview]
Message-ID: <20240711204832.3724771-1-ashutosh.dixit@intel.com> (raw)

Increment num_syncs after xe_sync_entry_parse() is successful to ensure
the xe_sync_entry_cleanup() logic under "err_syncs" label works correctly.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 drivers/gpu/drm/xe/xe_exec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_exec.c b/drivers/gpu/drm/xe/xe_exec.c
index 2d72cdec3a0b..95c0b21096f0 100644
--- a/drivers/gpu/drm/xe/xe_exec.c
+++ b/drivers/gpu/drm/xe/xe_exec.c
@@ -156,8 +156,8 @@ int xe_exec_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
 
 	vm = q->vm;
 
-	for (i = 0; i < args->num_syncs; i++) {
-		err = xe_sync_entry_parse(xe, xef, &syncs[num_syncs++],
+	for (i = 0; i < args->num_syncs; i++, num_syncs++) {
+		err = xe_sync_entry_parse(xe, xef, &syncs[i],
 					  &syncs_user[i], SYNC_PARSE_FLAG_EXEC |
 					  (xe_vm_in_lr_mode(vm) ?
 					   SYNC_PARSE_FLAG_LR_MODE : 0));
-- 
2.41.0


             reply	other threads:[~2024-07-11 20:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-11 20:48 Ashutosh Dixit [this message]
2024-07-11 21:13 ` ✓ CI.Patch_applied: success for drm/xe/exec: Fix minor bug related to xe_sync_entry_cleanup (rev2) Patchwork
2024-07-11 21:14 ` ✓ CI.checkpatch: " Patchwork
2024-07-11 21:15 ` ✓ CI.KUnit: " Patchwork
2024-07-11 21:27 ` ✓ CI.Build: " Patchwork
2024-07-11 21:29 ` ✓ CI.Hooks: " Patchwork
2024-07-11 21:31 ` ✓ CI.checksparse: " Patchwork
2024-07-11 22:01 ` ✓ CI.BAT: " Patchwork
2024-07-12  0:13 ` ✗ CI.FULL: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-07-11 20:45 [PATCH] drm/xe/exec: Fix minor bug related to xe_sync_entry_cleanup Ashutosh Dixit
2024-07-11 20:50 ` Matthew Brost

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=20240711204832.3724771-1-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@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