summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drm/ttm: use try_lock in ttm_bo_delayed_delete againChristian König2017-12-181-4/+9
| | | | | | | | | | | We only need to wait for the contended lock when the reservation object is shared or when we want to remove everything. A trylock should be sufficient in all other cases. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Roger He <Hongbo.He@amd.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: restore uvd fence seq in uvd resumeJim Qu2017-12-181-0/+2
| | | | | | | | | otherwise, uvd block will be never powered up in ring begin_use() callback. uvd ring test will be fail in resume in rumtime pm. Signed-off-by: Jim Qu <Jim.Qu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: always cancel uvd idle handler in uvd suspendJim Qu2017-12-181-2/+2
| | | | | | Signed-off-by: Jim Qu <Jim.Qu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: rename amdgpu_get_pcie_infoAlex Deucher2017-12-185-5/+5
| | | | | | | add device to the name for consistency. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: move amdgpu_need_backup to amdgpu_object.cAlex Deucher2017-12-183-9/+8Star
| | | | | | | It's the only place it's used. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: rename amdgpu_gpu_recoverAlex Deucher2017-12-187-8/+10
| | | | | | | add device to the name for consistency. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: move dummy page functions to amdgpu_gart.cAlex Deucher2017-12-183-50/+47Star
| | | | | | | It's the only place they are used. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: rename amdgpu_need_postAlex Deucher2017-12-183-6/+6
| | | | | | | add device to the name for consistency. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: rename ip block helper functionsAlex Deucher2017-12-1814-246/+252
| | | | | | | add device to the name for consistency. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: move fw_reserve functions to amdgpu_ttm.cAlex Deucher2017-12-183-100/+97Star
| | | | | | | It's the only place they are used. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: rename amdgpu_*_location functionsAlex Deucher2017-12-186-14/+18
| | | | | | | add device to the name for consistency. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: move amdgpu_doorbell_get_kfd_info to amdgpu_amdkfd.cAlex Deucher2017-12-183-38/+34Star
| | | | | | | It's the only place it's used. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: rename amdgpu_pci_config_resetAlex Deucher2017-12-184-4/+4
| | | | | | | add device for consistency with other functions in this file. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: rename amdgpu_program_register_sequenceAlex Deucher2017-12-1814-311/+311
| | | | | | | add device for consistency with other functions in this file. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: rename amdgpu_wb_* functionsAlex Deucher2017-12-1810-46/+46
| | | | | | | add device for consistency. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: move debugfs functions to their own fileAlex Deucher2017-12-186-785/+838
| | | | | | | amdgpu_device.c was getting pretty cluttered. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: rename amdgpu_suspend to amdgpu_device_ip_suspendAlex Deucher2017-12-183-6/+6
| | | | | | | for consistency with the other functions in that file. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: use consistent naming for static funcs in amdgpu_device.cAlex Deucher2017-12-181-86/+90
| | | | | | | | Prefix the functions with device or device_ip for functions which deal with ip blocks for consistency. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: move atom functions from amdgpu_device.cAlex Deucher2017-12-183-235/+236
| | | | | | | and move them to amdgpu_atombios.c for consistency. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: remove redundant null check of array 'data'Colin Ian King2017-12-151-2/+1Star
| | | | | | | | | | | | The null check on aconnector->base.edid_blob_ptr->data is redundant since data is an array and can never be null. Remove it. Detected by CoverityScan, CID#1460369 ("Array compared against 0") Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: setup the shared and private apertures on gfx9Alex Deucher2017-12-152-5/+20
| | | | | | | Same as previous asics. This was not yet set for gfx9. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: Simplify amdgpu_lockup_timeout usage.Andrey Grodzovsky2017-12-155-18/+11Star
| | | | | | | | | With introduction of amdgpu_gpu_recovery we don't need any more to rely on amdgpu_lockup_timeout == 0 for disabling GPU reset. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: Add gpu_recovery parameterAndrey Grodzovsky2017-12-158-7/+19
| | | | | | | | | | | | | Add new parameter to control GPU recovery procedure. v2: Add auto logic where reset is disabled for bare metal and enabled for SR-IOV. Allow forced reset from debugfs. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/ttm: use an ttm operation ctx for ttm_bo_move_xxxRoger He2017-12-157-24/+18Star
| | | | | | | | include ttm_bo_move_memcpy and ttm_bo_move_ttm Signed-off-by: Roger He <Hongbo.He@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/ttm: enable eviction for Per-VM-BORoger He2017-12-151-6/+5Star
| | | | | | | | | allow eviction of BOs reserved by the caller when they are not part of the current working set. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Roger He <Hongbo.He@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: set allow_reserved_eviction and resv when bo allocation and csRoger He2017-12-152-2/+12
| | | | | | | | | | enable eviction of other per VM BOs during allocation and allows reaping of deleted BOs during CS. Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Roger He <Hongbo.He@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/ttm: add allow_reserved_eviction and resv into ttm_operation_ctxRoger He2017-12-151-0/+4
| | | | | | | | | allow_reserved_eviction: Allow eviction of reserved BOs resv: Reservation object to allow reserved evictions with Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Roger He <Hongbo.He@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amdgpu: add enumerate for PDB/PTB v3Chunming Zhou2017-12-142-19/+61
| | | | | | | | | | | v2: remove SUBPTB member v3: remove last_level, use AMDGPU_VM_PTB directly instead. Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: dal 3.1.25Tony Cheng2017-12-141-1/+1
| | | | | | | Signed-off-by: Tony Cheng <tony.cheng@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: Add TODO item to remove vector.cHarry Wentland2017-12-141-0/+3
| | | | | | | Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: Remove grph_object_id.c and move function to bios_parserHarry Wentland2017-12-144-80/+47Star
| | | | | | | Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: Remove redundant NULL check in DCE11 HWSSHarry Wentland2017-12-141-2/+1Star
| | | | | | | | | We already check this a couple lines earlier. Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Jordan Lazare <Jordan.Lazare@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: use clamping rather than truncation for CM fp conversionsDmytro Laktyushkin2017-12-143-13/+29
| | | | | | | Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: remove format_control from set_cursor_attributesYue Hin Lau2017-12-141-7/+0Star
| | | | | | | Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com> Reviewed-by: Eric Bernstein <Eric.Bernstein@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: Move wait for hpd ready out from edp power control.Yongqiang Sun2017-12-147-39/+36Star
| | | | | | | | | | | | | | | | | | | | It may take over 200ms for wait hpd ready. To optimize the resume time, we can power on eDP in init_hw, wait for hpd ready when doing link training. also create separate eDP enable function to make sure eDP is powered up before doing and DPCD access, as HPD low will result in DPDC transaction failure. After optimization, setpowerstate 145ms -> 9.8ms, DPMS 387ms -> 18.9ms Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com> Signed-off-by: Tony Cheng <tony.cheng@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: fix missing pixel clock adjustment for dongleEric Yang2017-12-141-1/+3
| | | | | | | | Signed-off-by: Eric Yang <Eric.Yang2@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Reviewed-by: Andrew Jiang <Andrew.Jiang@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: Move OPP mpc tree initialization to hw_initEric Bernstein2017-12-143-7/+3Star
| | | | | | | | | Move OPP initialization of mpc tree parameters to hw_init function. Signed-off-by: Eric Bernstein <eric.bernstein@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: use REG_UPDATE for MPC muxEric Bernstein2017-12-141-4/+4
| | | | | | | | | Use REG_UPDATE instead of REG_SET for programming MPC out mux. Signed-off-by: Eric Bernstein <eric.bernstein@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: Correct fixed point calculation.Vitaly Prosyak2017-12-141-1/+1
| | | | | | | | | | | When convert from fixed31_32 to other fixed point format use math operation round instead of floor. Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by: Roman Li <Roman.Li@amd.com> Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: OPTC cleanup/implementationYue Hin Lau2017-12-144-174/+244
| | | | | | | Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: Move unity TF type to predefined typesVitaly Prosyak2017-12-143-5/+6
| | | | | | | | | Also handle fixpoint y values for CM curves Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: dpp clean upYue Hin Lau2017-12-142-7/+4Star
| | | | | | | Signed-off-by: Yue Hin Lau <Yuehin.Lau@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: add assert to verify dcn_calc input validityDmytro Laktyushkin2017-12-141-0/+11
| | | | | | | | | This reverts commit 978482d0de86 Revert noisy assert messages Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: Add dppclk to dcn_bw_clocksDmytro Laktyushkin2017-12-143-2/+3
| | | | | | | Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: set chroma taps to 1 when not scalingDmytro Laktyushkin2017-12-142-5/+13
| | | | | | | Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: Print DC_VER at DC initHarry Wentland2017-12-141-2/+2
| | | | | | | | | | This has proven helpful on other OSes to give a quick state of the DC driver when a bug is reported. Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: really fix time out in init sequenceTony Cheng2017-12-141-2/+3
| | | | | | | | | | REG_UPDATE_2 return the reg value it write out through MMIO we need to do a REG_READ to confirm the value is written out Signed-off-by: Tony Cheng <tony.cheng@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: Add disclaimer to BW and DML code provided by HWHarry Wentland2017-12-148-0/+73
| | | | | | | | | | | | This code can sometimes look troubling but we trust it as it comes from HW teams with a guarantee of correctness. Add a note to these files to explain this. v2: thing -> things Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: Use macro for isnan checkHarry Wentland2017-12-141-10/+8Star
| | | | | | | | | | | | | | In code provided by HW teams we do a NaN check on floats by comparing the number against itself. This confuses most people including myself. Macro it out to make it self-explanatory. Don't do a NaN check for int. v2: parantheses around 'number' expression Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/amd/display: dal 3.1.24Tony Cheng2017-12-141-1/+1
| | | | | | | Signed-off-by: Tony Cheng <tony.cheng@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>