[PATCH] drm/amdgpu: refactor function to init no-psp fw

2021-09-09 Thread Likun Gao
From: Likun Gao Refactor the code of amdgpu_ucode_init_single_fw to make it more readable as too many ucode need to handle on this function currently. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 160 ++ 1 file changed, 75 insertions(+), 85

[PATCH] drm/amdgpu: adjust fence driver enable sequence

2021-07-28 Thread Likun Gao
From: Likun Gao Fence driver was enabled per ring when sw init on per IP block before. Change to enable all the fence driver at the same time after amdgpu_device_ip_init finished. Rename some function related to fence to make it reasonable for read. Signed-off-by: Likun Gao --- drivers/gpu

[PATCH] drm/amdgpu: update golden setting for sienna_cichlid

2021-07-15 Thread Likun Gao
From: Likun Gao Update GFX golden setting for sienna_cichlid. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index cd8dcec7fdbb

[PATCH 2/2] drm/amdgpu: update the method for harvest IP for specific SKU

2021-05-10 Thread Likun Gao
From: Likun Gao Update the method of disabling VCN IP for specific SKU for navi1x ASIC, it will judge whether should add the related IP at the function of amdgpu_device_ip_block_add(). Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/nv.c | 30 -- 1 file

[PATCH 1/2] drm/amdgpu: add judgement when add ip blocks

2021-05-10 Thread Likun Gao
From: Likun GAO Judgement whether to add an sw ip according to the harvest info. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 15 +- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 30

[PATCH] drm/amdgpu: remove redundant include of navi10_enum

2021-01-04 Thread Likun Gao
From: Likun Gao Remove unnecessary include of navi10_enum header file. Signed-off-by: Likun Gao Change-Id: Id9697d0cf68339b3005b634ab5cf2f7bc39e47ef --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c | 1 - drivers/gpu/drm/amd

[V2] drm/amdgpu: switch hdp callback functions for hdp v4

2020-12-28 Thread Likun Gao
From: Likun Gao Switch to use the HDP functions which unified on hdp structure instead of the scattered hdp callback functions. V2: clean up hdp reset ras error count function. Signed-off-by: Likun Gao Change-Id: I70564d5053e13e119cc8fa44a40350669ed874cf --- drivers/gpu/drm/amd/amdgpu

[PATCH 5/5] drm/amdgpu: remove redundant logic related HDP

2020-12-28 Thread Likun Gao
From: Likun Gao Remove hdp_flush function from amdgpu_nbio struct as it have been unfied into hdp struct. Remove the include about hdp register which was not used. Signed-off-by: Likun Gao Change-Id: I7b1ce7424a97efe82ccb6ce63505e724530715ac --- drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.h | 1

[PATCH 4/5] drm/amdgpu: switch hdp callback functions for hdp v5

2020-12-28 Thread Likun Gao
From: Likun Gao Switch to use the HDP functions which unfied on hdp structure instead of the scattered hdp callback functions. Signed-off-by: Likun Gao Change-Id: If70683c8cb697a9e7a1ea5a21aa2ed84567e6919 --- drivers/gpu/drm/amd/amdgpu/Makefile| 2 +- drivers/gpu/drm/amd/amdgpu

[PATCH 3/5] drm/amdgpu: switch hdp callback functions for hdp v4

2020-12-28 Thread Likun Gao
From: Likun Gao Switch to use the HDP functions which unfied on hdp structure instead of the scattered hdp callback functions. Signed-off-by: Likun Gao Change-Id: I75016df403eca537fa30519e2918207461ec6f28 --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH 1/5] drm/amdgpu: add hdp version 4 functions

2020-12-28 Thread Likun Gao
From: Likun Gao Unfiy hdp related function into hdp structure for hdp version 4. Signed-off-by: Likun Gao Change-Id: I0462a24f0fae08b3d36c01a8f0df81599377c048 --- drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 150 ++ drivers/gpu/drm/amd/amdgpu/hdp_v4_0.h | 31 ++ 2

[PATCH 2/5] drm/amdgpu: add hdp version 5 functions

