summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
Commit message (Collapse)AuthorAgeFilesLines
* drm/amdgpu: fix warning with powerplay disabled.Dave Airlie2016-06-101-1/+1
| | | | | | This just fixes a warning when you disable powerplay. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/amd/powerplay: delete useless code as pptable changed in vbios.Rex Zhu2016-06-091-21/+0
| | | | | | | | The vbios table changed so this code is useless now. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/powerplay: fix bug visit array out of boundsRex Zhu2016-06-092-2/+2
| | | | | | | Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix smu ucode memleak (v2)Monk Liu2016-06-093-0/+5
| | | | | | | | | | Properly release the smu ucode in powerplay. v2: agd: add polaris as well Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: add release firmware for cgsMonk Liu2016-06-092-0/+18
| | | | | | | | | Powerplay uses cgs to load the firmware so add a function to release it as well to avoid leaking it on driver unload. Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix tonga smu_fini mem leakMonk Liu2016-06-091-0/+5
| | | | | | Signed-off-by: Monk Liu <Monk.Liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix fiji smu fini mem leakMonk Liu2016-06-091-0/+4
| | | | | | Signed-off-by: Monk Liu <Monk.Liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix cik sdma ucode memleakMonk Liu2016-06-091-0/+11
| | | | | | Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix sdma24 ucode mem leakMonk Liu2016-06-091-0/+10
| | | | | | Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix sdma3 ucode mem leakMonk Liu2016-06-091-0/+10
| | | | | | Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix uvd fini mem leakMonk Liu2016-06-091-9/+10
| | | | | | Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix gfx 7 ucode mem leakMonk Liu2016-06-091-0/+17
| | | | | | Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix gfx8 ucode mem leakMonk Liu2016-06-091-1/+21
| | | | | | Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix missing free wb for cond_execMonk Liu2016-06-091-0/+1
| | | | | | Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix memleak in pptable_initMonk Liu2016-06-092-30/+32
| | | | | | Signed-off-by: Monk Liu <Monk.Liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix mem leak in atombiosMonk Liu2016-06-091-1/+3
| | | | | | Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix mem leak in pplib/hwmgrMonk Liu2016-06-091-0/+7
| | | | | | Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix mem leak in smumgrMonk Liu2016-06-091-0/+1
| | | | | | Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: add pipeline sync while vmid switch in same ctxChunming Zhou2016-06-093-6/+13
| | | | | | | | | | Since vmid-mgr supports vmid sharing in one vm, the same ctx could get different vmids for two emits without vm flush, vm_flush could be done in another ring. Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: vBIOS post only call when mem_size zeroMonk Liu2016-06-091-2/+1
| | | | | | | Signed-off-by: Monk Liu <Monk.Liu@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>
* drm/amdgpu: modify sdma start sequenceMonk Liu2016-06-093-8/+24
| | | | | | | | | | | | | | | | | | should fist halt engine, and then doing the register programing, and later unhalt engine, and finally run ring_test. this help fix reloading driver hang issue of SDMA ring original sequence is wrong for it programing engine after unhalt, which will lead to fault behavior when doing driver reloading after unloaded. Signed-off-by: Monk Liu <Monk.Liu@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>
* drm/amdgpu: init more register for sdmaMonk Liu2016-06-093-0/+6
| | | | | | | | | | This help fix reloading driver hang issue of SDMA ring Signed-off-by: Monk Liu <Monk.Liu@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>
* drm/amdgpu: clear SA bo when createdMonk Liu2016-06-091-0/+1
| | | | | | | | | | This help fix reloading driver hang issue of SDMA ring Signed-off-by: Monk Liu <Monk.Liu@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>
* drm/amdgpu: fix fw leak in non-powerplay dpm codeAlex Deucher2016-06-094-0/+18
| | | | | | We need to release the firmware on driver tear down. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: fix pplib finish bugMonk Liu2016-06-093-10/+5
| | | | | | | | | | | | | 1,should use late_fini to kfree all resource otherwise the released pointer maybe accessed in IRQ ip fini routine. 2,hwmgr should not be kfree by pem_fini which is invoked by hw fini path. Signed-off-by: Monk Liu <Monk.Liu@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>
* drm/amdgpu: impl late_fini for amdgpu_pp_ipMonk Liu2016-06-091-0/+17
| | | | | | | | | This implements late_init support for powerplay. Signed-off-by: Monk Liu <Monk.Liu@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>
* drm/amdgpu: add late_fini for ip_funcsMonk Liu2016-06-091-0/+1
| | | | | | | | | | | This give IP modules an optional late cleanup function. This is needed to handle tricky inter-module dependencies during tear down. Signed-off-by: Monk Liu <Monk.Liu@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>
* drm/admgpu/powerplay/polaris: fix powertune table uploadRex Zhu2016-06-091-1/+1
| | | | | | | | | Exclude AVFS related fields when update powertune table to hw. The driver shouldn't set them directly. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu/iceland: Set SC_PA_RASTER_CONFIG according to different RB enabledKen Wang2016-06-091-1/+5
| | | | | | | | fix the raster config setting for different iceland configs. Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* Merge branch 'drm-next-4.7' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2016-05-2721-181/+182
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next AMD GPU bugfixes: - Various powerplay bug fixes - Add some new polaris pci ids - misc bug fixes and code cleanups * 'drm-next-4.7' of git://people.freedesktop.org/~agd5f/linux: (27 commits) drm/amd: add Kconfig dependency for ACP on DRM_AMDGPU drm/amdgpu: Fix hdmi deep color support. drm/amdgpu: fix bug in fence driver fini drm/amd/powerplay/hwmgr: use kmemdup drm/amd/powerplay/hwmgr: use kmemdup drm/amd/powerplay/hwmgr: use kmemdup drm/amd/powerplay: fix bugs of checking if dpm is running on Tonga drm/amdgpu: update Polaris11 golden setting drm/amdgpu: Add more Polaris 11 PCI IDs drm/amdgpu: update Polaris10 golden setting drm/amdgpu: add more Polaris10 DID drm/amd/amdgpu : Remove unused variable drm/amd/amdgpu : Remove unused variable drm/amd/amdgpu : Remove unused variable drm/amd/amdgpu/cz_dpm: Remove unused variable drm/amd/amdgpu : Remove unused variable drm/amd/powerplay: use ARRAY_SIZE() to calculate array size. drm/amdgpu: fix array out of bounds drm/radeon: fix array out of bounds drm/amd/powerplay: fix a bug on updating sclk for Tonga ...
| * drm/amd: add Kconfig dependency for ACP on DRM_AMDGPUJeff Mahoney2016-05-251-0/+1
| | | | | | | | | | | | | | | | | | | | The DRM_AMD_ACP option doesn't have any dependencies and selects MFD_CORE, which results in MFD_CORE=y. Since the code is only called from DRM_AMDGPU, it should depend on it. Adding the dependency results in MFD_CORE being selected as a module again if amdgpu is also a module. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: Fix hdmi deep color support.Mario Kleiner2016-05-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When porting the hdmi deep color detection code from radeon-kms to amdgpu-kms apparently some kind of copy and paste error happened, attaching an else branch to the wrong if statement. The result is that hdmi deep color mode is always disabled, regardless of gpu and display capabilities and user wishes, as the code mistakenly thinks that the display doesn't provide the required max_tmds_clock limit and falls back to 8 bpc. This patch fixes deep color support, as tested on a R9 380 Tonga Pro + suitable display, and should be backported to all kernels with amdgpu-kms support. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Cc: stable@vger.kernel.org Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: fix bug in fence driver finiMonk Liu2016-05-251-1/+1
| | | | | | | | | | | | | | | | | | Using wrong counter for walking fences. Fixes a crash when unloading the driver. Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amd/powerplay/hwmgr: use kmemdupMuhammad Falak R Wani2016-05-191-3/+3
| | | | | | | | | | | | | | | | | | Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amd/powerplay/hwmgr: use kmemdupMuhammad Falak R Wani2016-05-191-3/+3
| | | | | | | | | | | | | | | | | | Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amd/powerplay/hwmgr: use kmemdupMuhammad Falak R Wani2016-05-191-3/+3
| | | | | | | | | | | | | | | | | | Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amd/powerplay: fix bugs of checking if dpm is running on TongaEric Huang2016-05-181-4/+4
| | | | | | | | | | | | | | | | Fixes OD failures on Tonga. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: update Polaris11 golden settingFlora Cui2016-05-183-3/+6
| | | | | | | | | | | | Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: Add more Polaris 11 PCI IDsFlora Cui2016-05-181-2/+5
| | | | | | | | | | | | Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: update Polaris10 golden settingFlora Cui2016-05-182-1/+2
| | | | | | | | | | | | Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: add more Polaris10 DIDFlora Cui2016-05-181-0/+9
| | | | | | | | | | | | Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amd/amdgpu : Remove unused variableMuhammad Falak R Wani2016-05-181-2/+1
| | | | | | | | | | | | | | | | Remove unused variable 'ret', and directly return 0. Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amd/amdgpu : Remove unused variableMuhammad Falak R Wani2016-05-181-2/+1
| | | | | | | | | | | | | | | | Remove unused variable 'ret', and directly return 0. Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amd/amdgpu : Remove unused variableMuhammad Falak R Wani2016-05-181-2/+1
| | | | | | | | | | | | | | | | Remove unused variable 'ret', and directly return 0. Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amd/amdgpu/cz_dpm: Remove unused variableMuhammad Falak R Wani2016-05-181-9/+4
| | | | | | | | | | | | | | | | | | Remove unused variable 'ret' from functions where it was not used anyway, and directly return 0. Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amd/amdgpu : Remove unused variableMuhammad Falak R Wani2016-05-181-2/+1
| | | | | | | | | | | | | | | | Remove unused variable 'ret', and directly return 0. Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amd/powerplay: use ARRAY_SIZE() to calculate array size.Muhammad Falak R Wani2016-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | It is preferred to use ARRAY_SIZE() for size calculation, instead using sizeof(array)/sizeof(*array). It makes the code more readable. Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amdgpu: fix array out of boundstom will2016-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | When the initial value of i is greater than zero, it may cause endless loop, resulting in array out of bounds, fix it. This is a port of the radeon fix to amdgpu. Signed-off-by: tom will <os@iscas.ac.cn> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amd/powerplay: fix a bug on updating sclk for TongaEric Huang2016-05-131-1/+1
| | | | | | | | | | | | | | | | Update sclk smc table rather than mclk smc table for sclk updates. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/amd/powerplay: fix a bug on updating sclk for FijiEric Huang2016-05-131-1/+1
| | | | | | | | | | | | | | | | Update sclk smc table rather than mclk smc table for sclk updates. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
OpenPOWER on IntegriCloud