Chiawen Huang
c276f81b72
drm/amd/display: add aux i2c event log.
...
[Why]
support i2c transition event log
[How]
refined aux REQ and REP events in aux flow.
commented REQ and REP events in i2c flow.
note: i2c event log is currently commented out. more work is required
to find an portocol parser to and generate event for the parser
Signed-off-by: Chiawen Huang <chiawen.huang@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Leo Li <sunpeng.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 15:47:30 -05:00
Dmytro Laktyushkin
b07971d43c
drm/amd/display: stop using switch for different CS revisions
...
Clock sources currently have support for asic specific
function pointers. But actual separation into functions
was never performed, leaving us with giant functions that
rely on switch.
This change creates separate functions, removing switch use.
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com >
Acked-by: Leo Li <sunpeng.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 15:47:11 -05:00
Charlene Liu
d77f778e59
drm/amd/display: Fix 3D stereo issues.
...
We were not providing the correct pixel clocks to DML for marks
calculation.
Signed-off-by: Charlene Liu <charlene.liu@amd.com >
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com >
Acked-by: Leo Li <sunpeng.li@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 15:46:52 -05:00
Christian König
0957dc7097
drm/amdgpu: revert "stop using gart_start as offset for the GTT domain"
...
Turned out the commit is incomplete and since we remove using the AGP
mapping from the GTT manager it is also not necessary any more.
This reverts commit 22d8bfafcc
.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: James Zhu <James.Zhu@amd.com >
Tested-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 10:05:42 -05:00
Christian König
feabaad8aa
drm/amdgpu: fix mask in GART location calculation
...
We need to mask the lower bits not the upper one.
Fixes: ec210e3226
drm/amdgpu: put GART away from VRAM v2
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: James Zhu <James.Zhu@amd.com >
Tested-by: James Zhu <James.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 10:05:34 -05:00
Alex Deucher
59d0f396b5
drm/amdgpu/display: return proper error codes in dm
...
Replace -1 with proper error codes.
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:38:07 -05:00
Alex Deucher
741deade2a
drm/amdgpu: simplify Raven, Raven2, and Picasso handling
...
Treat them all as Raven rather than adding a new picasso
asic type. This simplifies a lot of code and also handles the
case of rv2 chips with the 0x15d8 pci id. It also fixes dmcu
fw handling for picasso.
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:38:03 -05:00
Alex Deucher
23ecdc6187
drm/amdgpu/soc15: clean up picasso support
...
It's the same as raven so remove the duplicate case.
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:37:52 -05:00
David Francis
4d11b4b256
drm/amdgpu: Add DMCU to firmware query interface
...
DMCU firmware version can be read using the AMDGPU_INFO ioctl
or the amdgpu_firmware_info debugfs entry
Signed-off-by: David Francis <David.Francis@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:37:43 -05:00
David Francis
ee6e89c0f1
drm/amd/display: Add DMCU firmware version
...
Read the version number from the common firmware header and store
it in the dm struct
Signed-off-by: David Francis <David.Francis@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:37:35 -05:00
Vijetha Malkai
56ea097600
drm/amdgpu: Style fixes to PRIME code documentation
...
* Use consistent capitalization in the description of function arguments
* Define and consistently use the BO acronym for buffer objects
* Some minor wording improvements
Signed-off-by: Vijetha Malkai <vijetha.malkai@amd.com >
[ Michel Dänzer: Made commit log more specific ]
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:37:28 -05:00
Michel Dänzer
6a15f3ff19
drm/amdgpu: Initialize fences array entries in amdgpu_sa_bo_next_hole
...
The entries were only initialized once in amdgpu_sa_bo_new. If a fence
wasn't signalled yet in the first amdgpu_sa_bo_next_hole call, but then
got signalled before a later amdgpu_sa_bo_next_hole call, it could
destroy the fence but leave its pointer in the array, resulting in
use-after-free in amdgpu_sa_bo_new.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:37:17 -05:00
Huang Rui
520cbe0f4a
drm/amdgpu: set CG flags for raven2 (v2)
...
Raven2 does not enable all of the CG flags that raven1 does.
v2: rebase (Alex)
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:37:14 -05:00
Evan Quan
89da2a505f
drm/amd/powerplay: disable raven2 force dpm level support (v2)
...
It's not supported yet.
v2: rebase (Alex)
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:37:09 -05:00
Evan Quan
fa27203f8a
drm/amd/powerplay: round up the Mhz convertion (v2)
...
Since the clock value there may be like 29999 10Khz.
v2: rebase (Alex)
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:37:06 -05:00
Evan Quan
3e9d06b56f
drm/amd/powerplay: update smu10_verify_smc_interface() to be raven2 compatible
...
Check the raven2 version number as well.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:37:01 -05:00
Bhawanpreet Lakha
1a4d427dd2
drm/amd/display: Add DC config flag for Raven2 (v2)
...
Add DRM_AMD_DC_DCN1_01 config flag for Raven2
v2: Make DC select DRM_AMD_DC_DCN1_01 (Alex)
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:36:56 -05:00
Bhawanpreet Lakha
0e3d73f1a4
drm/amd/display: Add Raven2 definitions in dc
...
Add Raven2 definitions in the dc code
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com >
Reviewed-by: Harry Wentland <harry.wentland@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:36:47 -05:00
Huang Rui
760067769e
drm/amdgpu: fix the VM fault while write at the top of the invisible vram
...
Raven2 has a HW issue that it is unable to use the vram which is out of
MC_VM_SYSTEM_APERTURE_HIGH_ADDR. So here is the workaround that increase system
aperture high address to get rid of the VM fault and hardware hang.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:36:42 -05:00
Feifei Xu
28ab1229c3
drm/amdgpu/gfx9: add raven2 golden setting
...
Golden register settings from the hw team.
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:36:39 -05:00
Feifei Xu
cf4b60c684
drm/amdgpu/gfx9: add support for raven2 gfx firmware
...
use raven2 gfx firmware.
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:36:36 -05:00
Feifei Xu
e75279e871
drm/amdgpu/sdma4: Add raven2 golden setting
...
Golden register settings from the hw team.
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:36:32 -05:00
Feifei Xu
e7497a302b
drm/amdgpu/sdma4: specify raven2 firmware.
...
use raven2 sdma firmware.
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:36:22 -05:00
Likun Gao
e11fa1b68a
drm/amdgpu: add psp support for raven2
...
Modified for using raven2_asd.bin to replace raven_asd.bin for raven2
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:36:18 -05:00
Feifei Xu
8b47cc9bb1
drm/amdgpu: add raven2 vcn firmware support
...
Specify raven2 vcn firmware on amdgpu_vce_sw_init.
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:36:15 -05:00
Feifei Xu
54c4d17e98
drm/amdgpu: add raven2 to gpu_info firmware
...
Add gpu_info firmware for raven2.
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:36:11 -05:00
Alex Deucher
1879e6a7f8
drm/amdgpu: set external rev id for raven2
...
It's different from raven1.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:36:08 -05:00
Huang Rui
4cb0becb26
drm/amdgpu: move get_rev_id at first before load gpu_info firmware
...
Rev id is used for identifying Raven2 series of chips. So we would better to
initialize it at first.
Signed-off-by: Huang Rui <ray.huang@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 >
2018-09-14 09:36:04 -05:00
Alex Deucher
44876ae294
drm/amdgpu: use IP presence to free uvd and vce handles
...
Rather than checking the asic type, check whether the UVD
or VCE IP blocks exist. This way we don't have to update
the check with new asics that use VCN.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:36:00 -05:00
Kenneth Feng
a06c3ee083
drm/amdgpu: enable gfxoff in non-sriov and stutter mode by default
...
enable gfxoff in non-sriov and stutter mode by default
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:57 -05:00
Huang Rui
367b013ce0
drm/amdgpu: add new raven series device
...
This patch is to add new pci device for raven series.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:54 -05:00
Huang Rui
40c2358b11
drm/amdgpu: add ip blocks for picasso (v2)
...
Add PCO IPs.
V2: enable VCN as well
Signed-off-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:52 -05:00
Kenneth Feng
1a84d967c1
drm/amdgpu: enable vcn powergating for PCO
...
enable vcn pg
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:47 -05:00
Kenneth Feng
91468057d3
drm/amdgpu: enable mmhub power gating
...
Remove some functions due to the design change.
All the mmhub power gating sequence is moved to
smu fw.Driver sends the message to enable mmhub
powergating.We can also skip the fw version check
since the old fw version is in a very early stage
and we don't use that fw for release.
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:44 -05:00
Kenneth Feng
a4494fda32
drm/amdgpu: Enable SDMA power gating for PCO
...
Enable SDMA power gating
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Acked-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:38 -05:00
Kenneth Feng
8c7bf5834a
drm/amdgpu: Add pg support for gfxoff for PCO
...
Add pg support for gfxoff.
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:33 -05:00
Likun Gao
b95874cfa8
drm/amdgpu: add picasso for amdgpu kms
...
Add picasso for amdgpu kms
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:30 -05:00
Likun Gao
84ad2e1bd6
drm/amdgpu: add picasso support for sdma_v4
...
Add sdma support to picasso
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:28 -05:00
Likun Gao
501a580ae6
drm/amdgpu: add picasso support for gfx_v9_0
...
Add gfx support to picasso
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:24 -05:00
Likun Gao
e21f561ad5
drm/amdgpu: add picasso support for gmc
...
Same as raven.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:21 -05:00
Likun Gao
79f3641cc0
drm/amdgpu: add clockgating support for picasso
...
Treat it the same as raven for now.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:18 -05:00
Likun Gao
86771d9a58
drm/amdgpu: add picasso support for vcn
...
Add vcn support for picasso.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:15 -05:00
Likun Gao
669018bdcd
drm/amdgpu: add picasso ucode loading method
...
Same as raven.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:11 -05:00
Likun Gao
227f3dc5f6
drm/amdgpu: initilize picasso psp firmwares support
...
Same as raven for now.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:08 -05:00
Likun Gao
186b073dec
drm/amdgpu: Add support of powerplay for picasso
...
add powerplay support for picasso, treat it the same as raven now.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:05 -05:00
Likun Gao
b22ab73314
drm/amd/display/dm: add picasso support
...
Add support for picasso to the display manager.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:03 -05:00
Likun Gao
5f4e2085ee
drm/amdgpu: add picasso support for vm
...
Add vm support for picasso.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:35:00 -05:00
Likun Gao
ad5a67a7ea
drm/amdgpu: add soc15 support for picasso
...
Add the IP blocks, clock and powergating flags, and common clockgating support.
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:34:57 -05:00
Likun Gao
be9699e392
drm/amdgpu: add picasso to asic_type enum
...
Add picasso to amd_asic_type enum and amdgpu_asic_name[].
Signed-off-by: Likun Gao <Likun.Gao@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Huang Rui <ray.huang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2018-09-14 09:34:48 -05:00
Dave Airlie
2dc7bad71c
Merge tag 'drm-misc-next-2018-09-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
...
drm-misc-next for 4.20:
UAPI Changes:
- Add host endian variants for the most common formats (Gerd)
- Fail ADDFB2 for big-endian drivers that don't advertise BE quirk (Gerd)
- clear smem_start in fbdev for drm drivers to avoid leaking fb addr (Daniel)
Cross-subsystem Changes:
Core Changes:
- fix drm_mode_addfb() on big endian machines (Gerd)
- add timeline point to syncobj find+replace (Chunming)
- more drmP.h removal effort (Daniel)
- split uapi portions of drm_atomic.c into drm_atomic_uapi.c (Daniel)
Driver Changes:
- bochs: Convert open-coded portions to use helpers (Peter)
- vkms: Add cursor support (Haneen)
- udmabuf: Lots of fixups (mostly cosmetic afaict) (Gerd)
- qxl: Convert to use fbdev helper (Peter)
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: Chunming Zhou <david1.zhou@amd.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Peter Wu <peter@lekensteyn.nl >
Cc: Haneen Mohammed <hamohammed.sa@gmail.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
From: Sean Paul <sean@poorly.run >
Link: https://patchwork.freedesktop.org/patch/msgid/20180913130254.GA156437@art_vandelay
2018-09-14 09:43:16 +10:00