2020-12-28 Thread Likun Gao
From: Likun Gao Unfiy hdp related function into hdp structure for hdp version 5. Signed-off-by: Likun Gao Change-Id: I5d18a5eb4e4ba20b41b40f0454272ba94224b3b9 --- drivers/gpu/drm/amd/amdgpu/hdp_v5_0.c | 212 ++ drivers/gpu/drm/amd/amdgpu/hdp_v5_0.h | 31 2 files

[PATCH 2/2] drm/amdgpu: unfiy hdp function into hdp structure

2020-12-27 Thread Likun Gao
From: Likun Gao Separtate HDP related function into hdp structure. Remove redundant operation related HDP. Signed-off-by: Likun Gao Change-Id: I1549ae2a7860c3b845897e99b3c2351da277bc8c --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1

[PATCH 1/2] drm/amdgpu: add amdgpu_hdp structure

2020-12-27 Thread Likun Gao
From: Hawking Zhang amdgpu_hdp hold all the callbacks for hdp Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_hdp.h | 40 + 2 files changed, 44 insertions(+) create mode 100644

[v2] drm/amdgpu: skip vram operation for BAMACO runtime

2020-12-13 Thread Likun Gao
From: Likun Gao Skip vram related operation for bamaco rumtime suspend and resume as vram is alive when BAMACO. It can save about 32ms when suspend and about 15ms when resume. v2: add local adev variable for maco enablement which checked by device MACO support cap and runtime method parameter

[PATCH] drm/amdgpu: skip vram operation for BAMACO runtime

2020-12-11 Thread Likun Gao
From: Likun Gao Skip vram related operation for bamaco rumtime suspend and resume as vram is alive when BAMACO. It can save about 32ms when suspend and about 15ms when resume. Signed-off-by: Likun Gao Change-Id: I6ad39765de5ed1aac2dc51e96ed7a21a727272cd --- drivers/gpu/drm/amd/amdgpu

[V2] drm/amdgpu: add judgement for suspend/resume sequence

2020-12-11 Thread Likun Gao
From: Likun Gao S0ix only makes sense on APUs since they are part of the platform, so only when the ASIC is APU should set amdgpu_acpi_is_s0ix_supported flag to deal with the related situation. Signed-off-by: Likun Gao Change-Id: Ic89df206734fa7e6ce3e5a784171f149a07edc80 --- drivers/gpu/drm

[PATCH] drm/amdgpu: add judgement for suspend/resume sequence

2020-12-06 Thread Likun Gao
From: Likun Gao Only APU should deal with the situation that amdgpu suspend/resume with s0i3 support to skip RLC/CP/GFX disable during suspend. Signed-off-by: Likun Gao Change-Id: Icca91b3497f12a6d78f005ee63461cf0e8f24958 --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +--- 1 file

[PATCH] drm/amdgpu: increase reserved VRAM size to 8MB

2020-11-25 Thread Likun Gao
From: Likun Gao 4MB reserved VRAM size which used for page tables was not enough for some condition, increase it to 8MB to reduce page table contention. Signed-off-by: Likun Gao Change-Id: Ibbc0c14a75bd0e57d77e30b7140a144f4030114a --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 +- 1 file

[PATCH] drm/amdgpu: update golden setting for sienna_cichlid

2020-11-22 Thread Likun Gao
From: Likun Gao Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Change-Id: I2f107ced1540c9ec145950cf8b58664c6127756d --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm

[PATCH 2/2] drm/amdgpu: add module parameter choose runtime method

2020-11-20 Thread Likun Gao
From: Likun Gao Default runtime logic not changed. Provide an alternative runtime method. (set 1 to use BACO; 2 to use BAMACO) When set reset_method to 4, it will use BACO or BAMACO for gpu reset, according to runtime value. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

[PATCH 1/2] drm/amd/pm: fix the crash after runtime pm resume

2020-11-19 Thread Likun Gao
From: Likun Gao Some features are still disabled after runtime pm resume. This can take the hardware back. Unlike other projects, this doesn't need pptable retransfer. Signed-off-by: Kenneth Feng Signed-off-by: Likun Gao Change-Id: If7c4148380ddb8a08aed06a8ba9afae98075947d --- drivers/gpu

