mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 22:42:10 +00:00
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>
This commit is contained in:
parent
da5fd66c0e
commit
f8ddb39a15
2 changed files with 4 additions and 4 deletions
|
@ -146,7 +146,7 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev,
|
||||||
AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED |
|
AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED |
|
||||||
AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS |
|
AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS |
|
||||||
AMDGPU_GEM_CREATE_VRAM_CLEARED,
|
AMDGPU_GEM_CREATE_VRAM_CLEARED,
|
||||||
true, NULL, &gobj);
|
ttm_bo_type_kernel, NULL, &gobj);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("failed to allocate framebuffer (%d)\n", aligned_size);
|
pr_err("failed to allocate framebuffer (%d)\n", aligned_size);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
@ -265,7 +265,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
|
||||||
|
|
||||||
r = amdgpu_gem_object_create(adev, size, args->in.alignment,
|
r = amdgpu_gem_object_create(adev, size, args->in.alignment,
|
||||||
(u32)(0xffffffff & args->in.domains),
|
(u32)(0xffffffff & args->in.domains),
|
||||||
flags, false, resv, &gobj);
|
flags, ttm_bo_type_device, resv, &gobj);
|
||||||
if (flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID) {
|
if (flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID) {
|
||||||
if (!r) {
|
if (!r) {
|
||||||
struct amdgpu_bo *abo = gem_to_amdgpu_bo(gobj);
|
struct amdgpu_bo *abo = gem_to_amdgpu_bo(gobj);
|
||||||
|
@ -317,7 +317,7 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data,
|
||||||
|
|
||||||
/* create a gem object to contain this object in */
|
/* create a gem object to contain this object in */
|
||||||
r = amdgpu_gem_object_create(adev, args->size, 0, AMDGPU_GEM_DOMAIN_CPU,
|
r = amdgpu_gem_object_create(adev, args->size, 0, AMDGPU_GEM_DOMAIN_CPU,
|
||||||
0, 0, NULL, &gobj);
|
0, ttm_bo_type_device, NULL, &gobj);
|
||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
@ -766,7 +766,7 @@ int amdgpu_mode_dumb_create(struct drm_file *file_priv,
|
||||||
amdgpu_display_supported_domains(adev));
|
amdgpu_display_supported_domains(adev));
|
||||||
r = amdgpu_gem_object_create(adev, args->size, 0, domain,
|
r = amdgpu_gem_object_create(adev, args->size, 0, domain,
|
||||||
AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED,
|
AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED,
|
||||||
false, NULL, &gobj);
|
ttm_bo_type_device, NULL, &gobj);
|
||||||
if (r)
|
if (r)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue