aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-14drm/amd/powerplay: add module parameter to mask pp featuresRex Zhu2-0/+5
Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/powerplay: add feature flags in hwmgr to enable/disable special ↵Rex Zhu1-0/+14
features. Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/powerplay: mark symbols static where possible on tonga/iceland.Rex Zhu2-8/+8
Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu: use error label to handle exceptional caseHuang Rui1-9/+13
Use error label to decrease global item unref and make codes more readable. Reviewed-by: Christian König <[email protected]> Signed-off-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu: update gart_pin_size if bo is in GTTFlora Cui1-1/+1
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu: bind GTT on demandChristian König8-7/+84
We don't really need the GTT table any more most of the time. So bind it only on demand. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu: fix GTT offset handlingChristian König1-5/+5
Otherwise we run into problems on 32bit systems with more than 4GB GART. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm: modify drm_global_item_ref to avoid two times of writing ref->objectHuang Rui1-10/+14
In previous drm_global_item_ref, there are two times of writing ref->object if item->refcount is 0. So this patch does a minor update to put alloc and init ref firstly, and then to modify the item of glob array. Use "else" to avoid two times of writing ref->object. It can make the code logic more clearly. Reviewed-by: Christian König <[email protected]> Signed-off-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu:implement CONTEXT_CONTROL (v5)Monk Liu6-2/+79
v1: for gfx8, use CONTEXT_CONTROL package to dynamically skip preamble CEIB and other load_xxx command in sequence. v2: support GFX7 as well. remove cntxcntl in compute ring funcs because CPC doesn't support this packet. v3: fix reduntant judgement in cntxcntl. v4: some cleanups, don't change cs_submit() v5: keep old MESA supported & bump up KMS version. Signed-off-by: Monk Liu <[email protected]> Ack-by: Chunming Zhou <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/powerplay: declare functions instand of include header file.Rex Zhu2-5/+6
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]>
2016-09-14drm/amd/powerplay: calculate flexible array member's address.Rex Zhu3-83/+140
Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu/si: Call amdgpu_ttm_set_active_vram_size from si_dma_start/stopMichel Dänzer1-0/+5
Without this, we were only ever using the first 256MB of VRAM. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97593 Tested-by: Konstantin A. Lepikhov <[email protected]> Tested-by: Arek Ruśniak <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu: free the BO in kernel by helper amdgpu_bo_free_kernel()Junwei Zhang5-46/+16
Signed-off-by: Junwei Zhang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu: add a new helper to free a BO in kernel allocationsJunwei Zhang2-0/+31
Free the BO allocated by amdgpu_bo_create_kernel() Signed-off-by: Junwei Zhang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/amdgpu: Fix return values in SI DPM codeTom St Denis1-2/+8
Fix a couple of spots where errors were not returned as well as add some error messages to si_patch_dependency_based_on_leakage() which were not being read. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu: move some release handles into fail labels (v2)Huang Rui1-13/+12
Clean up the codes to move the release handles into fail labels. v2: squash in Christian's regression fix Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/amdgpu: Remove double lock from gfx v6Tom St Denis1-4/+0
The function gfx_v6_0_get_cu_info() was taking the grbm_idx_mutex which was then taken by a dependent function gfx_v6_0_get_cu_active_bitmap(). This patch removes the select from the parent function to avoid the double lock. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/amdgpu: Convert messages in gmc v6 to dev_*()Tom St Denis1-8/+8
Make the kernel log messaging more consistent and use the dev_*() functions instead of a mix of DRM_*() and printk(). Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/amdgpu: Comment out currently unused SI DPM structTom St Denis1-0/+2
The tahiti_le structure is not currently used. Comment it out to avoid warnings. Signed-off-by: Tom St Denis <[email protected]> Acked-by: Edward O'Callaghan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/amdgpu: Tidy up SI SMC code (v2)Tom St Denis3-22/+12
As well as merge SMC clock functions into one to reduce LOC. v2: Fix swapped ck enable bit bug: https://bugs.freedesktop.org/show_bug.cgi?id=97801 Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/amdgpu: Tidy up SI IH codeTom St Denis1-22/+8
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/amdgpu: Correct whitespace in SI DPM codeTom St Denis1-232/+209
Replace 8 spaces with tabs, correct {} braces, etc. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/amdgpu: Clean up SI DPM table assignmentsTom St Denis1-32/+10
Hoist common assignments out of cases. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/amdgpu: Allow calling si_dpm_fini at any pointTom St Denis1-3/+3
Allow calling fini even if ps array is not allocated. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/amdgpu: Tidy up SI DMA codeTom St Denis1-30/+5
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/powerplay: fix issue power containment not enabled on Tonga.Rex Zhu1-3/+0
Signed-off-by: Rex Zhu <[email protected]> Acked-by: Flora Cui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/powerplay: enable/disable auto thermal throttle for tonga.Rex Zhu1-0/+82
Signed-off-by: Rex Zhu <[email protected]> Acked-by: Flora Cui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/amdgpu: S4 issue for amdgpu (v2)jimqu2-8/+35
reset the asic if adapter is not powerdown when doing freeze() thaw() and restore(), in order to get a valid state of adapter. v2: squash in warning fix from Rex Signed-off-by: JimQu <[email protected]> Acked-by: Christian König <[email protected]> Tested By: Shawn Starr <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amdgpu: change job->ctx field nameMonk Liu4-9/+9
job->ctx actually is a fence_context of the entity it belongs to, naming it as ctx is too vague, and we'll need add amdgpu_ctx into the job structure later. Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amdgpu: new method to sync ce&deMonk Liu1-18/+6
sync switch buffer scheme with windows kmd for gfx v8, step2: Insert 128NOP after&before VM flush to prevent CE vm fault. Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amdgpu: add VCE VM mode supportMaruthi Srinivas Bayyavarapu2-3/+64
This adds VCE VM mode support from Stoney onwards. Session tracking is an open issue, yet to be supported. v2: Fixed warnings from checkpatch.pl Signed-off-by: Maruthi Bayyavarapu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amd/amdgpu: Merge get_wptr functions in gfx6Tom St Denis1-20/+11
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amd/amdgpu: Merge get_rptr functions in gfx8Tom St Denis1-8/+3
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amd/amdgpu: Merge get_rptr functions in gfx7Tom St Denis1-8/+3
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amd/amdgpu: Merge get_rptr functions in gfx6Tom St Denis1-8/+3
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amd/amdgpu: Various tidy ups for gfx6Tom St Denis1-35/+5
Various whitespace and logical simplifications for gfx6. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amd/amdgpu: Simplify mask creation in gfx6Tom St Denis1-7/+1
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amd/amdgpu: Add GRBM lock to various SI functionsTom St Denis1-0/+8
Add missing lock around SE/SH/INSTANCE selections. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amd/powerplay: original power state table should not be changed.Rex Zhu3-5/+16
power state table was set based on vbios and should not be changed. when client need to change power state, just make a copy and send to smu. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amd/powerplay: refine struct name for coding style reason.Rex Zhu1-11/+9
delete useless member. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amd/powerplay: add vce state tables initialize for ppt v1.Rex Zhu2-5/+75
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amd/powerplay: refine struct name for code style reason.Rex Zhu3-4/+4
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amdgpu: prevent command submission failures under memory pressure v2Christian König2-1/+63
As last resort try to evict BOs from the current working set into other memory domains. This effectively prevents command submission failures when VM page tables have been swapped out. v2: fix typos Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amdgpu: only try again if we actually run into -ENOMEMChristian König1-5/+3
All other errors can't be fixed by using a different memory domain. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/radeon: wire up a pci shutdown callbackAlex Deucher2-1/+14
Normally on shutdown or reboot we don't care about necessarily making sure the hw is in a good state because the system is about to be powered down or reset. However, after a shutdown or reboot in a VM, it's best to tear down the hw properly otherwise there can be problems with the next VM use. Reviewed-by: Christian König <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amdgpu: wire up a pci shutdown callbackAlex Deucher1-0/+14
Normally on shutdown or reboot we don't care about necessarily making sure the hw is in a good state because the system is about to be powered down or reset. However, after a shutdown or reboot in a VM, it's best to tear down the hw properly otherwise there can be problems with the next VM use. Reviewed-by: Christian König <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/radeon: handle runtime pm in drm pre/post closeAlex Deucher1-0/+4
Close was not handled correctly. Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amdgpu: handle runtime pm in drm pre/post closeAlex Deucher1-0/+4
Close was not handled correctly. Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/radeon: handle runtime pm correctly in amdgpu_driver_open_kmsAlex Deucher1-6/+7
Need to fix the error paths. Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-02drm/amdgpu: handle runtime pm correctly in amdgpu_driver_open_kmsAlex Deucher1-8/+9
Need to fix the error paths. Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>