[PATCH] drm/amd/pm: update driver if file for sienna cichlid

2020-11-15 Thread Likun Gao
From: Likun Gao Update driver if file for sienna cichlid. Signed-off-by: Likun Gao Change-Id: Ibcffb2a668202f941b1e8e7a22924976c910cf35 --- .../pm/inc/smu11_driver_if_sienna_cichlid.h | 16 +- drivers/gpu/drm/amd/pm/inc/smu_v11_0.h| 2 +- .../amd/pm/swsmu/smu11

[PATCH] drm/amdgpu: update golden setting for sienna_cichlid

2020-11-15 Thread Likun Gao
From: Likun Gao Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Change-Id: I968f405a11b640174f5bc03eacc5f4edee47815a --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu

[PATCH xf86-video-amdgpu] Fix drmmode_crtc_scanout_create logic

2020-10-29 Thread Likun Gao
From: Likun Gao If crtc scanout create successfully, the function of drmmode_crtc_scanout_create should return TURE. Signed-off-by: Likun Gao Change-Id: I4b7540b0d128c2d55f2b8491569004741435f343 --- src/drmmode_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH] drm/amdgpu: correct the cu and rb info for sienna cichlid

2020-10-21 Thread Likun Gao
From: Likun Gao Skip disabled sa to correct the cu_info and active_rbs for sienna cichlid. Signed-off-by: Likun Gao Change-Id: I271682e11f3472cb5ba882e04329976059e06a13 --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd

[PATCH] drm/amd/pm: update driver if file for sienna cichlid

2020-10-20 Thread Likun Gao
From: Likun Gao Update driver if file for sienna cichlid. Signed-off-by: Likun Gao Change-Id: Ie386abcd0a00fd904155361c9aa8c0861473552a --- .../amd/pm/inc/smu11_driver_if_sienna_cichlid.h| 14 -- drivers/gpu/drm/amd/pm/inc/smu_v11_0.h | 2 +- 2 files changed, 13

[PATCH] drm/amd/pm: fix pcie information for sienna cichlid

2020-10-20 Thread Likun Gao
From: Likun Gao Fix the function used for sienna cichlid to get correct PCIE information by pp_dpm_pcie. Signed-off-by: Likun Gao Change-Id: I81e529be6e96f083eb7aa244c16700422bde5fec --- drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH] drm/amdgpu: add function to program pbb mode for sienna cichlid

2020-10-14 Thread Likun Gao
From: Likun Gao Add function for sienna_cichlid to force PBB workload mode to zero by checking whether there have SE been harvested. Signed-off-by: Likun Gao Change-Id: I3bf2fe0b976affe26c829ac67bee176018f13fe9 --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 62 ++ 1 file

[PATCH] drm/amdgpu: update golden setting for sienna_cichlid

2020-10-14 Thread Likun Gao
From: Likun Gao Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Change-Id: I9a1ad84c22748fc100a3327487c6287e237df490 --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd

[PATCH] amdgpu/drm: cleanup navi10 ih logic about older ASIC

2020-09-25 Thread Likun Gao
From: Likun Gao The ASIC which is older than navi10 will not call into navi10_ih related function, so cleanup the related code path. Signed-off-by: Likun Gao Change-Id: Idf73b73f1f4f19031260c220798e5fffbb2cecd2 --- drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 105 +++-- 1 file

[PATCH] drm/amd/pm: update driver if file for sienna cichlid

2020-09-21 Thread Likun Gao
From: Likun Gao Update driver if file for sienna cichlid. Signed-off-by: Likun Gao Change-Id: I295edda90d156c4cea742e62fab696afb6cd1366 --- drivers/gpu/drm/amd/pm/inc/smu11_driver_if_sienna_cichlid.h | 4 ++-- drivers/gpu/drm/amd/pm/inc/smu_v11_0.h | 2 +- 2 files changed

[PATCH] drm/amd/pm: update driver if file for sienna cichlid

