aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorLeo Liu <leo.liu@amd.com>2017-05-11 16:27:33 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-05-24 17:41:27 -0400
commit95aa13f6b196d3b8e1c694638002c18c07cdccab (patch)
tree0c14b7839a211b6d513a05ffc738a502a9fc1e79 /drivers/gpu/drm/amd/amdgpu
parent3ea975e4ff959e9a4fafa429ed2481f79ffecb90 (diff)
drm/amdgpu: move amdgpu_vcn structure to vcn header
Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h26
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h22
2 files changed, 23 insertions, 25 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 68817e60e787..8274d8e23e98 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -62,6 +62,7 @@
62#include "amdgpu_acp.h" 62#include "amdgpu_acp.h"
63#include "amdgpu_uvd.h" 63#include "amdgpu_uvd.h"
64#include "amdgpu_vce.h" 64#include "amdgpu_vce.h"
65#include "amdgpu_vcn.h"
65 66
66#include "gpu_scheduler.h" 67#include "gpu_scheduler.h"
67#include "amdgpu_virt.h" 68#include "amdgpu_virt.h"
@@ -1181,31 +1182,6 @@ void amdgpu_wb_free_64bit(struct amdgpu_device *adev, u32 wb);
1181void amdgpu_get_pcie_info(struct amdgpu_device *adev); 1182void amdgpu_get_pcie_info(struct amdgpu_device *adev);
1182 1183
1183/* 1184/*
1184 * VCN
1185 */
1186#define AMDGPU_VCN_STACK_SIZE (200*1024)
1187#define AMDGPU_VCN_HEAP_SIZE (256*1024)
1188#define AMDGPU_VCN_SESSION_SIZE (50*1024)
1189#define AMDGPU_VCN_FIRMWARE_OFFSET 256
1190#define AMDGPU_VCN_MAX_ENC_RINGS 3
1191
1192struct amdgpu_vcn {
1193 struct amdgpu_bo *vcpu_bo;
1194 void *cpu_addr;
1195 uint64_t gpu_addr;
1196 unsigned fw_version;
1197 void *saved_bo;
1198 struct delayed_work idle_work;
1199 const struct firmware *fw; /* VCN firmware */
1200 struct amdgpu_ring ring_dec;
1201 struct amdgpu_ring ring_enc[AMDGPU_VCN_MAX_ENC_RINGS];
1202 struct amdgpu_irq_src irq;
1203 struct amd_sched_entity entity_dec;
1204 struct amd_sched_entity entity_enc;
1205 uint32_t srbm_soft_reset;
1206};
1207
1208/*
1209 * SDMA 1185 * SDMA
1210 */ 1186 */
1211struct amdgpu_sdma_instance { 1187struct amdgpu_sdma_instance {
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h
index ec4d7ca7ed61..2fd22a5d23b4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h
@@ -24,6 +24,28 @@
24#ifndef __AMDGPU_VCN_H__ 24#ifndef __AMDGPU_VCN_H__
25#define __AMDGPU_VCN_H__ 25#define __AMDGPU_VCN_H__
26 26
27#define AMDGPU_VCN_STACK_SIZE (200*1024)
28#define AMDGPU_VCN_HEAP_SIZE (256*1024)
29#define AMDGPU_VCN_SESSION_SIZE (50*1024)
30#define AMDGPU_VCN_FIRMWARE_OFFSET 256
31#define AMDGPU_VCN_MAX_ENC_RINGS 3
32
33struct amdgpu_vcn {
34 struct amdgpu_bo *vcpu_bo;
35 void *cpu_addr;
36 uint64_t gpu_addr;
37 unsigned fw_version;
38 void *saved_bo;
39 struct delayed_work idle_work;
40 const struct firmware *fw; /* VCN firmware */
41 struct amdgpu_ring ring_dec;
42 struct amdgpu_ring ring_enc[AMDGPU_VCN_MAX_ENC_RINGS];
43 struct amdgpu_irq_src irq;
44 struct amd_sched_entity entity_dec;
45 struct amd_sched_entity entity_enc;
46 uint32_t srbm_soft_reset;
47};
48
27int amdgpu_vcn_sw_init(struct amdgpu_device *adev); 49int amdgpu_vcn_sw_init(struct amdgpu_device *adev);
28int amdgpu_vcn_sw_fini(struct amdgpu_device *adev); 50int amdgpu_vcn_sw_fini(struct amdgpu_device *adev);
29int amdgpu_vcn_suspend(struct amdgpu_device *adev); 51int amdgpu_vcn_suspend(struct amdgpu_device *adev);