diff options
author | Dave Airlie <airlied@redhat.com> | 2017-08-01 22:43:12 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-08-01 22:43:12 -0400 |
commit | dd24df657075fdf1e850612ea50634816f3c3581 (patch) | |
tree | 89c74a22b12ec66e53e4615fbdd85355ef7e4e9b /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | 12f8030e05c6c24b89b38838fe22257a9b5331f9 (diff) | |
parent | 799c7b20b26078e1e3b1c7d38e9ffce9bb56348d (diff) |
Merge branch 'drm-next-4.14' of git://people.freedesktop.org/~agd5f/linux into drm-next
- Stop reprogramming the MC, the vbios already does this in asic_init
- Reduce internal gart to 256M (this does not affect the ttm GTT pool size)
- Initial support for huge pages
- Rework bo migration logic
- Lots of improvements for vega10
- Powerplay fixes
- Additional Raven enablement
- SR-IOV improvements
- Bug fixes
- Code cleanup
* 'drm-next-4.14' of git://people.freedesktop.org/~agd5f/linux: (138 commits)
drm/amdgpu: fix header on gfx9 clear state
drm/amdgpu: reduce the time of reading VBIOS
drm/amdgpu/virtual_dce: Remove the rmmod error message
drm/amdgpu/gmc9: disable legacy vga features in gmc init
drm/amdgpu/gmc8: disable legacy vga features in gmc init
drm/amdgpu/gmc7: disable legacy vga features in gmc init
drm/amdgpu/gmc6: disable legacy vga features in gmc init (v2)
drm/radeon: Set depth on low mem to 16 bpp instead of 8 bpp
drm/amdgpu: fix the incorrect scratch reg number on gfx v6
drm/amdgpu: fix the incorrect scratch reg number on gfx v7
drm/amdgpu: fix the incorrect scratch reg number on gfx v8
drm/amdgpu: fix the incorrect scratch reg number on gfx v9
drm/amd/powerplay: add support for 3DP 4K@120Hz on vega10.
drm/amdgpu: enable huge page handling in the VM v5
drm/amdgpu: increase fragmentation size for Vega10 v2
drm/amdgpu: ttm_bind only when user needs gpu_addr in bo pin
drm/amdgpu: correct clock info for SRIOV
drm/amdgpu/gmc8: SRIOV need to program fb location
drm/amdgpu: disable firmware loading for psp v10
drm/amdgpu:fix gfx fence allocate size
...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 621f739103a6..917ac5e074a0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |||
@@ -49,7 +49,6 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size, | |||
49 | struct drm_gem_object **obj) | 49 | struct drm_gem_object **obj) |
50 | { | 50 | { |
51 | struct amdgpu_bo *robj; | 51 | struct amdgpu_bo *robj; |
52 | unsigned long max_size; | ||
53 | int r; | 52 | int r; |
54 | 53 | ||
55 | *obj = NULL; | 54 | *obj = NULL; |
@@ -58,17 +57,6 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size, | |||
58 | alignment = PAGE_SIZE; | 57 | alignment = PAGE_SIZE; |
59 | } | 58 | } |
60 | 59 | ||
61 | if (!(initial_domain & (AMDGPU_GEM_DOMAIN_GDS | AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA))) { | ||
62 | /* Maximum bo size is the unpinned gtt size since we use the gtt to | ||
63 | * handle vram to system pool migrations. | ||
64 | */ | ||
65 | max_size = adev->mc.gtt_size - adev->gart_pin_size; | ||
66 | if (size > max_size) { | ||
67 | DRM_DEBUG("Allocation size %ldMb bigger than %ldMb limit\n", | ||
68 | size >> 20, max_size >> 20); | ||
69 | return -ENOMEM; | ||
70 | } | ||
71 | } | ||
72 | retry: | 60 | retry: |
73 | r = amdgpu_bo_create(adev, size, alignment, kernel, initial_domain, | 61 | r = amdgpu_bo_create(adev, size, alignment, kernel, initial_domain, |
74 | flags, NULL, NULL, &robj); | 62 | flags, NULL, NULL, &robj); |
@@ -784,6 +772,7 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data) | |||
784 | unsigned domain; | 772 | unsigned domain; |
785 | const char *placement; | 773 | const char *placement; |
786 | unsigned pin_count; | 774 | unsigned pin_count; |
775 | uint64_t offset; | ||
787 | 776 | ||
788 | domain = amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type); | 777 | domain = amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type); |
789 | switch (domain) { | 778 | switch (domain) { |
@@ -798,9 +787,12 @@ static int amdgpu_debugfs_gem_bo_info(int id, void *ptr, void *data) | |||
798 | placement = " CPU"; | 787 | placement = " CPU"; |
799 | break; | 788 | break; |
800 | } | 789 | } |
801 | seq_printf(m, "\t0x%08x: %12ld byte %s @ 0x%010Lx", | 790 | seq_printf(m, "\t0x%08x: %12ld byte %s", |
802 | id, amdgpu_bo_size(bo), placement, | 791 | id, amdgpu_bo_size(bo), placement); |
803 | amdgpu_bo_gpu_offset(bo)); | 792 | |
793 | offset = ACCESS_ONCE(bo->tbo.mem.start); | ||
794 | if (offset != AMDGPU_BO_INVALID_OFFSET) | ||
795 | seq_printf(m, " @ 0x%010Lx", offset); | ||
804 | 796 | ||
805 | pin_count = ACCESS_ONCE(bo->pin_count); | 797 | pin_count = ACCESS_ONCE(bo->pin_count); |
806 | if (pin_count) | 798 | if (pin_count) |