2020-09-10 Thread Likun Gao
From: Likun Gao Update drive if file for sienna_cichlid. Signed-off-by: Likun Gao Change-Id: I53e5210acb760901622cd50aaf81193e9699feba --- .../pm/inc/smu11_driver_if_sienna_cichlid.h | 20 ++- drivers/gpu/drm/amd/pm/inc/smu_v11_0.h| 2 +- .../amd/pm/swsmu/smu11

[PATCH] drm/amdgpu: use mode1 reset by default for sienna_cichlid

2020-08-06 Thread Likun Gao
From: Likun Gao Swith default gpu reset method for sienna_cichlid to MODE1 reset. Signed-off-by: Likun Gao Change-Id: I775e5a66bbac474f65ca8c999136ccaf9c1dc14e --- drivers/gpu/drm/amd/amdgpu/nv.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm

[PATCH] drm/amd/powerplay: update driver if file for sienna_cichlid

2020-08-06 Thread Likun Gao
From: Likun Gao Update drive if file for sienna_cichlid. Signed-off-by: Likun Gao Change-Id: If405461cfbe0133ceb61fa123272b2e53db99755 --- .../drm/amd/powerplay/inc/smu11_driver_if_sienna_cichlid.h | 6 +++--- drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 2 +- 2 files

[PATCH] drm/amdgpu: update golden setting for sienna_cichlid

2020-07-23 Thread Likun Gao
From: Likun Gao Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Change-Id: Id71876180033eedc10ecbabe5317369676034e19 --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b

[PATCH] drm/amd/powerplay: correct smu message for vf mode

2020-07-21 Thread Likun Gao
From: Likun Gao Set valid_in_vf to false for the message not support in vf mode on sienna cichlid. Signed-off-by: Likun Gao Change-Id: Ib07fe7522eea39a14131945bb76be0b0935598ae --- .../drm/amd/powerplay/sienna_cichlid_ppt.c| 70 +-- 1 file changed, 35 insertions(+), 35

[PATCH] drm/amd/powerplay: skip invalid msg when smu set mp1 state

2020-07-21 Thread Likun Gao
From: Likun Gao Some asic may not support for some message of set mp1 state. If the return value of smu_send_smc_msg is -EINVAL, that means it failed to send msg to smc as it can not map an valid message for the ASIC. And with that case, smu_set_mp1_state should be skipped as those ASIC

[PATCH] drm/amd/powerplay: add msg map for mode1 reset

2020-07-20 Thread Likun Gao
From: Likun Gao Mapping Mode1Reset message for sienna_cichlid. Signed-off-by: Likun Gao Change-Id: I9b8d39b10c7723af4589577fdbfa4acd5af6e85d --- drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/powerplay

[PATCH] drm/amd/powerplay: update driver if file for sienna_cichlid

2020-07-09 Thread Likun Gao
From: Likun Gao Update sienna_cichlid driver if header and related files. Signed-off-by: Likun Gao Change-Id: If303e7fca32ebf922ee5d918855bbaca8dc61d38 --- .../inc/smu11_driver_if_sienna_cichlid.h| 17 + drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 2 +- .../gpu

[PATCH] drm/amd/powerplay: update driver if file for sienna_cichlid

2020-07-09 Thread Likun Gao
From: Likun Gao Update sienna_cichlid driver if header and related files. Signed-off-by: Likun Gao Change-Id: If303e7fca32ebf922ee5d918855bbaca8dc61d38 --- .../inc/smu11_driver_if_sienna_cichlid.h| 17 + drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 2 +- .../gpu

[v2] drm/amdgpu: remove unnecessary logic of ASIC check

2020-07-07 Thread Likun Gao
From: Likun Gao Remove some unused ASIC check logic. Remove some definition of amdgpu_device which only used by the removed ASIC check logic.(V2) Signed-off-by: Likun Gao Change-Id: I5b06a51b41790b4df1078099848025851f79c320 --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 5 - drivers/gpu/drm

[PATCH] drm/amdgpu: enable gpu recovery for sienna cichlid

2020-07-07 Thread Likun Gao
From: Likun Gao Enable gpu recovery for sienna cichlid by default to trigger gpu recovery once needed. Signed-off-by: Likun Gao Change-Id: Iaf3cfa145bdc8407771d5a26dabb413570980a85 --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu

