All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junwei Zhang <Jerry.Zhang@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: <michel.daenzer@amd.com>, <christian.koenig@amd.com>,
	<stable@vger.kernel.org>, Junwei Zhang <Jerry.Zhang@amd.com>
Subject: [PATCH] drm/amdgpu: Reserve fence slots for command submission
Date: Wed, 4 Jul 2018 11:02:38 +0800	[thread overview]
Message-ID: <1530673358-20219-1-git-send-email-Jerry.Zhang@amd.com> (raw)

From: Michel Dänzer <michel.daenzer@amd.com>

Without this, there could not be enough slots, which could trigger the
BUG_ON in reservation_object_add_shared_fence.

v2:
* Jump to the error label instead of returning directly (Jerry Zhang)
v3:
* Reserve slots for command submission after VM updates (Christian König)

Cc: stable@vger.kernel.org
Bugzilla: https://bugs.freedesktop.org/106418
Reported-by: mikhail.v.gavrilov@gmail.com
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 7a625f3..1bc0281 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -928,6 +928,10 @@ static int amdgpu_cs_ib_vm_chunk(struct amdgpu_device *adev,
 		r = amdgpu_bo_vm_update_pte(p);
 		if (r)
 			return r;
+
+		r = reservation_object_reserve_shared(vm->root.base.bo->tbo.resv);
+		if (r)
+			return r;
 	}
 
 	return amdgpu_cs_sync_rings(p);
-- 
1.9.1

WARNING: multiple messages have this Message-ID (diff)
From: Junwei Zhang <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Junwei Zhang <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>,
	michel.daenzer-5C7GfCeVMHo@public.gmane.org,
	christian.koenig-5C7GfCeVMHo@public.gmane.org,
	stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] drm/amdgpu: Reserve fence slots for command submission
Date: Wed, 4 Jul 2018 11:02:38 +0800	[thread overview]
Message-ID: <1530673358-20219-1-git-send-email-Jerry.Zhang@amd.com> (raw)

From: Michel Dänzer <michel.daenzer@amd.com>

Without this, there could not be enough slots, which could trigger the
BUG_ON in reservation_object_add_shared_fence.

v2:
* Jump to the error label instead of returning directly (Jerry Zhang)
v3:
* Reserve slots for command submission after VM updates (Christian König)

Cc: stable@vger.kernel.org
Bugzilla: https://bugs.freedesktop.org/106418
Reported-by: mikhail.v.gavrilov@gmail.com
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 7a625f3..1bc0281 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -928,6 +928,10 @@ static int amdgpu_cs_ib_vm_chunk(struct amdgpu_device *adev,
 		r = amdgpu_bo_vm_update_pte(p);
 		if (r)
 			return r;
+
+		r = reservation_object_reserve_shared(vm->root.base.bo->tbo.resv);
+		if (r)
+			return r;
 	}
 
 	return amdgpu_cs_sync_rings(p);
-- 
1.9.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

             reply	other threads:[~2018-07-04  3:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04  3:02 Junwei Zhang [this message]
2018-07-04  3:02 ` [PATCH] drm/amdgpu: Reserve fence slots for command submission Junwei Zhang
2018-07-04  6:34 ` Christian König
2018-07-04  6:55   ` Zhang, Jerry (Junwei)
2018-07-04  6:55     ` Zhang, Jerry (Junwei)
     [not found]     ` <5B3C6F7B.80901-5C7GfCeVMHo@public.gmane.org>
2018-07-04  7:21       ` Michel Dänzer
     [not found]         ` <9fd5d981-3725-289b-94ff-73da521e3061-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-07-04  7:57           ` Zhang, Jerry (Junwei)
     [not found]             ` <5B3C7DE6.3020405-5C7GfCeVMHo@public.gmane.org>
2018-07-04  9:01               ` Christian König
     [not found]                 ` <9211988c-b543-e0b1-7598-59cad147fb28-5C7GfCeVMHo@public.gmane.org>
2018-07-04  9:15                   ` Michel Dänzer
     [not found]                     ` <6a23190d-dafe-956d-793e-c0100f3d405c-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-07-04  9:23                       ` Zhang, Jerry (Junwei)
2018-07-04 14:00               ` Michel Dänzer
2018-07-04  9:02           ` Christian König

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=1530673358-20219-1-git-send-email-Jerry.Zhang@amd.com \
    --to=jerry.zhang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=michel.daenzer@amd.com \
    --cc=stable@vger.kernel.org \
    /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.