Skip to contentSkip to conversation

drm/amd/amdgpu: if visible VRAM allocation fail, fall back to invisible try again

PATCH In review Roger He 2 participants 2 messages Nov 10, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Roger He

author
#0 lore raw

PATCH 1/1 drm/amd/amdgpu: if visible VRAM allocation fail, fall back to invisible try again

Change-Id Ib30efa5f007fce12a85a66722a8c9f76496f2dec
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +5 -0
index fb72edc..a1eaabb 100644
@@ -63,6 +63,11 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
 			     flags, NULL, resv, 0, &bo);
 	if (r) {
 		if (r != -ERESTARTSYS) {
+			if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) {
+				flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
+				goto retry;
+			}
+
 			if (initial_domain == AMDGPU_GEM_DOMAIN_VRAM) {
 				initial_domain |= AMDGPU_GEM_DOMAIN_GTT;
 				goto retry;
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1510316253-2874-1-git-send-email-Hongbo.He-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 10.11.2017 um 13:17 schrieb Roger He:

Quoted 2 lines
Change-Id Ib30efa5f007fce12a85a66722a8c9f76496f2dec

Yep, exactly what I had in mind during our discussion as well.

Patch is Reviewed-by: Christian König <[email protected]>.

Thanks for taking care of this,
Christian.

Quoted 10 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +0 -0
index fb72edc..a1eaabb 100644
@@ -63,6 +63,11 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
  			     flags, NULL, resv, 0, &bo);

drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size, · line 73

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +5 -0
  	if (r) {
  		if (r != -ERESTARTSYS) {
+			if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) {
+				flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
+				goto retry;
+			}
+
  			if (initial_domain == AMDGPU_GEM_DOMAIN_VRAM) {
  				initial_domain |= AMDGPU_GEM_DOMAIN_GTT;
  				goto retry;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx