summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
Commit message (Collapse)AuthorAgeFilesLines
...
* drm/amd/powerplay: add function is_dpm_running for navi10Kevin Wang2019-06-221-1/+23
| | | | | | | | add callback function is_dpm_running for navi10 asic Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: move read sensor of UVD[VCE]_POWER to amdgpu_smu fileKevin Wang2019-06-222-8/+8
| | | | | | | | This part of code is asic unrelated and moves to top code level. Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add function get_current_activity_percent for navi10Kevin Wang2019-06-221-0/+20
| | | | | | | | add callback function get_current_activity_percent for navi10 asic Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add function get_gpu_power for navi10Kevin Wang2019-06-221-0/+19
| | | | | | | | add callback function get_gpu_power for navi10 asic Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add function unforce_dpm_levels for navi10Kevin Wang2019-06-221-0/+27
| | | | | | | | add callback function unforce_dpm_levels for navi10 asic Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add funciton force_dpm_limit for navi10Kevin Wang2019-06-221-0/+29
| | | | | | | | add callback function force_dpm_limit for navi10 asic Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add function display_configuration_changed for navi10Kevin Wang2019-06-223-11/+40
| | | | | | | | | 1.add callback function to support navi10 asic. 2.Remove unnecessary logical code. Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add function pre_display_config_changed for navi10Kevin Wang2019-06-221-0/+22
| | | | | | | | add callback function pre_display_config_changed for navi10 asic Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add function get_clock_by_type_with_latency for navi10Kevin Wang2019-06-224-10/+62
| | | | | | | | add callback function get_clock_by_type_with_latency for navi10 asic Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add function populate_umd_state_clk for navi10Kevin Wang2019-06-221-0/+15
| | | | | | | | add callback function populate_umd_state_clk for navi10 asic Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add function force_clk_levels for navi10Kevin Wang2019-06-224-19/+56
| | | | | | | | add sysfs interface of force_clk_levels sysfs for navi10. Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add helper function of smu_set_hard_freq_rangeKevin Wang2019-06-222-0/+35
| | | | | | | | add this function to get dpm clock information. Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add helper function of smu_set_soft_freq_rangeKevin Wang2019-06-222-0/+35
| | | | | | | | add this helper function to get dpm clk information. Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add helper function of smu_get_dpm_freq_rangeKevin Wang2019-06-222-0/+38
| | | | | | | | add this helper function to get dpm clk information (min, max); Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add function print_clk_levels for navi10Kevin Wang2019-06-224-26/+77
| | | | | | | | add sysfs interface of print_clk_levels sysfs for navi10. Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add helper function to get dpm freq informationsKevin Wang2019-06-222-0/+41
| | | | | | | | this function can help driver to get ppclk informations Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add function get current clock freq interface for navi10Kevin Wang2019-06-223-0/+33
| | | | | | | | add function of get_current_clk_freq_by_table for navi10. Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/gfx10: require to pin/unpin CSIB BO when suspend/resumeJack Xiao2019-06-221-0/+38
| | | | | | | | | | CSIB BO is required to be pinned down to guarantee bo is always valid when resume, and to be unpinned it so that its content can be saved during suspend. 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>
* drm/amdgpu/gfx10: remove unnecessary waiting on gfx inactiveJack Xiao2019-06-221-30/+5Star
| | | | | | | | | The following KIQ ring test could guarantee the previous unmap has been done. 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>
* drm/amdgpu: RLC must be disabled after SMU when S3 on naviJack Xiao2019-06-222-3/+5
| | | | | | | | | SMU requires to interact with RLC when disable all features, so RLC shouldn't be disabled ahead of SMU. 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>
* drm/amd/powerplay/smu11: disable PLL shutdown when gfxoff enabledJack Xiao2019-06-221-1/+5
| | | | | | | | | MP1 cannot access clock IP during MP1 FW reload, disable PLL shutdown as a workaround. 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>
* drm/amd/powerplay: disable uclk dpm by defaulttiancyin2019-06-221-2/+4
| | | | | | | | | | | | | | | [why] The uclk dpm feature is not supported by some certain navi10 board like 18202, while supported by some board like 18201. It causes modprobe failure on 18202 board. [how] Disabled this feature by default, it can be enabled by module parameter uclk_dpm_support=1. Reviewed-by: Jack Xiao <Jack.Xiao@amd.com> Signed-off-by: tiancyin <tianci.yin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/VCN2.0: remove powergating for UVDW tileLeo Liu2019-06-222-11/+8Star
| | | | | | | | | | | No UVDW tile any more from VCN2.0, so mark out related fields. It fixes error: "[drm] Register(0) [mmUVD_PGFSM_STATUS] failed to reach value 0x002aaaaa != 0x00aaaaaa" Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amd/powerplay: enable uclk dpmKenneth Feng2019-06-221-1/+4
| | | | | | | | | Enable uclk dpm on navi10 as the result of removing fast switch setting. Signed-off-by: Kenneth Feng <kenneth.feng@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amd/powerplay: fix the issue of uclk dpmKenneth Feng2019-06-221-3/+3
| | | | | | | | | | PPSMC_MSG_SetUclkFastSwitch message can be applied on vega20, but can't on navi10. This is the prerequisite of uclk dpm on navi10. Signed-off-by: Kenneth Feng <kenneth.feng@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/gfx10: fix unbalanced MAP/UNMAP_QUEUES when async_gfx_ring is ↵Xiaojie Yuan2019-06-221-3/+7
| | | | | | | | | | | | disabled gfx_v10_0_kiq_enable_kgq() is called only when async_gfx_ring is enabled, so should gfx_v10_0_kiq_disable_kgq(). Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jack Xiao <Jack.Xiao@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/gfx10: drop redundant se/sh selectionXiaojie Yuan2019-06-221-1/+0Star
| | | | | | | | we already selected se/sh at the beginning of the for loop Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com> Reviewed-by: Jack Xiao <Jack.Xiao@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/mes10.1: enable mes FW backdoor loadingJack Xiao2019-06-221-0/+36
| | | | | | | | It enables MES FW backdoor loading in ip block functions. 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>
* drm/amdgpu/mes10.1: implement mes enablement functionJack Xiao2019-06-221-0/+33
| | | | | | | | After MES firmware gets loaded, it enables MES engine starting execution. 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>
* drm/amdgpu/mes10.1: implement MES firmware backdoor loadingJack Xiao2019-06-221-0/+67
| | | | | | | | It implements MES firmware backdoor loading. 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>
* drm/amdgpu/mes10.1: implement ucode buffers destructionJack Xiao2019-06-221-0/+11
| | | | | | | | Free ucode GPU buffers. 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>
* drm/amdgpu/mes10.1: upload mes data ucode to gpu bufferJack Xiao2019-06-221-0/+32
| | | | | | | | Allocate GPU buffer and upload mes data ucode to the buffer. 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>
* drm/amdgpu/mes10.1: upload mes ucode to gpu bufferJack Xiao2019-06-221-0/+34
| | | | | | | | Allocate GPU buffer and upload ucode firmware to the buffer. 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>
* drm/amdgpu/mes10.1: implement ucode CPU buffer destructionJack Xiao2019-06-221-0/+6
| | | | | | | | It implements the CPU buffer destruction of ucode. 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>
* drm/amdgpu/mes10.1: load mes firmware file to CPU bufferJack Xiao2019-06-221-0/+43
| | | | | | | | It requests MES firmware binary and uploads to CPU buffer. 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>
* drm/amdgpu/mes10.1: add mes firmware info fieldsJack Xiao2019-06-221-0/+16
| | | | | | | | The newly added fields is to store mes firmware related information. 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>
* drm/amdgpu/ucode: add mes firmware file supportJack Xiao2019-06-221-0/+15
| | | | | | | | The newly added firmware struct is for mes firmware file. 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>
* drm/amdgpu/ucode: add the definitions of MES ucode and ucode dataJack Xiao2019-06-221-0/+2
| | | | | | | | MES requires two seperate firmwares: ucode and ucode data. 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>
* drm/amdgpu/sdma5: incorrect variable type for gpu addressJack Xiao2019-06-221-1/+2
| | | | | | | | | Incorrect programming with 64bit gpu address assignment for 32bit variable. Signed-off-by: Jack Xiao <Jack.Xiao@amd.com> Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/sdma5: fix a sdma potential hang in VK_Examples testtiancyin2019-06-221-1/+2
| | | | | | | | | | | | | [why] When page fault happens, it could lead to sdma hang is RESP_MODE = 0 for non-PRT case. [how] Setting SDMAx_UTCL1_CNTL.RESP_MODE to 0b011 to avoid SDMA halt. Reviewed-by: Jack Xiao <Jack.Xiao@amd.com> Signed-off-by: tiancyin <tianci.yin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: remove uvd_gated/vce_gated from smu_power_context (v2)Hawking Zhang2019-06-221-10/+4Star
| | | | | | | | | It's not needed for navi. v2: remove unused variable (Alex) Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/nv: set vcn pg flagJack Xiao2019-06-221-1/+1
| | | | | | | | Enable VCN power gating by default. Signed-off-by: Jack Xiao <Jack.Xiao@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: enable vcn dpm scheme for naviJack Xiao2019-06-221-2/+2
| | | | | | | | | On navi1x, vcn dpm scheme was merged into powergating scheme. Signed-off-by: Jack Xiao <Jack.Xiao@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/vcn2: don't access register when power gatedJack Xiao2019-06-221-1/+2
| | | | | | | | | | It will cause bus hang to access register UVD_STATUS when VCN is in the state of power gated. Signed-off-by: Jack Xiao <Jack.Xiao@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: add new interface for vcn powergatingKenneth Feng2019-06-222-0/+32
| | | | | | | | | | add new interface for vcn powrergating and vcn dpm as well. Signed-off-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off-by: Jack Xiao <Jack.Xiao@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: enable vcn powergating v2Kenneth Feng2019-06-221-0/+3
| | | | | | | | | | | enable vcn powergating in driver for navi10 v2: set vcn pg bit according to AMD_PG_SUPPORT_VCN flag Signed-off-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off-by: Jack Xiao <Jack.Xiao@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/vcn2: notify SMU power up/down VCNJack Xiao2019-06-221-0/+7
| | | | | | | | | | For sw control power gating, it needs notify SMU to power up/down VCN when enter/exit working state. Signed-off-by: Jack Xiao <Jack.Xiao@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/gfx10: fix issues for suspend/resumeJack Xiao2019-06-221-5/+30
| | | | | | | | | | 1). use PREEMPT_QUEUE instead of RESET_QUEUE for gfx ring disablement. 2). Need wait for unmapping queue done before continue execution. Signed-off-by: Jack Xiao <Jack.Xiao@amd.com> Reviewed-by: Tianci Yin <tianci.yin@amd.com> Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: set dpm_enabled flag but don't enable vcn dpmHuang Rui2019-06-222-6/+3Star
| | | | | | | | | This patch sets dpm_enabled flag but don't enable vcn dpm, because vcn dpm doesn't work so far and we needs to enable the sysfs interfaces. 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>
* drm/amd/powerplay: update smu11_driver_if_navi10.hKenneth Feng2019-06-221-11/+6Star
| | | | | | | | | update the smu11_driver_if_navi10.h since navi10 smu fw update to 42.15.0 Signed-off-by: Kenneth Feng <kenneth.feng@amd.com> Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>