aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd
AgeCommit message (Collapse)AuthorFilesLines
2017-01-27drm/amd/powerplay: fix memory leak in cz_hwmgr.cRex Zhu1-2/+9
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: not free hwmgr/smumgr in asic private functions.Rex Zhu2-4/+2
struct smumgr/hwmgr will be freed on amd_powerplay_destory and if we free them in one of asic private functions, other private date may not be freed. for example: power state and power table in hwmgr. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: not use module parameter in powerplay.Rex Zhu2-5/+3
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: refine powerplay interface.Rex Zhu10-479/+518
v2: add pp_check function to check pp_instance valid. 1. powerplay export two new interface to amdgpu, amd_powerplay_create/amd_powerplay_destroy. 2. create pp_instance/smumgr/hwmgr/eventmgr in early init, destroy them when lata_fini. 3. in sw_init, create and init asic private smumgr data, and free them when sw_fini. 4. in hw_init, create and init asic private hwmgr data, and free them when hw_fini. 5. export powerplay state: PP_DPM_DISABLED. when user disabled powerplay or hwmgr/eventmgr init failed, powerplay return this state to amdgpu. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amdgpu: use same enter/exit safe mode for gfx_8.Rex Zhu1-94/+1
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: add profiling mode in dpm levelRex Zhu5-4/+24
In some case, App need to run under max stable clock. so export profiling mode: GFX CG was disabled. and user can select the max stable clock of the device. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amdgpu: delete dead definitions of dpm_ip_funcsRex Zhu3-26/+0
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amdgpu: delete dead module parameter:amdgpu_powerplay.Rex Zhu2-5/+0
Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: fix issue can't load another smu firmware.Rex Zhu1-0/+1
need to release failed smu firmware before load another firmware. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: refine code in cz_smumgr.cRex Zhu1-66/+70
cz_smu_init will be called in sw_init. so it should not touch other blocks's firmware as they were not ready. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: fix bug dpm level unexpectly be reset to auto.Rex Zhu2-2/+5
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: Unify dpm level definesRex Zhu7-59/+45
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: delete dpm code for Cz/St.Rex Zhu6-3657/+2
The powerplay implementation has been the default for a while now. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: update all printk to pr_* on smumgrHuang Rui10-45/+45
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: update all printk to pr_* on hwmgrHuang Rui7-43/+43
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: update all printk to pr_* on eventmgrHuang Rui1-1/+1
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: refine print message for amd_powerplayHuang Rui1-24/+24
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: reshuffle headers to make pr_fmt macro before <linux/xxx.h>Huang Rui18-19/+19
This patch reshuffles headers to define pr_fmt before <linux/xxx.h>. It can avoid pr_fmt redefine warnning from linux/xxx.h like below: CC [M] /home/ray/gpu/BUILD/x86_64/linux/drivers/gpu/drm/amd/amdgpu//../powerplay/amd_powerplay.o /home/ray/gpu/BUILD/x86_64/linux/drivers/gpu/drm/amd/amdgpu//../powerplay/amd_powerplay.c:24:0: warning: "pr_fmt" redefined #define pr_fmt(fmt) "[powerplay] " fmt ^ In file included from include/linux/kernel.h:13:0, from include/linux/list.h:8, from include/linux/agp_backend.h:33, Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: add prefix for all powerplay pr_* printsHuang Rui1-2/+8
Powerplay will use them instead of raw printk, and we can dynamic change the debug level with it. The prefix is like below: [ xxx.xxxxxx] amdgpu: [powerplay] ... Suggested-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Huang Rui <[email protected]> Cc: Arindam Nath <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amdgpu: refine gfx_v8 pg code.Rex Zhu1-11/+12
move en/disable GFX CP/SMU_HS PG to function gfx_v8_0_set_powergating_state Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amdgpu: add drm light sleep support for ViRex Zhu1-0/+19
v2: fix copy error. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amdgpu: add cgs interface for enter/exit rlc safe mode.Rex Zhu2-0/+25
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amdgpu: Refine the way to get atom biosKen Xue1-74/+105
There are several ways to check out a ATOMBIOS. In previous codes, try a new way to fetch out vbios/rom, until current vbios/rom is started with 0x55aa, then check if this vbios is ATOMBIOS. Now, try a new way to fetch out vbios until all flags of ATOMBIOS are verified. Signed-off-by: Ken Xue <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/amdgpu: Add DPHY_SCRAM_CNTL register definesHarry Wentland8-0/+50
This is required for DP HBR2 test pattern Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/amdgpu: Add HDMI_DATA_SCRAMBLE register definitionHarry Wentland2-0/+4
This is required by HDMI 2.0 Signed-off-by: Harry Wentland <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amdgpu: cleanup useless extern functionsHuang Rui1-4/+0
Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amdgpu: cleanup useless smu_ucode_xfer_vi.hHuang Rui1-101/+0
This header won't be used at amdgpu, it moved to powerplay. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: fix request smc_sk firmware caseHuang Rui1-0/+4
This patch fixes firmware request error on polaris protection mode. Because we need load smc_sk instead of smc under security protection mode. Signed-off-by: Huang Rui <[email protected]> Tested-by: Evan Quan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: add request_firmware/release_firmware for smu7Huang Rui1-0/+30
Signed-off-by: Huang Rui <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amdgpu: use designated initializersKees Cook5-90/+96
Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amdgpu: Remove checking for atombiosNils Wallménius7-34/+16
This is a left over from radeon, amdgpu doesn't support any non-atombios parts and amdgpu_device_init would bail if the check for atombios failed anyway. Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Nils Wallménius <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/amdgpu: Widen mmio trace register address widthTom St Denis1-2/+2
Support wider address spaces, make it 32-bit so we don't have to revisit this for a while. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/amdgpu: get maximum and used UVD handles (v4)Arindam Nath3-0/+47
Change History -------------- v4: Changes suggested by Emil, Christian - return -ENODATA for asics with unlimited sessions v3: changes suggested by Christian - Add a check for UVD IP block using AMDGPU_HW_IP_UVD query type. - Add a check for asic_type to be less than CHIP_POLARIS10 since starting Polaris, we support unlimited UVD instances. - Add kerneldoc style comment for amdgpu_uvd_used_handles(). v2: as suggested by Christian - Add a new query AMDGPU_INFO_NUM_HANDLES - Create a helper function to return the number of currently used UVD handles. - Modify the logic to count the number of used UVD handles since handles can be freed in non-linear fashion. v1: - User might want to query the maximum number of UVD instances supported by firmware. In addition to that, if there are multiple applications using UVD handles at the same time, he might also want to query the currently used number of handles. For this we add two variables max_handles and used_handles inside drm_amdgpu_info_hw_ip. So now an application (or libdrm) can use AMDGPU_INFO IOCTL with AMDGPU_INFO_HW_IP_INFO query type to get these values. Signed-off-by: Arindam Nath <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: move vi smu firmware declares to powerplay.Rex Zhu2-13/+11
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/amdgpu: De-numberify golden SI registersTom St Denis1-483/+492
Where possible replace numeric constants in the table with their register names. Compile tested + executed on a Tahiti. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27drm/amd/powerplay: add callbacks to move smc firmware request into sw_init phaseHuang Rui2-0/+14
Signed-off-by: Huang Rui <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-27Merge branch 'master' of ↵Dave Airlie25-199/+213
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next Backmerge Linus master to get the connector locking revert. * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux: (645 commits) sysctl: fix proc_doulongvec_ms_jiffies_minmax() Revert "drm/probe-helpers: Drop locking from poll_enable" MAINTAINERS: add Dan Streetman to zbud maintainers MAINTAINERS: add Dan Streetman to zswap maintainers mm: do not export ioremap_page_range symbol for external module mn10300: fix build error of missing fpu_save() romfs: use different way to generate fsid for BLOCK or MTD frv: add missing atomic64 operations mm, page_alloc: fix premature OOM when racing with cpuset mems update mm, page_alloc: move cpuset seqcount checking to slowpath mm, page_alloc: fix fast-path race with cpuset update or removal mm, page_alloc: fix check for NULL preferred_zone kernel/panic.c: add missing \n fbdev: color map copying bounds checking frv: add atomic64_add_unless() mm/mempolicy.c: do not put mempolicy before using its nodemask radix-tree: fix private list warnings Documentation/filesystems/proc.txt: add VmPin mm, memcg: do not retry precharge charges proc: add a schedule point in proc_pid_readdir() ...
2017-01-17drm/amdgpu: add support for new hainan variantsAlex Deucher1-3/+5
New hainan parts require updated smc firmware. Cc: Sonny Jiang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-17drm/amdgpu: change clock gating mode for uvd_v4.Rex Zhu1-32/+10
use sw cg when decode. and hw cg when idle. fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99313 https://bugzilla.kernel.org/show_bug.cgi?id=192161 Signed-off-by: Rex Zhu <[email protected]> Ack-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-17drm/amdgpu: fix program vce instance logic error.Rex Zhu1-9/+16
need to clear bit31-29 in GRBM_GFX_INDEX, then the program can be valid. Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-17drm/amdgpu: fix bug set incorrect value to vce registerRex Zhu1-1/+1
Set the proper bits for clockgating setup. Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-16drm/amdkfd: fix improper return value on errorPan Bian1-1/+3
In function kfd_wait_on_events(), when the call to copy_from_user() fails, the value of return variable ret is 0. 0 indicates success, which is inconsistent with the execution status. This patch fixes the bug by assigning "-EFAULT" to ret when copy_from_user() returns an unexpected value. Signed-off-by: Pan Bian <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2017-01-13Revert "drm/amdgpu: Only update the CUR_SIZE register when necessary"Michel Dänzer4-60/+30
This reverts commits 7c83d7abc9997cf1efac2c0ce384b5e8453ee870 and a1f49cc179ce6b7b7758ae3ff5cdb138d0ee0f56. They caused the HW cursor to disappear under various circumstances in the wild. I wasn't able to reproduce any of them, and I'm not sure what's going on. But those changes aren't a big deal anyway, so let's just revert for now. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=191291 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99143 Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-12drm/amd/powerplay: refine vce dpm update code on Cz.Rex Zhu1-8/+16
Program HardMin based on the vce_arbiter.ecclk if ecclk is 0, disable ECLK DPM 0. Otherwise VCE could hang if switching SCLK from DPM 0 to 6/7 Signed-off-by: Rex Zhu <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-12drm/amdgpu: fix vm_fault_stop on gfx6Flora Cui1-14/+9
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-12drm/amd/powerplay: fix vce cg logic error on CZ/St.Rex Zhu1-2/+2
can fix Bug 191281: vce ib test failed. when vce idle, set vce clock gate, so the clock in vce domain will be disabled. when need to encode, disable vce clock gate, enable the clocks to vce engine. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-12drm/amdgpu: drop the mclk quirk for hainanAlex Deucher1-1/+0
fixed by the new 58 mc firmware. Acked-by: Edward O'Callaghan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-12drm/amdgpu: drop oland quirksAlex Deucher1-11/+0
Fixed by the new 58 MC firmware. Acked-by: Edward O'Callaghan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-12drm/amdgpu/si: load special ucode for certain MC configsAlex Deucher1-1/+10
Special MC ucode is required for these memory configurations. Acked-by: Edward O'Callaghan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-01-12amdkfd: fix spelling mistake in kfd_ioctl_dbg_unrgesiterColin Ian King1-3/+3
Trivial fix to spelling mistake, rename kfd_ioctl_dbg_unrgesiter to kfd_ioctl_dbg_unregister Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>