[PATCH] drm/amdgpu: remove unnecessary logic of ASIC check

2020-07-07 Thread Likun Gao
From: Likun Gao Remove some unused ASIC check logic. Signed-off-by: Likun Gao Change-Id: Ief8bcb77392294b180473754e669b9e460a04826 --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 7 +-- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 3 +-- 3 files

[PATCH] tests/amdgpu: set emit fence flag for multi fence

2020-07-07 Thread Likun Gao
From: Likun Gao Set AMDGPU_IB_FLAG_EMIT_MEM_SYNC flag for specific ASIC when test multi fence. Signed-off-by: Likun Gao Change-Id: I41e5cb19d9ca72c1d396cc28d1b54c31773fe4d5 --- include/drm/amdgpu_drm.h | 2 ++ tests/amdgpu/basic_tests.c | 6 ++ 2 files changed, 8 insertions(+) diff

[PATCH 1/2] drm/amdgpu: fix coding error of mmhub pg enablement

2020-07-06 Thread Likun Gao
From: Likun Gao MMHUB powergating should be disabled on navi12 and enabled on sienna cichlid. Signed-off-by: Likun Gao Change-Id: I0b0e6801408df3c13322c4f9ed8e13b6ffc9ec25 --- drivers/gpu/drm/amd/amdgpu/nv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu

[PATCH] drm/amdgpu: use RREG32_KIQ to read register when get cg state

2020-07-06 Thread Likun Gao
From: Likun Gao Use RREG32_KIQ to read gfx register when try to get gfx/sdma clockgating state instead of RREG32, as it will result to system hard hang when GPU is enter into GFXOFF state. Signed-off-by: Likun Gao Change-Id: I1fc5fe70831e0ec35f1e701a1646cb3e46e121bf --- drivers/gpu/drm/amd

[PATCH 2/2] drm/amd/powerplay: update driver if file for sienna_cichlid

2020-06-24 Thread Likun Gao
From: Likun Gao Update sienna_cichlid driver if header file to match pptable changes. Signed-off-by: Likun Gao Change-Id: Idcc081797f54509ea57503cce1dc915f718f189e --- .../powerplay/inc/smu11_driver_if_sienna_cichlid.h | 12 drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h

[PATCH 1/2] drm/amd/powerplay: change method to set board parameters

2020-06-24 Thread Likun Gao
From: Likun Gao Copy board parameters directly instead of set each parameter for sienna_cichlid. Signed-off-by: Likun Gao --- .../drm/amd/powerplay/sienna_cichlid_ppt.c| 89 +-- 1 file changed, 2 insertions(+), 87 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay

[PATCH] drm/amdgpu: skip fb size query for navi10 previous asic

2020-06-05 Thread Likun Gao
From: Likun Gao Skip for reserved fb size query for the ASIC older than navi10, as those asic do not need for TMR region reserve and may get an invalid value. Signed-off-by: Likun Gao Change-Id: Idbc57805b8070f27ba6c3cf22f1892d6dab92f06 --- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 3

[PATCH] drm/amd/powerplay: update driver if file for sienna_cichlid

2020-06-02 Thread Likun Gao
From: Likun Gao Update sienna_cichlid driver if header file to match pptable changes. Signed-off-by: Likun Gao Change-Id: Ie0652935d512124c03f16ae75c44e134567ef5da --- .../inc/smu11_driver_if_sienna_cichlid.h| 17 ++--- drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 2

[PATCH] drm/amd/powerplay: move powerplay table operation out of smu_v11_0.c

2020-06-02 Thread Likun Gao
From: Likun Gao move smu_v11_0_get_max_power_limit and smu_v11_0_set_thermal_range function from smu_v11_0.c to asic specific _ppt.c to avoid powerplay table conflict with different ASIC with smu11. Signed-off-by: Likun Gao Change-Id: I194f44e9f59daf19fa4758ed746fa13ccece4308 --- drivers/gpu

[PATCH] drm/amdgpu: change memory training to common function

