Commit 6d7d9c5a authored by Kent Russell's avatar Kent Russell Committed by Alex Deucher

drm/amdgpu: Fix preferred typo

Change "prefered" to "preferred"
Signed-off-by: default avatarKent Russell <kent.russell@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4aa5b92f
...@@ -156,11 +156,11 @@ static int amdgpu_bo_list_set(struct amdgpu_device *adev, ...@@ -156,11 +156,11 @@ static int amdgpu_bo_list_set(struct amdgpu_device *adev,
entry->tv.bo = &entry->robj->tbo; entry->tv.bo = &entry->robj->tbo;
entry->tv.shared = !entry->robj->prime_shared_count; entry->tv.shared = !entry->robj->prime_shared_count;
if (entry->robj->prefered_domains == AMDGPU_GEM_DOMAIN_GDS) if (entry->robj->preferred_domains == AMDGPU_GEM_DOMAIN_GDS)
gds_obj = entry->robj; gds_obj = entry->robj;
if (entry->robj->prefered_domains == AMDGPU_GEM_DOMAIN_GWS) if (entry->robj->preferred_domains == AMDGPU_GEM_DOMAIN_GWS)
gws_obj = entry->robj; gws_obj = entry->robj;
if (entry->robj->prefered_domains == AMDGPU_GEM_DOMAIN_OA) if (entry->robj->preferred_domains == AMDGPU_GEM_DOMAIN_OA)
oa_obj = entry->robj; oa_obj = entry->robj;
total_size += amdgpu_bo_size(entry->robj); total_size += amdgpu_bo_size(entry->robj);
......
...@@ -166,7 +166,7 @@ static int amdgpu_cgs_gmap_gpu_mem(struct cgs_device *cgs_device, cgs_handle_t h ...@@ -166,7 +166,7 @@ static int amdgpu_cgs_gmap_gpu_mem(struct cgs_device *cgs_device, cgs_handle_t h
r = amdgpu_bo_reserve(obj, true); r = amdgpu_bo_reserve(obj, true);
if (unlikely(r != 0)) if (unlikely(r != 0))
return r; return r;
r = amdgpu_bo_pin_restricted(obj, obj->prefered_domains, r = amdgpu_bo_pin_restricted(obj, obj->preferred_domains,
min_offset, max_offset, mcaddr); min_offset, max_offset, mcaddr);
amdgpu_bo_unreserve(obj); amdgpu_bo_unreserve(obj);
return r; return r;
......
...@@ -348,11 +348,11 @@ static int amdgpu_cs_bo_validate(struct amdgpu_cs_parser *p, ...@@ -348,11 +348,11 @@ static int amdgpu_cs_bo_validate(struct amdgpu_cs_parser *p,
* that. * that.
*/ */
if (p->bytes_moved_vis < p->bytes_moved_vis_threshold) if (p->bytes_moved_vis < p->bytes_moved_vis_threshold)
domain = bo->prefered_domains; domain = bo->preferred_domains;
else else
domain = bo->allowed_domains; domain = bo->allowed_domains;
} else { } else {
domain = bo->prefered_domains; domain = bo->preferred_domains;
} }
} else { } else {
domain = bo->allowed_domains; domain = bo->allowed_domains;
......
...@@ -306,7 +306,7 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data, ...@@ -306,7 +306,7 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data,
return r; return r;
bo = gem_to_amdgpu_bo(gobj); bo = gem_to_amdgpu_bo(gobj);
bo->prefered_domains = AMDGPU_GEM_DOMAIN_GTT; bo->preferred_domains = AMDGPU_GEM_DOMAIN_GTT;
bo->allowed_domains = AMDGPU_GEM_DOMAIN_GTT; bo->allowed_domains = AMDGPU_GEM_DOMAIN_GTT;
r = amdgpu_ttm_tt_set_userptr(bo->tbo.ttm, args->addr, args->flags); r = amdgpu_ttm_tt_set_userptr(bo->tbo.ttm, args->addr, args->flags);
if (r) if (r)
...@@ -693,7 +693,7 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data, ...@@ -693,7 +693,7 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
info.bo_size = robj->gem_base.size; info.bo_size = robj->gem_base.size;
info.alignment = robj->tbo.mem.page_alignment << PAGE_SHIFT; info.alignment = robj->tbo.mem.page_alignment << PAGE_SHIFT;
info.domains = robj->prefered_domains; info.domains = robj->preferred_domains;
info.domain_flags = robj->flags; info.domain_flags = robj->flags;
amdgpu_bo_unreserve(robj); amdgpu_bo_unreserve(robj);
if (copy_to_user(out, &info, sizeof(info))) if (copy_to_user(out, &info, sizeof(info)))
...@@ -711,10 +711,10 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data, ...@@ -711,10 +711,10 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
amdgpu_bo_unreserve(robj); amdgpu_bo_unreserve(robj);
break; break;
} }
robj->prefered_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM | robj->preferred_domains = args->value & (AMDGPU_GEM_DOMAIN_VRAM |
AMDGPU_GEM_DOMAIN_GTT | AMDGPU_GEM_DOMAIN_GTT |
AMDGPU_GEM_DOMAIN_CPU); AMDGPU_GEM_DOMAIN_CPU);
robj->allowed_domains = robj->prefered_domains; robj->allowed_domains = robj->preferred_domains;
if (robj->allowed_domains == AMDGPU_GEM_DOMAIN_VRAM) if (robj->allowed_domains == AMDGPU_GEM_DOMAIN_VRAM)
robj->allowed_domains |= AMDGPU_GEM_DOMAIN_GTT; robj->allowed_domains |= AMDGPU_GEM_DOMAIN_GTT;
......
...@@ -391,13 +391,13 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev, ...@@ -391,13 +391,13 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev,
} }
INIT_LIST_HEAD(&bo->shadow_list); INIT_LIST_HEAD(&bo->shadow_list);
INIT_LIST_HEAD(&bo->va); INIT_LIST_HEAD(&bo->va);
bo->prefered_domains = domain & (AMDGPU_GEM_DOMAIN_VRAM | bo->preferred_domains = domain & (AMDGPU_GEM_DOMAIN_VRAM |
AMDGPU_GEM_DOMAIN_GTT | AMDGPU_GEM_DOMAIN_GTT |
AMDGPU_GEM_DOMAIN_CPU | AMDGPU_GEM_DOMAIN_CPU |
AMDGPU_GEM_DOMAIN_GDS | AMDGPU_GEM_DOMAIN_GDS |
AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_GWS |
AMDGPU_GEM_DOMAIN_OA); AMDGPU_GEM_DOMAIN_OA);
bo->allowed_domains = bo->prefered_domains; bo->allowed_domains = bo->preferred_domains;
if (!kernel && bo->allowed_domains == AMDGPU_GEM_DOMAIN_VRAM) if (!kernel && bo->allowed_domains == AMDGPU_GEM_DOMAIN_VRAM)
bo->allowed_domains |= AMDGPU_GEM_DOMAIN_GTT; bo->allowed_domains |= AMDGPU_GEM_DOMAIN_GTT;
...@@ -606,7 +606,7 @@ int amdgpu_bo_validate(struct amdgpu_bo *bo) ...@@ -606,7 +606,7 @@ int amdgpu_bo_validate(struct amdgpu_bo *bo)
if (bo->pin_count) if (bo->pin_count)
return 0; return 0;
domain = bo->prefered_domains; domain = bo->preferred_domains;
retry: retry:
amdgpu_ttm_placement_from_domain(bo, domain); amdgpu_ttm_placement_from_domain(bo, domain);
......
...@@ -65,7 +65,7 @@ struct amdgpu_bo_va { ...@@ -65,7 +65,7 @@ struct amdgpu_bo_va {
struct amdgpu_bo { struct amdgpu_bo {
/* Protected by tbo.reserved */ /* Protected by tbo.reserved */
u32 prefered_domains; u32 preferred_domains;
u32 allowed_domains; u32 allowed_domains;
struct ttm_place placements[AMDGPU_GEM_DOMAIN_MAX + 1]; struct ttm_place placements[AMDGPU_GEM_DOMAIN_MAX + 1];
struct ttm_placement placement; struct ttm_placement placement;
......
...@@ -105,12 +105,12 @@ TRACE_EVENT(amdgpu_bo_create, ...@@ -105,12 +105,12 @@ TRACE_EVENT(amdgpu_bo_create,
__entry->bo = bo; __entry->bo = bo;
__entry->pages = bo->tbo.num_pages; __entry->pages = bo->tbo.num_pages;
__entry->type = bo->tbo.mem.mem_type; __entry->type = bo->tbo.mem.mem_type;
__entry->prefer = bo->prefered_domains; __entry->prefer = bo->preferred_domains;
__entry->allow = bo->allowed_domains; __entry->allow = bo->allowed_domains;
__entry->visible = bo->flags; __entry->visible = bo->flags;
), ),
TP_printk("bo=%p, pages=%u, type=%d, prefered=%d, allowed=%d, visible=%d", TP_printk("bo=%p, pages=%u, type=%d, preferred=%d, allowed=%d, visible=%d",
__entry->bo, __entry->pages, __entry->type, __entry->bo, __entry->pages, __entry->type,
__entry->prefer, __entry->allow, __entry->visible) __entry->prefer, __entry->allow, __entry->visible)
); );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment