diff options
author | Dave Airlie <airlied@redhat.com> | 2017-08-17 15:30:53 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-08-17 15:30:53 -0400 |
commit | 2040c47361646d18b9832fd930d2a025da002a57 (patch) | |
tree | 8584015447c6863a95637b0b0a3f4af1170ffc19 /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
parent | 3154b133711f70bb50f513773947a8a647d24310 (diff) | |
parent | 37899a5254917e17418bbb23086d55e38faaa659 (diff) |
Merge branch 'drm-next-4.14' of git://people.freedesktop.org/~agd5f/linux into drm-next
More features for 4.14. Nothing too major here. I have a few more additional
patches for large page support in vega10 among other things, but they require
some resevation object patches from drm-misc-next, so I'll send that request
once you've pulled the latest drm-misc-next. Highlights:
- Fixes for ACP audio on stoney
- SR-IOV fixes for vega10
- various powerplay fixes
- lots of code clean up
* 'drm-next-4.14' of git://people.freedesktop.org/~agd5f/linux: (62 commits)
drm/amdgpu/gfx7: fix function name
drm/amd/amdgpu: Disabling Power Gating for Stoney platform
drm/amd/amdgpu: Added a quirk for Stoney platform
drm/amdgpu: jt_size was wrongly counted twice
drm/amdgpu: fix missing endian-safe guard
drm/amdgpu: ignore digest_size when loading sdma fw for raven
drm/amdgpu: Uninitialized variable in amdgpu_ttm_backend_bind()
drm/amd/powerplay: fix coding style in hwmgr.c
drm/amd/powerplay: refine dmesg info under powerplay.
drm/amdgpu: don't finish the ring if not initialized
drm/radeon: Fix preferred typo
drm/amdgpu: Fix preferred typo
drm/radeon: Fix stolen typo
drm/amdgpu: Fix stolen typo
drm/amd/powerplay: fix coccinelle warnings in vega10_hwmgr.c
drm/amdgpu: set gfx_v9_0_ip_funcs as static
drm/radeon: switch to drm_*{get,put} helpers
drm/amdgpu: switch to drm_*{get,put} helpers
drm/amd/powerplay: add CZ profile support
drm/amd/powerplay: fix PSI not enabled by kmd
...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 33789510e663..c05479ec825a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
@@ -54,7 +54,7 @@ static int amdgpu_cs_user_fence_chunk(struct amdgpu_cs_parser *p, | |||
54 | 54 | ||
55 | *offset = data->offset; | 55 | *offset = data->offset; |
56 | 56 | ||
57 | drm_gem_object_unreference_unlocked(gobj); | 57 | drm_gem_object_put_unlocked(gobj); |
58 | 58 | ||
59 | if (amdgpu_ttm_tt_get_usermm(p->uf_entry.robj->tbo.ttm)) { | 59 | if (amdgpu_ttm_tt_get_usermm(p->uf_entry.robj->tbo.ttm)) { |
60 | amdgpu_bo_unref(&p->uf_entry.robj); | 60 | amdgpu_bo_unref(&p->uf_entry.robj); |
@@ -90,7 +90,7 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data) | |||
90 | } | 90 | } |
91 | 91 | ||
92 | /* get chunks */ | 92 | /* get chunks */ |
93 | chunk_array_user = (uint64_t __user *)(uintptr_t)(cs->in.chunks); | 93 | chunk_array_user = u64_to_user_ptr(cs->in.chunks); |
94 | if (copy_from_user(chunk_array, chunk_array_user, | 94 | if (copy_from_user(chunk_array, chunk_array_user, |
95 | sizeof(uint64_t)*cs->in.num_chunks)) { | 95 | sizeof(uint64_t)*cs->in.num_chunks)) { |
96 | ret = -EFAULT; | 96 | ret = -EFAULT; |
@@ -110,7 +110,7 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data) | |||
110 | struct drm_amdgpu_cs_chunk user_chunk; | 110 | struct drm_amdgpu_cs_chunk user_chunk; |
111 | uint32_t __user *cdata; | 111 | uint32_t __user *cdata; |
112 | 112 | ||
113 | chunk_ptr = (void __user *)(uintptr_t)chunk_array[i]; | 113 | chunk_ptr = u64_to_user_ptr(chunk_array[i]); |
114 | if (copy_from_user(&user_chunk, chunk_ptr, | 114 | if (copy_from_user(&user_chunk, chunk_ptr, |
115 | sizeof(struct drm_amdgpu_cs_chunk))) { | 115 | sizeof(struct drm_amdgpu_cs_chunk))) { |
116 | ret = -EFAULT; | 116 | ret = -EFAULT; |
@@ -121,7 +121,7 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data) | |||
121 | p->chunks[i].length_dw = user_chunk.length_dw; | 121 | p->chunks[i].length_dw = user_chunk.length_dw; |
122 | 122 | ||
123 | size = p->chunks[i].length_dw; | 123 | size = p->chunks[i].length_dw; |
124 | cdata = (void __user *)(uintptr_t)user_chunk.chunk_data; | 124 | cdata = u64_to_user_ptr(user_chunk.chunk_data); |
125 | 125 | ||
126 | p->chunks[i].kdata = kvmalloc_array(size, sizeof(uint32_t), GFP_KERNEL); | 126 | p->chunks[i].kdata = kvmalloc_array(size, sizeof(uint32_t), GFP_KERNEL); |
127 | if (p->chunks[i].kdata == NULL) { | 127 | if (p->chunks[i].kdata == NULL) { |
@@ -348,11 +348,11 @@ static int amdgpu_cs_bo_validate(struct amdgpu_cs_parser *p, | |||
348 | * that. | 348 | * that. |
349 | */ | 349 | */ |
350 | if (p->bytes_moved_vis < p->bytes_moved_vis_threshold) | 350 | if (p->bytes_moved_vis < p->bytes_moved_vis_threshold) |
351 | domain = bo->prefered_domains; | 351 | domain = bo->preferred_domains; |
352 | else | 352 | else |
353 | domain = bo->allowed_domains; | 353 | domain = bo->allowed_domains; |
354 | } else { | 354 | } else { |
355 | domain = bo->prefered_domains; | 355 | domain = bo->preferred_domains; |
356 | } | 356 | } |
357 | } else { | 357 | } else { |
358 | domain = bo->allowed_domains; | 358 | domain = bo->allowed_domains; |
@@ -1437,7 +1437,7 @@ int amdgpu_cs_wait_fences_ioctl(struct drm_device *dev, void *data, | |||
1437 | if (fences == NULL) | 1437 | if (fences == NULL) |
1438 | return -ENOMEM; | 1438 | return -ENOMEM; |
1439 | 1439 | ||
1440 | fences_user = (void __user *)(uintptr_t)(wait->in.fences); | 1440 | fences_user = u64_to_user_ptr(wait->in.fences); |
1441 | if (copy_from_user(fences, fences_user, | 1441 | if (copy_from_user(fences, fences_user, |
1442 | sizeof(struct drm_amdgpu_fence) * fence_count)) { | 1442 | sizeof(struct drm_amdgpu_fence) * fence_count)) { |
1443 | r = -EFAULT; | 1443 | r = -EFAULT; |