2020-05-21 Thread Likun Gao
From: Likun Gao Change memory training init and finit a common function, as it only have software behavior do not relay on the IP version of PSP. Signed-off-by: Likun Gao Change-Id: I0a81d3c3cd1813480781876101e9bfb6787bce3b --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 42

[PATCH] drm/amdgpu: add condition to set MP1 state on gpu reset

2020-05-18 Thread Likun Gao
From: Likun Gao Only ras supportted need to set MP1 state to prepare for unload before reloading SMU FW. Signed-off-by: Likun Gao Change-Id: I9e49b3f13aa613393381fe15b6b060665026078a --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH] Revert "drm/amdgpu: change SH MEM alignment mode for gfx10"

2020-04-08 Thread Likun Gao
From: Likun Gao This reverts commit 8d2afe375f6ed9d84ddca234d49a53cf875f9042. Revert the auto alignment mode set of SH MEM config, as it will result to OCL Conformance Test fail. --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] drm/amdgpu: change SH MEM alignment mode for gfx10

2020-04-03 Thread Likun Gao
From: Likun Gao Change SH_MEM_CONFIG Alignment mode to Automatic, as: 1)OGL fn_amd_compute_shader will failed with unaligned mode. 2)The default alignment mode was defined to automatic on gfx10 specification. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- 1 file

[PATCH] drm/amdgpu/powerplay: fix NULL pointer issue when SMU disabled

2019-12-25 Thread Likun Gao
From: Likun Gao Fix smu related NULL pointer issue which occurs when SMU is disabled. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers

[PATCH] drm/amdgpu/powerplay: unify smu send message function

2019-12-02 Thread Likun Gao
From: Likun Gao Drop smu_send_smc_msg function from ASIC specify structure. Reuse smu_send_smc_msg_with_param function for smu_send_smc_msg. Set paramer to 0 for smu_send_msg function, otherwise it will send with previous paramer value (Not a certain value). Signed-off-by: Likun Gao

[PATCH] drm/amdgpu: remove unpin clear_state_obj for gfx v8

2019-08-01 Thread likun Gao
From: Likun Gao Remove unpin rlc clear_state_obj for gfx v8 when rlc init, which will make Stoney pm_suspend hang. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH] drm/amdgpu: enable MGCG for PCO

2019-04-19 Thread likun Gao
From: Likun Gao Enable MGCG for picasso. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index a136632..4900e49 100644 --- a/drivers

[PATCH] drm/amd/powerplay: fix pcie sysfs interface when set wrong value

2019-03-03 Thread likun Gao
From: Likun Gao The operation of mutex_unlock smu->mutex should be done when forced level is larger than NUM_LINK_LEVELS in the function of force_clk_levels. Reported-by: Julia Lawall Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 6 -- 1 file changed

[PATCH v3] drm/amd/powerplay: add limit of pp_feature for smu (v3)

2019-02-27 Thread likun Gao
From: Likun Gao Move pp_feature from the struct of amd_powerplay to amdgpu_device. Add pp_feature limit for overdrive interface. v2: put pp_feature into struct amdgpu_pm. v3: merge feature_mask with pp_feature. Signed-off-by: Likun Gao Reviewed-by: Kevin Wang Suggested-by: Alex Deucher

[PATCH v2] drm/amd/powerplay: add limit of pp_feature for smu (v2)

2019-02-26 Thread likun Gao
From: Likun Gao Move pp_feature from the struct of amd_powerplay to amdgpu_device. Add pp_feature limit for overdrive interface. v2: put pp_feature into struct amdgpu_pm. Signed-off-by: Likun Gao Reviewed-by: Kevin Wang Suggested-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH v2 2/3] drm/amdgpu: separate amdgpu_rlc into a single file

2018-11-08 Thread likun Gao
From: Likun Gao Separate the function and struct of RLC from the file of GFX. Abstract the function of amdgpu_gfx_rlc_fini. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/Makefile | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 60

[PATCH v2 3/3] drm/amdgpu: abstract the function of enter/exit safe mode for RLC

2018-11-08 Thread likun Gao
From: Likun Gao Abstract the function of amdgpu_gfx_rlc_enter/exit_safe_mode and some part of rlc_init to improve the reusability of RLC. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c| 229 - drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h

