aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-12-14 07:23:57 -0500
committerAlex Deucher <alexander.deucher@amd.com>2016-08-08 11:32:16 -0400
commit78bbbd9c0fcde51b56c5bec99dd286cbad698712 (patch)
treebf60b7468051bcbf102e6d5c3fe731b2def9296f
parent7c204889dec5e745cdcc174388fa3aa824e75160 (diff)
drm/amdgpu: pin shared GWS, GDS and OA resources
They can't move anyway, but just to be clean here. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c21
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c21
2 files changed, 18 insertions, 24 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index d869d058ef24..f4fbec3e224e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -4465,24 +4465,21 @@ static int gfx_v7_0_sw_init(void *handle)
4465 } 4465 }
4466 4466
4467 /* reserve GDS, GWS and OA resource for gfx */ 4467 /* reserve GDS, GWS and OA resource for gfx */
4468 r = amdgpu_bo_create(adev, adev->gds.mem.gfx_partition_size, 4468 r = amdgpu_bo_create_kernel(adev, adev->gds.mem.gfx_partition_size,
4469 PAGE_SIZE, true, 4469 PAGE_SIZE, AMDGPU_GEM_DOMAIN_GDS,
4470 AMDGPU_GEM_DOMAIN_GDS, 0, 4470 &adev->gds.gds_gfx_bo, NULL, NULL);
4471 NULL, NULL, &adev->gds.gds_gfx_bo);
4472 if (r) 4471 if (r)
4473 return r; 4472 return r;
4474 4473
4475 r = amdgpu_bo_create(adev, adev->gds.gws.gfx_partition_size, 4474 r = amdgpu_bo_create_kernel(adev, adev->gds.gws.gfx_partition_size,
4476 PAGE_SIZE, true, 4475 PAGE_SIZE, AMDGPU_GEM_DOMAIN_GWS,
4477 AMDGPU_GEM_DOMAIN_GWS, 0, 4476 &adev->gds.gws_gfx_bo, NULL, NULL);
4478 NULL, NULL, &adev->gds.gws_gfx_bo);
4479 if (r) 4477 if (r)
4480 return r; 4478 return r;
4481 4479
4482 r = amdgpu_bo_create(adev, adev->gds.oa.gfx_partition_size, 4480 r = amdgpu_bo_create_kernel(adev, adev->gds.oa.gfx_partition_size,
4483 PAGE_SIZE, true, 4481 PAGE_SIZE, AMDGPU_GEM_DOMAIN_OA,
4484 AMDGPU_GEM_DOMAIN_OA, 0, 4482 &adev->gds.oa_gfx_bo, NULL, NULL);
4485 NULL, NULL, &adev->gds.oa_gfx_bo);
4486 if (r) 4483 if (r)
4487 return r; 4484 return r;
4488 4485
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index af0efa250d80..ce0929bbf2e7 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -2078,24 +2078,21 @@ static int gfx_v8_0_sw_init(void *handle)
2078 } 2078 }
2079 2079
2080 /* reserve GDS, GWS and OA resource for gfx */ 2080 /* reserve GDS, GWS and OA resource for gfx */
2081 r = amdgpu_bo_create(adev, adev->gds.mem.gfx_partition_size, 2081 r = amdgpu_bo_create_kernel(adev, adev->gds.mem.gfx_partition_size,
2082 PAGE_SIZE, true, 2082 PAGE_SIZE, AMDGPU_GEM_DOMAIN_GDS,
2083 AMDGPU_GEM_DOMAIN_GDS, 0, NULL, 2083 &adev->gds.gds_gfx_bo, NULL, NULL);
2084 NULL, &adev->gds.gds_gfx_bo);
2085 if (r) 2084 if (r)
2086 return r; 2085 return r;
2087 2086
2088 r = amdgpu_bo_create(adev, adev->gds.gws.gfx_partition_size, 2087 r = amdgpu_bo_create_kernel(adev, adev->gds.gws.gfx_partition_size,
2089 PAGE_SIZE, true, 2088 PAGE_SIZE, AMDGPU_GEM_DOMAIN_GWS,
2090 AMDGPU_GEM_DOMAIN_GWS, 0, NULL, 2089 &adev->gds.gws_gfx_bo, NULL, NULL);
2091 NULL, &adev->gds.gws_gfx_bo);
2092 if (r) 2090 if (r)
2093 return r; 2091 return r;
2094 2092
2095 r = amdgpu_bo_create(adev, adev->gds.oa.gfx_partition_size, 2093 r = amdgpu_bo_create_kernel(adev, adev->gds.oa.gfx_partition_size,
2096 PAGE_SIZE, true, 2094 PAGE_SIZE, AMDGPU_GEM_DOMAIN_OA,
2097 AMDGPU_GEM_DOMAIN_OA, 0, NULL, 2095 &adev->gds.oa_gfx_bo, NULL, NULL);
2098 NULL, &adev->gds.oa_gfx_bo);
2099 if (r) 2096 if (r)
2100 return r; 2097 return r;
2101 2098