diff options
author | Ken Wang <Qingqing.Wang@amd.com> | 2015-06-03 12:47:54 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-06-04 04:04:02 +0300 |
commit | a101a8995ab8072125d0bb4d95425c9fb37ff809 (patch) | |
tree | db745acda68a5b1d9f7c3f7207e72291659b5b7a /drivers/gpu/drm | |
parent | 32bf7106e072b59cade754062ed86023309f50d9 (diff) | |
download | linux-a101a8995ab8072125d0bb4d95425c9fb37ff809.tar.xz |
drm/amdgpu add ce_ram_size for interface query
Add a query for the CE ram size. User mode drivers
will want to use this to determine how much size
of the cache on the CE.
Signed-off-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewd-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 |
4 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 4300e3d4b1cd..6c99b7560a27 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -1136,6 +1136,8 @@ struct amdgpu_gfx { uint32_t gfx_current_status; /* sync signal for const engine */ unsigned ce_sync_offs; + /* ce ram size*/ + unsigned ce_ram_size; }; int amdgpu_ib_get(struct amdgpu_ring *ring, struct amdgpu_vm *vm, diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 3c182b6c5a27..9ede2446dcd6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c @@ -441,6 +441,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file amdgpu_asic_get_cu_info(adev, &cu_info); dev_info.cu_active_number = cu_info.number; dev_info.cu_ao_mask = cu_info.ao_cu_mask; + dev_info.ce_ram_size = adev->gfx.ce_ram_size; memcpy(&dev_info.cu_bitmap[0], &cu_info.bitmap[0], sizeof(cu_info.bitmap)); return copy_to_user(out, &dev_info, diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c index ed2f35de1d4f..faa39b38f0f3 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c @@ -4820,6 +4820,8 @@ static int gfx_v7_0_hw_init(void *handle) if (r) return r; + adev->gfx.ce_ram_size = 0x8000; + return r; } diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index ffdba1965029..1895de433446 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c @@ -895,6 +895,8 @@ static int gfx_v8_0_sw_init(void *handle) if (r) return r; + adev->gfx.ce_ram_size = 0x8000; + return 0; } |