diff options
author | Huang Rui <ray.huang@amd.com> | 2018-06-28 02:38:21 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-07-05 17:39:54 -0400 |
commit | f8ddb39a15100076884a625e97c91f3578c686f5 (patch) | |
tree | bbc75659b0b2db11fea3cb0098e60016549372ad | |
parent | da5fd66c0eb79e01501578bfc69352cc5e2e979d (diff) |
drm/amdgpu: fix the wrong type of gem object creation
We still use legacy type of gem_object_create, it should update to ttm_bo_type
now.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c index bc5fd8ebab5d..811c62927c38 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | |||
@@ -146,7 +146,7 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev, | |||
146 | AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | | 146 | AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | |
147 | AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS | | 147 | AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS | |
148 | AMDGPU_GEM_CREATE_VRAM_CLEARED, | 148 | AMDGPU_GEM_CREATE_VRAM_CLEARED, |
149 | true, NULL, &gobj); | 149 | ttm_bo_type_kernel, NULL, &gobj); |
150 | if (ret) { | 150 | if (ret) { |
151 | pr_err("failed to allocate framebuffer (%d)\n", aligned_size); | 151 | pr_err("failed to allocate framebuffer (%d)\n", aligned_size); |
152 | return -ENOMEM; | 152 | return -ENOMEM; |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 89743cdc1c2c..bcbdcf997d20 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |||
@@ -265,7 +265,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data, | |||
265 | 265 | ||
266 | r = amdgpu_gem_object_create(adev, size, args->in.alignment, | 266 | r = amdgpu_gem_object_create(adev, size, args->in.alignment, |
267 | (u32)(0xffffffff & args->in.domains), | 267 | (u32)(0xffffffff & args->in.domains), |
268 | flags, false, resv, &gobj); | 268 | flags, ttm_bo_type_device, resv, &gobj); |
269 | if (flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID) { | 269 | if (flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID) { |
270 | if (!r) { | 270 | if (!r) { |
271 | struct amdgpu_bo *abo = gem_to_amdgpu_bo(gobj); | 271 | struct amdgpu_bo *abo = gem_to_amdgpu_bo(gobj); |
@@ -317,7 +317,7 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data, | |||
317 | 317 | ||
318 | /* create a gem object to contain this object in */ | 318 | /* create a gem object to contain this object in */ |
319 | r = amdgpu_gem_object_create(adev, args->size, 0, AMDGPU_GEM_DOMAIN_CPU, | 319 | r = amdgpu_gem_object_create(adev, args->size, 0, AMDGPU_GEM_DOMAIN_CPU, |
320 | 0, 0, NULL, &gobj); | 320 | 0, ttm_bo_type_device, NULL, &gobj); |
321 | if (r) | 321 | if (r) |
322 | return r; | 322 | return r; |
323 | 323 | ||
@@ -766,7 +766,7 @@ int amdgpu_mode_dumb_create(struct drm_file *file_priv, | |||
766 | amdgpu_display_supported_domains(adev)); | 766 | amdgpu_display_supported_domains(adev)); |
767 | r = amdgpu_gem_object_create(adev, args->size, 0, domain, | 767 | r = amdgpu_gem_object_create(adev, args->size, 0, domain, |
768 | AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED, | 768 | AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED, |
769 | false, NULL, &gobj); | 769 | ttm_bo_type_device, NULL, &gobj); |
770 | if (r) | 770 | if (r) |
771 | return -ENOMEM; | 771 | return -ENOMEM; |
772 | 772 | ||