aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu
AgeCommit message (Collapse)AuthorFilesLines
2016-05-04drm/amdgpu: reduce the ring size for SDMAChristian König3-3/+3
Those are way too large. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-04drm/amdgpu: reduce the ring size for GFXChristian König2-4/+4
Those are way too large. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-04drm/amdgpu: use max_dw in ring_initChristian König10-22/+18
Instead of specifying the total ring size calculate that from the maximum number of dw a submission can have and the number of concurrent submissions. This fixes UVD with 8 concurrent submissions or more. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-04drm/amd: make a type-safe cgs_device struct. (v2)Dave Airlie3-56/+49
This is just a type-safety things to avoid everyone taking void *, it doesn't change anything. v2: agd5f: split out the dal changes into a separate patch. Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-04drm/amdgpu: handle more than 10 UVD sessions (v2)Arindam Nath5-18/+40
Change History -------------- v2: - Make firmware version check correctly. Firmware versions >= 1.80 should all support 40 UVD instances. - Replace AMDGPU_MAX_UVD_HANDLES with max_handles variable. v1: - The firmware can handle upto 40 UVD sessions. Signed-off-by: Arindam Nath <[email protected]> Signed-off-by: Ayyappa Chandolu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-04drm/amd: make some function-local tables static constNils Wallménius2-2/+2
These tables were initialized on stack on each call, avoid that and save a little bit of text size. Reviewed-by: Christian König <[email protected]> Signed-off-by: Nils Wallménius <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-04drm/amdgpu: Mark all instances of struct drm_info_list as constNils Wallménius8-10/+10
All these are compile time constand and the drm_debugfs_create/remove_files functions take a const pointer argument. Reviewed-by: Christian König <[email protected]> Signed-off-by: Nils Wallménius <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-04drm/amd/scheduler: Mark amdgpu_sched_ops constNils Wallménius2-2/+2
This marks the struct amdgpu_sched_ops const and adjusts amd_sched_init to take a const pointer for the ops param. The ops member of struct amd_gpu_scheduler is also changed to const. Reviewed-by: Christian König <[email protected]> Signed-off-by: Nils Wallménius <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-04drm/amd: Mark some tables as constNils Wallménius5-7/+7
This patch marks some compile-time constant tables 'const'. The tables marked in this patch are the low hanging fruit where little other changes were necesary to avoid casting away constness etc. Also mark some tables that are private to a file as static. Reviewed-by: Christian König <[email protected]> Signed-off-by: Nils Wallménius <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-04drm/amdgpu: reuse VMIDs already assigned to a processChristian König1-31/+46
If we don't need to flush we can easily use another VMID already assigned to the process. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-04drm/amdgpu: add a fence after the VM flushChristian König3-14/+35
This way we can track when the flush is done. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-04drm/amdgpu: use a sync object for VMID fences v2Christian König3-32/+132
v2: rebase & cleanup This way we can store more than one fence as user for each VMID. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> (v1) Reviewed-by: Chunming Zhou <[email protected]> (v1) Signed-off-by: Alex Deucher <[email protected]>
2016-05-04drm/amdgpu: merge VM manager and VM context ID structureChristian König2-78/+78
No need to have two of them any more. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-04drm/amdgpu: Set PFLIP_SUBMITTED for crtc after address updateAndrey Grodzovsky1-3/+11
Also add some pflip debug prints. This change allows us to wait on pflip status until the new surface address is actually submitted to the register. This reverts ed3020e923240829dcdfd3343f6e91dc02c63775 drm/amdgpu: Move MMIO flip out of spinlocked region The original change assumed DAL will aquire locks inside DAL implemetion of page_flip callback which eventaully didn't happen. This moves the flip before status update which makes sense for the non-DAL code pathes as well. Signed-off-by: Andrey Grodzovsky <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-04drm/amdgpu: Use lockless gem BO free callbackDaniel Vetter1-1/+1
No dev->struct_mutex anywhere to be seen. Cc: Alex Deucher <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-03drm/amdgpu: make sure vertical front porch is at least 1Alex Deucher1-0/+4
hw doesn't like a 0 value. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-05-03drm/amdgpu: set metadata pointer to NULL after freeing.Dave Airlie1-0/+1
Without this there was a double free of the metadata, which ended up freeing the fd table for me here, and taking out the machine more often than not. I reproduced with X.org + modesetting DDX + latest llvm/mesa, also required using dri3. Cc: [email protected] Reviewed-by: Christian König <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: optionally enable GART debugfs fileChristian König4-14/+42
Keeping the pages array around can use a lot of system memory when you want a large GART. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: remove GART page addr arrayChristian König2-19/+4
Not needed any more. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: use BO pages instead of GART arrayChristian König1-13/+16
Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: change parameter passing in the VM codeChristian König1-46/+54
Make it more flexible by passing src and page addresses directly instead of the structures they contain. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: drop the GTT power of two limitChristian König1-5/+1
As far as I can see that isn't neccessary any more. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amd/amdgpu: Enable clockgating in UVD6 for StoneyTom St Denis1-1/+5
This patch enables clockgating for the UVD6 block in Stoney. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amd/amdgpu: Enable clockgating for UVD5 on TongaTom St Denis1-1/+1
This patch enables clock gating for the UVD5 block with Tonga. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amd/amdgpu: Add SW clock gating support to UVD 5 and 6Tom St Denis2-164/+232
This patch adds support for software clock gating to UVD 5 and UVD 6 blocks with a preliminary commented out hardware gating routine. Currently hardware gating does not work so it's not activated. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: refine code for code style.Rex Zhu1-1/+1
White space fix. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: No need to stop hw init although vce's state was not true.Rex Zhu1-1/+2
This is not a fatal error. v2: add comment why ignore the error here. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: fix issue that can't set vce clock gate.Rex Zhu1-1/+17
Need to soft reset VCE as part of the clockgating sequence. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: use ref to keep job aliveMonk Liu3-3/+15
this is to fix fatal page fault error that occured if: job is signaled/released after its timeout work is already put to the global queue (in this case the cancel_delayed_work will return false), which will lead to NX-protection error page fault during job_timeout_func. Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: rework TDR in scheduler (v2)Monk Liu3-1/+17
Add two callbacks to scheduler to maintain jobs, and invoked for job timeout calculations. Now TDR measures time gap from job is processed by hw. v2: fix typo Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: delay job free to when it's finished (v2)Monk Liu2-2/+10
for those jobs submitted through scheduler, do not free it immediately after scheduled, instead free it in global workqueue by its sched fence signaling callback function. v2: call uf's bo_undef after job_run() call job's sync free after job_run() no static inline __amdgpu_job_free() anymore, just use kfree(job) to replace it. Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu/dce11: fix vertical bars appear on monitorVitaly Prosyak1-60/+5
Fixed mc stop and resume hardware programming sequence. Signed-off-by: Vitaly Prosyak <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: use sched_job_init to initialize sched_jobMonk Liu2-19/+19
Consolidate job initialization in one place rather than duplicating it in multiple places. Signed-off-by: Monk Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: patch cond exec for SDMAMonk Liu3-1/+37
More ground work for conditional execution on SDMA necessary for preemption. Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: support cond execMonk Liu3-0/+15
This adds the groundwork for conditional execution on SDMA which is necessary for preemption. Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: improve vmid assigment V2Chunming Zhou1-0/+14
V2: the signaled items on the LRU maintain their order Signed-off-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: mark amdgpu_allowed_register_entry tables as 'const'Nils Wallménius2-6/+6
Signed-off-by: Nils Wallménius <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: do not store bios_header_start in amdgpu_deviceNils Wallménius2-5/+4
It is only used locally in amdgpu_get_bios Signed-off-by: Nils Wallménius <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: delete unused struct member suspend from amdgpu_deviceNils Wallménius1-1/+0
Signed-off-by: Nils Wallménius <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-05-02drm/amdgpu: use drm_crtc_send_vblank_event()Gustavo Padovan3-3/+3
Replace the legacy drm_send_vblank_event() with the new helper function. Signed-off-by: Gustavo Padovan <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-04-27drm/amdgpu: disable vm interrupts with vm_fault_stop=2Flora Cui2-2/+8
V2: disable all vm interrupts in late_init() Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Ken Wang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-04-27drm/amdgpu: print a message if ATPX dGPU power control is missingAlex Deucher1-1/+4
It will help identify problematic boards. Signed-off-by: Alex Deucher <[email protected]>
2016-04-27Revert "drm/amdgpu: disable runtime pm on PX laptops without dGPU power control"Alex Deucher2-11/+5
This reverts commit bedf2a65c1aa8fb29ba8527fd00c0f68ec1f55f1. See the radeon revert for an extended description. Cc: [email protected]
2016-04-27drm: Protect dev->filelist with its own mutexDaniel Vetter1-5/+5
amdgpu gained dev->struct_mutex usage, and that's because it's walking the dev->filelist list. Protect that list with it's own lock to take one more step towards getting rid of struct_mutex usage in drivers once and for all. While doing the conversion I noticed that 2 debugfs files in i915 completely lacked appropriate locking. Fix that up too. v2: don't forget to switch to drm_gem_object_unreference_unlocked. Cc: Alex Deucher <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-04-21amdgpu/uvd: add uvd fw version for amdgpuSonny Jiang3-1/+5
Was previously always hardcoded to 0. Signed-off-by: Sonny Jiang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-04-21drm/amdgpu: forbid mapping of userptr bo through radeon device fileJérôme Glisse1-0/+2
Allowing userptr bo which are basicly a list of page from some vma (so either anonymous page or file backed page) would lead to serious corruption of kernel structures and counters (because we overwrite the page->mapping field when mapping buffer). This will already block if the buffer was populated before anyone does try to mmap it because then TTM_PAGE_FLAG_SG would be set in in the ttm_tt flags. But that flag is check before ttm_tt_populate in the ttm vm fault handler. So to be safe just add a check to verify_access() callback. Reviewed-by: Christian König <[email protected]> Signed-off-by: Jérôme Glisse <[email protected]> Cc: <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-04-21drm/amdgpu: bump the afmt limit for CZ, ST, PolarisAlex Deucher1-1/+1
Fixes array overflow on these chips. Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-04-21drm/amdgpu: use defines for CRTCs and AMFT blocksAlex Deucher1-2/+2
Prerequiste for the next patch which ups the limits. Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-04-22Merge tag 'v4.6-rc3' into drm-nextDave Airlie15-69/+108
Backmerge 4.6-rc3 for i915. Linux 4.6-rc3
2016-04-18drm/amdgpu/acp: fix resume on CZ systems with AZ audioAlex Deucher1-0/+4
Nothing to do on resume on systems with AZ audio. Signed-off-by: Alex Deucher <[email protected]>