aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu
AgeCommit message (Collapse)AuthorFilesLines
2016-02-10drm/amdgpu: cleanup amdgpu_cs_list_validateChristian König1-35/+31
No need to actually check the current placement. Just use the allowed domains when the threshold is reached. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: fix amdgpu_cs_get_threshold_for_moves handlingChristian König2-9/+14
The threshold should only be computed once. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: fix issue with overlapping userptrsChristian König3-1/+23
Otherwise we could try to evict overlapping userptr BOs in get_user_pages(), leading to a possible circular locking dependency. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]>
2016-02-10drm/amdgpu: fix issue with overlapping userptrsChristian König3-1/+23
Otherwise we could try to evict overlapping userptr BOs in get_user_pages(), leading to a possible circular locking dependency. Signed-off-by: Christian König <[email protected]> Acked-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-02-10drm/amdgpu: remove unnecessary forward declarationNicolai Hähnle1-2/+0
Signed-off-by: Nicolai Hähnle <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Cc: [email protected]
2016-02-10drm/amdgpu: hold reference to fences in amdgpu_sa_bo_new (v2)Nicolai Hähnle1-1/+4
An arbitrary amount of time can pass between spin_unlock and fence_wait_any_timeout, so we need to ensure that nobody frees the fences from under us. A stress test (rapidly starting and killing hundreds of glxgears instances) ran into a deadlock in fence_wait_any_timeout after about an hour, and this race condition appears to be a plausible cause. v2: agd: rebase on upstream Signed-off-by: Nicolai Hähnle <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Cc: [email protected]
2016-02-10drm/amdgpu: fix s4 resumeFlora Cui1-4/+9
No need to re-init asic if it's already been initialized. Skip IB tests since kernel processes are frozen in thaw. Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-02-09vga_switcheroo: Add handler flags infrastructureLukas Wunner1-1/+2
Allow handlers to declare their capabilities and allow clients to obtain that information. So far we have these use cases: * If the handler is able to switch DDC separately, clients need to probe EDID with drm_get_edid_switcheroo(). We should allow them to detect a capable handler to ensure this function only gets called when needed. * Likewise if the handler is unable to switch AUX separately, the active client needs to communicate link training parameters to the inactive client, which may then skip the AUX handshake and set up its output with these pre-calibrated values (DisplayPort specification v1.1a, section 2.5.3.3). Clients need a way to recognize such a situation. The flags for the radeon_atpx_handler and amdgpu_atpx_handler are initially set to 0, this can later on be amended with handler_flags |= VGA_SWITCHEROO_CAN_SWITCH_DDC; when a ->switch_ddc callback is added. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88861 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61115 Tested-by: Lukas Wunner <[email protected]> [MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina 15"] Signed-off-by: Lukas Wunner <[email protected]> Reviewed-by: Darren Hart <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/2b0d93ed6e511ca09e95e45e0b35627f330fabce.1452525860.git.lukas@wunner.de
2016-02-08drma/dmgpu: move cg and pg flags into shared headersAlex Deucher12-171/+139
So they can be used by powerplay. Reviewed-by: Eric Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-08drm/amdgpu: remove unused cg definesAlex Deucher1-9/+0
Leftover from radeon. Reviewed-by: Eric Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-08drm/amdgpu: add a cgs interface to fetch cg and pg flagsAlex Deucher1-0/+6
Needed to pass the cg and pg info to powerplay. Reviewed-by: Eric Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-08drm/amdgpu: be consistent with uvd cg flagsAlex Deucher2-0/+8
Don't do anything if the uvd cg flags are not set. Reviewed-by: Eric Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-08drm/amdgpu: clean up vce pg flags for cz/stAlex Deucher1-2/+1
It was already disabled elsewhere, make it offical. Reviewed-by: Eric Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-08drm/amdgpu: handle vce pg flags properlyAlex Deucher2-0/+6
Don't attempt to start/stop the vce block if pg is disabled. Reviewed-by: Eric Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-08drm/amdgpu: handle uvd pg flags properlyAlex Deucher3-1/+10
Don't attempt to start/stop the uvd block if pg is disabled. Reviewed-by: Eric Huang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-08drm/amdgpu/dpm/ci: switch over to the common pcie caps interfaceAlex Deucher1-6/+5
We already query this at driver init, so use that info. Also handles virtualization cases. Reviewed-by: monk liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-08drm/amdgpu/cik: don't mess with aspm if gpu is root busAlex Deucher1-0/+3
Pcie registers may not be available in a virtualized environment. Reviewed-by: monk liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-08drm/amdgpu: add pcie cap module parameters (v2)Alex Deucher3-65/+92
Allows the user to force the supported pcie gen and lane config on both the asic and the chipset. Useful for debugging pcie problems and for virtualization where we may not be able to query the pcie bridge caps. Default to: gen: chipset 1/2, asic 1/2/3 lanes: 1/2/4/8/16 v2: fix bare metal case Reviewed-by: monk liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-05Merge branch 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie10-59/+107
into drm-fixes - fix and enable iceland/topaz support - handle WC on platforms that don't support it * 'drm-fixes-4.5' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: disable uvd and vce clockgating on Fiji drm/amdgpu: remove exp hardware support from iceland drm/amdgpu: load MEC ucode manually on iceland drm/amdgpu: don't load MEC2 on topaz drm/amdgpu: drop topaz support from gmc8 module drm/amdgpu: pull topaz gmc bits into gmc_v7 drm/amdgpu: The VI specific EXE bit should only apply to GMC v8.0 above drm/amdgpu: iceland use CI based MC IP drm/amdgpu: move gmc7 support out of CIK dependency drm/amdgpu/gfx7: enable cp inst/reg error interrupts drm/amdgpu/gfx8: enable cp inst/reg error interrupts drm/amdgpu: mask out WC from BO on unsupported arches drm/radeon: mask out WC from BO on unsupported arches drm: add helper to check for wc memory support drm/amdgpu: no need to load MC firmware on fiji
2016-02-05Merge tag 'drm-amdkfd-fixes-2016-01-28' of ↵Dave Airlie2-2/+2
git://people.freedesktop.org/~gabbayo/linux into drm-fixes two static checker fixes. * tag 'drm-amdkfd-fixes-2016-01-28' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: Remove unnecessary cast in kfree drm/amdgpu: fix non-ANSI declaration of amdgpu_amdkfd_gfx_*_get_functions()
2016-02-03drm/amdgpu: disable uvd and vce clockgating on FijiAlex Deucher1-2/+1
Doesn't work properly yet. Reviewed-by: Christian König <[email protected]> Reviewed-by: Sonny Jiang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-02drm/amdgpu: remove exp hardware support from icelandAlex Deucher1-5/+5
It's working now. bug: https://bugs.freedesktop.org/show_bug.cgi?id=92270 Reviewed-by: Ken Wang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-02-02drm/amdgpu: load MEC ucode manually on icelandAlex Deucher1-4/+10
The smc doesn't handle it. Reviewed-by: Ken Wang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-02-02drm/amdgpu: don't load MEC2 on topazAlex Deucher2-11/+5
Not validated. Reviewed-by: Ken Wang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-02-02drm/amdgpu: drop topaz support from gmc8 moduleAlex Deucher1-27/+1
topaz is actually gmc7. Reviewed-by: Ken Wang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-02-02drm/amdgpu: pull topaz gmc bits into gmc_v7Alex Deucher1-2/+33
Add the topaz golden settings into the gmc7 module. Reviewed-by: Ken Wang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-02-02drm/amdgpu: The VI specific EXE bit should only apply to GMC v8.0 aboveKen Wang1-1/+1
Reviewed-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Ken Wang <[email protected]> Cc: [email protected]
2016-02-02drm/amdgpu: iceland use CI based MC IPKen Wang2-4/+13
Reviewed-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Ken Wang <[email protected]> Cc: [email protected]
2016-02-02drm/amdgpu: move gmc7 support out of CIK dependencyAlex Deucher1-1/+2
It's used by iceland which is VI. Reviewed-by: Ken Wang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-02-02drm/amdgpu/gfx7: enable cp inst/reg error interruptsAlex Deucher1-1/+19
Enable CP register/instruction error interrupts. Useful for debugging command stream problems. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-02drm/amdgpu/gfx8: enable cp inst/reg error interruptsAlex Deucher1-0/+10
Enable CP register/instruction error interrupts. Useful for debugging command stream problems. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-02-02drm/amdgpu: mask out WC from BO on unsupported archesOded Gabbay1-0/+8
Reviewed-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Oded Gabbay <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-01-29drm/amdgpu: no need to load MC firmware on fijiAlex Deucher1-4/+2
Vbios does this for us on asic_init. Reviewed-by: Ken Wang >[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-01-28drm/amdgpu: only move pt bos in LRU list on successNicolai Hähnle1-2/+2
This fixes a race condition in the error case: since the pt bos have not necessarily been reserved in case of an error, we could move a pt bo that is currently in the middle of being evicted/moved by another process, which then resulted in a BUG_ON in ttm_bo_add_to_lru. Reviewed-by: Christian König <[email protected]> Signed-off-by: Nicolai Hähnle <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-01-28drm/amdgpu: fix non-ANSI declaration of amdgpu_amdkfd_gfx_*_get_functions()Colin Ian King2-2/+2
amdgpu_amdkfd_gfx_7_get_functions and amdgpu_amdkfd_gfx_8_0_get_functions have no parameters, so use the normal void parameter convention to make them match their prototypes in the header file drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
2016-01-26drm/amdgpu: don't init fbdev if we don't have any connectorsAlex Deucher1-0/+4
Don't init fbdev if we don't have connectors. E.g., if you have a PX laptop with the displays attached to an IGP with no driver support, you may end up with a blank screen rather than falling back to vesa, etc. Based on a similar radeon patch from Rob Clark. Signed-off-by: Alex Deucher <[email protected]>
2016-01-22drm/amdgpu: fix next_rptr handling for debugfsChristian König1-1/+1
That somehow got lost. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Acked-by: Alex Deucher <[email protected]>
2016-01-22drm/amdgpu: fix amdgpu_bo_pin_restricted VRAM placing v2Christian König1-1/+2
We could pin BOs into invisible VRAM otherwise. v2: make logic more readable as suggested by Michel Cc: [email protected] Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (v1) Reviewed-by: Rex Zhu <[email protected]> (v1) Reviewed-by: Michel Dänzer <[email protected]>
2016-01-22drm/amd/amdgpu: Improve amdgpu_dpm* macros to avoid unexpected result (v2)Eric Huang1-22/+22
The two macros returns are values which probably are used in the expression of calculation. Without the brackets the result of the expression may be wrong. v2: agd: squash both patches together Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Eric Huang <[email protected]>
2016-01-19drm/amdgpu: Allow the driver to load if amdgpu.powerplay=1 on asics without ↵Jordan Lazare1-7/+18
powerplay support Avoid setting pp_enabled if there is no powerplay implementation. Signed-off-by: Jordan Lazare <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-01-19drm/amdgpu: Use drm_calloc_large for VM page_tables arrayMichel Dänzer1-4/+3
It can be big, depending on the VM address space size, which is tunable via the vm_size module parameter. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93721 Reviewed-by: Christian König <[email protected]> Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-01-15drm/amdgpu: Add some tweaks to gfx 8 soft resetAlex Deucher1-1/+22
Reviewed-by: Junwei Zhang <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Ken Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-01-15drm/amdgpu: fix tonga smu resumeAlex Deucher1-15/+2
Need to make sure smu buffers are pinned on resume. This matches what Fiji does. Cc: [email protected] Reviewed-by: Junwei Zhang <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Ken Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-01-14drm/amdgpu: add missing irq.h includeDave Airlie1-0/+1
this fixes the build on arm. Signed-off-by: Dave Airlie <[email protected]>
2016-01-13drm/amdgpu: validate duplicates firstChristian König1-2/+2
Most VM BOs end up in the duplicates list, validate it first make -ENOMEM less likely. Signed-off-by: Christian König <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-01-13drm/amdgpu: move VM page tables to the LRU end on CS v2Christian König3-1/+35
This makes it less likely to run into an ENOMEM because VM page tables are evicted last. v2: move the BOs in the LRU tail after validation Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-01-13drm/amdgpu: use kobj_to_dev()Geliang Tang1-1/+1
Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-01-13drm/amdgpu/cz: force vce clocks when sclks are forcedAlex Deucher1-1/+23
Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-01-13drm/amdgpu/cz: force uvd clocks when sclks are forcedAlex Deucher1-0/+24
Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-01-13drm/amdgpu/cz: add code to enable forcing VCE clocksAlex Deucher2-1/+98
VCE DPM works similarly to SCLK DPM. Add a similar interface for VCE for forcing the VCE clocks. Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>