Hawking Zhang
7596ab68ff
drm/amd/gmc9: rename AMDGPU_PTE_MTYPE to AMDGPU_PTE_MTYPE_VG10
...
To differentiate the mtypes across asics.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:35:29 -05:00
Hawking Zhang
c304b9e519
drm/amdgpu: correct pte mtype field for navi
...
The MTYPE filed moves from bits 58:57 to 50:48 for NV10
And the size of MTYPE field is now 3bits
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:35:29 -05:00
Jack Xiao
367adb2ad5
drm/amdgpu/athub2: enable athub2 clock gating
...
Enable athub2 clock gating and light sleep
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:35:29 -05:00
Hawking Zhang
9faa494e2f
drm/amdgpu: add flag to support IH clock gating
...
Add new flag for IH (interrupt handler) clockgating.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:25:52 -05:00
Hawking Zhang
714ff85251
drm/amdgpu: add new HDP CG flags
...
HDP 5.0 supports SRAM power gating. all the LS (Light Sleep)/
DS (Deep Sleep)/SD (Shut Down) modes are supported. However,
only one of these modes can be enabled at one time.
There is no dynamic power mode switch support. clock/power gating
has to be disabled before making any power mode change.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:25:46 -05:00
Hawking Zhang
54fc447279
drm/amdgpu: create mqd for gfx queues on navi10
...
mqd is the memory queue descriptor for gfx and compute.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Jack Xiao <jack.xiao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:24:54 -05:00
Jack Xiao
5bfca06928
drm/amdgpu: enable async gfx ring by default
...
VDDGFX requires gfx queue to be installed via MAP_QUEUES packet.
Hence, enable async gfx ring by default.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:24:54 -05:00
Hawking Zhang
51bcce4621
drm/amdgpu: add module parameter for async_gfx_ring enablement
...
0 means disable async_gfx_ring and is the default setting
1 means enable async_gfx_ring
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Jack Xiao <jack.xiao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:24:54 -05:00
Hawking Zhang
53b2fe415f
drm/amdgpu: enable gfx eop interrupt per gfx pipe
...
Navi10 has 2 gfx pipe and need to enable gfx eop interrupt
per pipe, instead of enable eop int for all gfx pipes at one
time.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:24:54 -05:00
Jack Xiao
1919196165
drm/amdgpu/gfx10: add special unmap_queues packet for preemption
...
CP introduced a special unmap_queues packet for gfx preemtion.
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:24:54 -05:00
Hawking Zhang
849aca9f9c
drm/amdgpu: Move common code to amdgpu_gfx.c
...
move common code to amdgpu_gfx_enable_kcq,so
this function can be shared with gfx8 and gfx9
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:24:54 -05:00
Rex Zhu
ba0c13b774
drm/amdgpu: Add common gfx func Disable kcq via kiq
...
so can be shared with gfx8 and gfx9
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:21:06 -05:00
Rex Zhu
bc4a6f7135
drm/amdgpu: Add struct kiq_pm4_funcs into kiq struct
...
kiq can support 4 pm4 scheduler packets
set_resource, map_queues, unmap_queues, query_status.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:20:57 -05:00
Hawking Zhang
4fc6a88f01
drm/amdgpu: rename amdgpu_gfx_compute_mqd_sw_init
...
The function now will create mqd bos for both gfx queue and compute queue
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Jack Xiao <jack.xiao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:20:51 -05:00
Hawking Zhang
7470bfcf20
drm/amdgpu: add helper function for gfx queue/bitmap transition
...
Similar to what we do for compute already.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Jack Xiao <jack.xiao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:20:27 -05:00
Hawking Zhang
e537c99461
drm/amdgpu: acquire available gfx queues
...
currently, amdgpu will owns the first gfx queue of each pipe
they are:
me:0 pipe:0 queue:0
me:0 pipe:1 queue:0
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Jack Xiao <jack.xiao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:20:17 -05:00
Hawking Zhang
cf02b03f7c
drm/amdgpu: add members in amdgpu_me for gfx queue
...
Update the structure for gfx10.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Jack Xiao <jack.xiao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:20:02 -05:00
Hawking Zhang
8825af65ff
drm/amdgpu/gfx10: new approach to load gfx10 me fw (v4)
...
gfx10 allows to only upload me jumptable while save the whole
me image at gtt memory.
v2: program CP_ME_IC_BASE_CNTL to default value
v3: switch to use amdgpu_bo_create_reserved to create me fw bo
v4: split common code from gfx10 code
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:19:56 -05:00
Hawking Zhang
2a00bb1322
drm/amdgpu/gfx10: new approach to load ce fw (v4)
...
gfx10 allows to only upload ce jumptable while save the whole
ce image at gtt memory.
v2: program CP_CE_IC_BASE_CNTL to default value
v3: switch to use amdgpu_bo_create_reserved to create ce fw bo
v4: split common code from gfx10 code
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:19:52 -05:00
Hawking Zhang
068ed934ee
drm/amdgpu/gfx10: new approach to load pfp fw (v4)
...
gfx10 allows to only upload pfp jumptable while save the whole
pfp image at gtt memory.
v2: program CP_PFP_IC_BASE_CNTL to default value
v3: switch to use amdgpu_bo_create_reserved to create pfp fw bo
v4: split common code from gfx10 code
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Evan Quan <evan.quan@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:19:44 -05:00
Hawking Zhang
225cef9d88
drm/amdgpu: add nbio v2.3 for navi10 (v4)
...
nbio handles bus io functionality.
v1: add place holder and initial basic nbio v2.3 functions (Ray)
v2: implements and expose all functions in format of nbio_v2_3_funcs (Hawking)
v3: squash in updates (Alex)
v4: whitespace fix (Alex)
Signed-off-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:18:36 -05:00
Leo Liu
b45ddfe811
drm/amdgpu: add nbio callbacks for vcn doorbell support
...
For Navi10 VCN2.0, the engine supports Doorbell
Signed-off-by: Leo Liu <leo.liu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:16:38 -05:00
Hawking Zhang
09fa0613bd
drm/amdgpu: query vram_width from vram_info table
...
Driver will get channel_number and channel_width from
vram_info table, then calculate vram_width by multiply
channel_number by channel_width
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:16:38 -05:00
Hawking Zhang
89d7a79c7b
drm/amdgpu: query vram type from atomfirmware vram_info
...
vram_type is saved in member vram_module[0].memory_type
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:16:38 -05:00
Hawking Zhang
98cd7f5b18
drm/amdgpu: add navi pm4 header
...
A pm4 header for Navi. PM4 is the packet format used
by the compute and gfx engines.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:16:38 -05:00
Hawking Zhang
9a87c32fda
drm/amdgpu: add sdma v5 packet header file
...
Defines the SDMA packet formats.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:16:38 -05:00
Huang Rui
1f43631be5
drm/amdgpu: add gfx v10 clear state header v2
...
Clear state for gfx pipe.
v2: squash in updates
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:16:37 -05:00
Huang Rui
a9833d02b5
drm/amdgpu: add v10 structs header (v2)
...
Header for CP structures (MQD, etc.)
V2: squash in updates
Signed-off-by: Huang Rui <ray.huang@amd.com >
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:16:37 -05:00
Hawking Zhang
35c2e91059
drm/amdgpu: parse the new members added by gpu_info ucode v1_1
...
Parse the new parameters for gfx10.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:16:16 -05:00
Hawking Zhang
109c80ddb4
drm/amdgpu: add gpu_info_firmware v1_1 structure for navi10
...
two new members that specific for navi10 are included in v2_0:
num_sc_per_sh and num_packer_per_sc
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:16:11 -05:00
Huang Rui
23c6268eb1
drm/amdgpu: add navi10 gpu info firmware
...
gpu info firmware stores configuration data for various
IP blocks.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:15:29 -05:00
Hawking Zhang
3e514732c0
drm/amdgpu: add gfx10 specific new member pa_sc_tile_steering_override
...
New gfx config parameter.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:15:01 -05:00
Hawking Zhang
02a9e40a83
drm/amdgpu: add gfx10 specific config in amdgpu_gfx_config
...
The two members are used to cache the values from gpu_info fw accordingly
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:14:57 -05:00
Hawking Zhang
5228fe3010
drm/amdgpu: Add GDDR6 in vram_name arrary
...
For printing vram type.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Tao Zhou <Tao.Zhou1@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 21:14:54 -05:00
Huang Rui
852a6626d5
drm/amdgpu: add navi10 asic type
...
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:56 -05:00
Hawking Zhang
33934b3576
drm/amdgpu: add navi10 ip offset header
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:53 -05:00
Hawking Zhang
76a2d0b0a1
drm/amdgpu: add doorbell assignement for navi10
...
Update mappings for Navi10.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:51 -05:00
Hawking Zhang
10e4b22735
drm/amdgpu: atomfirmware.h updates for navi10
...
Updated tables for Navi10.
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:48 -05:00
Hawking Zhang
efd8725f03
drm/amdgpu: add navi10 enums header
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:46 -05:00
Hawking Zhang
d2996831b2
drm/amdgpu: add SMUIO 11.0 register headers
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:44 -05:00
Hawking Zhang
3d220cc3bd
drm/amdgpu: add OSS 5.0 register headers
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:42 -05:00
Hawking Zhang
f519f0be45
drm/amdgpu: add MMHUB 2.0 register headers
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:39 -05:00
Hawking Zhang
be4008b8c5
drm/amdgpu: add GC 10.1 register headers (v4)
...
v2: Update regs (Alex)
v3: More updates (Alex)
v4: more updates (Alex)
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:35 -05:00
Hawking Zhang
326354fa97
drm/amdgpu: add VCN 2.0 register headers
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:33 -05:00
Hawking Zhang
9edefe7bac
drm/amdgpu: add NBIO 2.3 register headers
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:31 -05:00
Hawking Zhang
d33ad04027
drm/amdgpu: add MP 11.0 register headers
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:28 -05:00
Hawking Zhang
2a3196f1f0
drm/amdgpu: add HDP 5.0 register headers
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:26 -05:00
Hawking Zhang
d6ad5023e8
drm/amdgpu: add DCN 2.0 register headers
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:23 -05:00
Hawking Zhang
ae213c4450
drm/amdgpu: add CLK 11.0 register headers
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:21 -05:00
Hawking Zhang
db3239f535
drm/amdgpu: add ATHUB 2.0 register headers
...
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2019-06-20 15:54:18 -05:00