summaryrefslogtreecommitdiffstats
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)
downloadop-kernel-dev-e982262214674ce4d4a24ec6088134f4c641930a.zip
op-kernel-dev-e982262214674ce4d4a24ec6088134f4c641930a.tar.gz
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 803ee60..62018b3 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);
*
* First step to get VCE online, allocate memory and load the firmware
*/
-int amdgpu_vce_sw_init(struct amdgpu_device *adev)
+int amdgpu_vce_sw_init(struct amdgpu_device *adev, unsigned long size)
{
- unsigned long size;
const char *fw_name;
const struct common_firmware_header *hdr;
unsigned ucode_version, version_major, version_minor, binary_id;
@@ -136,8 +135,6 @@ int amdgpu_vce_sw_init(struct amdgpu_device *adev)
/* allocate firmware, stack and heap BO */
- size = AMDGPU_GPU_PAGE_ALIGN(le32_to_cpu(hdr->ucode_size_bytes)) +
- AMDGPU_VCE_STACK_SIZE + AMDGPU_VCE_HEAP_SIZE;
r = amdgpu_bo_create(adev, size, PAGE_SIZE, true,
AMDGPU_GEM_DOMAIN_VRAM, 0, NULL, &adev->vce.vcpu_bo);
if (r) {
OpenPOWER on IntegriCloud