[PATCH v2 1/3] drm/amdgpu: unify rlc function into structure

2018-11-08 Thread likun Gao
From: Likun Gao Put function rlc_init,rlc_fini,rlc_resume,rlc_stop,rlc_start into structure amdgpu_rlc_funcs and change the method to call rlc function for each verssion of GFX. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 6 ++ drivers/gpu/drm/amd/amdgpu

[PATCH v2 0/3] RLC kernel code update to improve resuabillity

2018-11-08 Thread likun Gao
From: Likun Gao Hi, Patches for RLC which is used for improving the resuabillity of RLC's code have update, the changes between the old patch are as follow: PATCH 1/3: have not changed and it unified RLC's function into the struct amdgpu_rlc_funcs and change the method of calling RLC. PATCH 2/3

[PATCH 2/3] drm/amdgpu: abstract the function of enter/exit safe mode for RLC.

2018-11-05 Thread likun Gao
From: Likun Gao abstract the function of amdgpu_gfx_rlc_enter/exit_safe_mode, amdgpu_gfx_rlc_fini and some part of rlc_init to improve the reusability of RLC. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c| 201 drivers/gpu/drm/amd/amdgpu

[PATCH 3/3] drm/amdgpu: separate amdgpu_rlc into a single file.

2018-11-05 Thread likun Gao
From: Likun Gao separate the function and struct of RLC from the file of GFX Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/Makefile | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 202 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 70

[PATCH 0/3] RLC kernel code update to improve resuabillity

2018-11-05 Thread likun Gao
From: Likun Gao Hi, Those series of patch modified the code of RLC to improve the resuabillity of RLC's code. The process was separate into three part: Part1[PATCH 1/3]: Unify RLC's function into the struct amdgpu_rlc_funcs and change the method of calling RLC. Part2[PATCH 2/3]: Abstract RLC's

[PATCH 1/3] drm/amdgpu: unify rlc function into structure

2018-11-05 Thread likun Gao
From: Likun Gao Put function rlc_init,rlc_fini,rlc_resume,rlc_stop,rlc_start into structure amdgpu_rlc_funcs and change the method to call rlc function for each verssion of GFX. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 6 ++ drivers/gpu/drm/amd/amdgpu

[PATCH 3/5] drm/amdgpu/rlc: gfx_v7 change the method to call rlc function

2018-10-10 Thread likun Gao
From: Likun Gao Use struct pointer to call rlc function. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 5/5] drm/amdgpu/rlc: gfx_v9 change the method to call rlc function

2018-10-10 Thread likun Gao
From: Likun Gao Use struct pointer to call rlc function. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 4/5] drm/amdgpu/rlc: gfx_v8 change the method to call rlc function

2018-10-10 Thread likun Gao
From: Likun Gao Use struct pointer to call rlc function. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 2/5] drm/amdgpu/rlc: gfx_v6 change the method to call rlc function

2018-10-10 Thread likun Gao
From: Likun Gao Use struct pointer to call rlc function. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 1/5] drm/amdgpu/rlc: unify rlc function into structure

2018-10-10 Thread likun Gao
From: Likun Gao Put function rlc_init,rlc_fini,rlc_resume,rlc_stop,rlc_start into structure amdgpu_rlc_funcs. Signed-off-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h b/drivers/gpu

[PATCH 0/5] RLC kernel code update for unified RLC function

2018-10-10 Thread likun Gao
From: Likun Gao Hi all, Code modified about RLC will be operated to improve the resuability of RLC's code, and this process will operated with two steps: STEP1(completed): - Unify RLC's function into the structure amdgpu_rlc_funcs and use structure pointer to call RLC functions

[PATCH libdrm] amdgpu: Disable deadlock test suite for RV/RV2/PCO

2018-08-14 Thread likun Gao
From: Likun Gao disable deadlock test suite for RV/RV2/PCO Signed-off-by: Likun Gao --- tests/amdgpu/deadlock_tests.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/amdgpu/deadlock_tests.c b/tests/amdgpu/deadlock_tests.c index 1eb5761..304482d 100644 --- a/tests