aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
diff options
context:
space:
mode:
authorLeo Liu <leo.liu@amd.com>2015-05-06 14:31:27 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-06-03 21:03:47 -0400
commite982262214674ce4d4a24ec6088134f4c641930a (patch)
tree1954c3dff6b687091ee680738380ee159c7c9601 /drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
parent15a16ff6065b8d51e27ebe24c0393195ab817f27 (diff)
drm/amdgpu: recalculate VCE firmware BO size
Firmware required BO size changes in terms of ASIC family Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index 803ee601c399..62018b37273e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -68,9 +68,8 @@ static void amdgpu_vce_idle_work_handler(struct work_struct *work);
68 * 68 *
69 * First step to get VCE online, allocate memory and load the firmware 69 * First step to get VCE online, allocate memory and load the firmware
70 */ 70 */
71int amdgpu_vce_sw_init(struct amdgpu_device *adev) 71int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
72{ 72{
73 unsigned long size;
74 const char *fw_name; 73 const char *fw_name;
75 const struct common_firmware_header *hdr; 74 const struct common_firmware_header *hdr;
76 unsigned ucode_version, version_major, version_minor, binary_id; 75 unsigned ucode_version, version_major, version_minor, binary_id;
@@ -136,8 +135,6 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev)
136 135
137 /* allocate firmware, stack and heap BO */ 136 /* allocate firmware, stack and heap BO */
138 137
139 size = AMDGPU_GPU_PAGE_ALIGN(le32_to_cpu(hdr->ucode_size_bytes)) +
140 AMDGPU_VCE_STACK_SIZE + AMDGPU_VCE_HEAP_SIZE;
141 r = amdgpu_bo_create(adev, size, PAGE_SIZE, true, 138 r = amdgpu_bo_create(adev, size, PAGE_SIZE, true,
142 AMDGPU_GEM_DOMAIN_VRAM, 0, NULL, &adev->vce.vcpu_bo); 139 AMDGPU_GEM_DOMAIN_VRAM, 0, NULL, &adev->vce.vcpu_bo);
143 if (r) { 140 if (r) {