]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/log
mirror_ubuntu-eoan-kernel.git
6 years agodrm/amd/display: disable mpo if brightness adjusted
Yue Hin Lau [Wed, 18 Apr 2018 20:07:04 +0000 (16:07 -0400)]
drm/amd/display: disable mpo if brightness adjusted

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>
6 years agodrm/amd/display: Add dc cap to restrict VSR downscaling src size
Xingyue Tao [Thu, 19 Apr 2018 20:23:12 +0000 (16:23 -0400)]
drm/amd/display: Add dc cap to restrict VSR downscaling src size

- Adds int max_downscale_src_width in dc struct
- Checks and does not support if downscale size is more than 4k (width > 3840)

Signed-off-by: Xingyue Tao <xingyue.tao@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: fix a 32 bit shift meant to be 64 warning
Dmytro Laktyushkin [Mon, 23 Apr 2018 18:39:23 +0000 (14:39 -0400)]
drm/amd/display: fix a 32 bit shift meant to be 64 warning

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>
6 years agodrm/amd/display: fix 31_32_fixpt shift functions
Dmytro Laktyushkin [Mon, 23 Apr 2018 16:41:34 +0000 (12:41 -0400)]
drm/amd/display: fix 31_32_fixpt shift functions

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Eric Yang <eric.yang2@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Update HW sequencer initialization
Eric Bernstein [Tue, 17 Apr 2018 20:50:28 +0000 (16:50 -0400)]
drm/amd/display: Update HW sequencer initialization

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>
6 years agodrm/amd/display: underflow/blankscreen recovery
Charlene Liu [Wed, 18 Apr 2018 18:31:41 +0000 (14:31 -0400)]
drm/amd/display: underflow/blankscreen recovery

[Description]
for any reason, if driver detects HUBP underflow,
if a debug option enabled to enable recovery.
it will kick in a sequence of recovery.

Signed-off-by: Charlene Liu <charlene.liu@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>
6 years agodrm/amd/display: truncate scaling ratios and inits to 19 bit precision
Dmytro Laktyushkin [Wed, 18 Apr 2018 18:19:23 +0000 (14:19 -0400)]
drm/amd/display: truncate scaling ratios and inits to 19 bit precision

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>
6 years agodrm/amd/display: add fixed point fractional bit truncation function
Dmytro Laktyushkin [Wed, 18 Apr 2018 18:11:43 +0000 (14:11 -0400)]
drm/amd/display: add fixed point fractional bit truncation function

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>
6 years agodrm/amd/display: Make DisplayStats work with just DC DisplayStats minor
Anthony Koo [Thu, 19 Apr 2018 14:05:22 +0000 (10:05 -0400)]
drm/amd/display: Make DisplayStats work with just DC DisplayStats minor

Remove dependency on the old FREESYNC_SW_STATS log mask used by DAL2
Also rename from profiling to displaystats

Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: inline more of fixed point code
Dmytro Laktyushkin [Wed, 18 Apr 2018 17:54:24 +0000 (13:54 -0400)]
drm/amd/display: inline more of fixed point code

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>
6 years agodrm/amd/display: get rid of 32.32 unsigned fixed point
Dmytro Laktyushkin [Wed, 18 Apr 2018 15:37:53 +0000 (11:37 -0400)]
drm/amd/display: get rid of 32.32 unsigned fixed point

32.32 is redundant, 31.32 does everything we use 32.32 for

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>
6 years agodrm/amd/display: Cleanup unused SetPlaneConfig
Anthony Koo [Fri, 13 Apr 2018 02:40:02 +0000 (22:40 -0400)]
drm/amd/display: Cleanup unused SetPlaneConfig

Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Take vcn encode rings into account in idle work
Alex Deucher [Thu, 17 May 2018 18:03:05 +0000 (13:03 -0500)]
drm/amdgpu: Take vcn encode rings into account in idle work

Take the encode rings into account in the idle work handler.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Take uvd encode rings into account in idle work (v2)
Alex Deucher [Thu, 17 May 2018 17:45:52 +0000 (12:45 -0500)]
drm/amdgpu: Take uvd encode rings into account in idle work (v2)

Take the encode rings into account in the idle work handler.

v2: fix typo: s/num_uvd_inst/num_enc_rings/

Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: count fences from all uvd instances in idle handler
Alex Deucher [Thu, 17 May 2018 17:33:34 +0000 (12:33 -0500)]
drm/amdgpu: count fences from all uvd instances in idle handler

Current multi-UVD hardware uses a single clock and power source
so handle all instances in the idle handler.

Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/scheduler: fix function name prefix in comments
Nayan Deshmukh [Wed, 16 May 2018 13:24:18 +0000 (18:54 +0530)]
drm/scheduler: fix function name prefix in comments

That got missed while moving the files outside of amdgpu.

Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/amdgpu: Code comments for the amdgpu_ttm.c driver. (v2)
Tom St Denis [Wed, 9 May 2018 18:22:29 +0000 (14:22 -0400)]
drm/amd/amdgpu:  Code comments for the amdgpu_ttm.c driver. (v2)

NFC just comments.

(v2):  Updated based on feedback from Alex Deucher.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/pp: missing curly braces in smu7_enable_sclk_mclk_dpm()
Dan Carpenter [Thu, 17 May 2018 12:56:05 +0000 (15:56 +0300)]
drm/amd/pp: missing curly braces in smu7_enable_sclk_mclk_dpm()

We added some more lines of code to this if statement but forgot to add
curly braces.

Fixes: 0c24e7ef233b ("drm/amd/powerplay: add specific changes for VEGAM in smu7_hwmgr.c")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/display: fix vega12/20 handling in dal_asic_id.h
Alex Deucher [Wed, 16 May 2018 20:34:19 +0000 (15:34 -0500)]
drm/amdgpu/display: fix vega12/20 handling in dal_asic_id.h

- Remove unused ASICREV_IS_VEGA12_p() macro
- Fix ASICREV_IS_VEGA12_P() macro to properly check against vega20

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/display: remove VEGA20 config option
Alex Deucher [Wed, 16 May 2018 20:28:59 +0000 (15:28 -0500)]
drm/amdgpu/display: remove VEGA20 config option

Leftover from bringup.  No need to keep it around for
upstream.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/display: remove VEGAM config option
Alex Deucher [Wed, 16 May 2018 13:39:58 +0000 (08:39 -0500)]
drm/amdgpu/display: remove VEGAM config option

Leftover from bringup.  No need to keep it around for
upstream.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/scheduler: Remove obsolete spinlock.
Andrey Grodzovsky [Tue, 15 May 2018 18:42:20 +0000 (14:42 -0400)]
drm/scheduler: Remove obsolete spinlock.

This spinlock is superfluous, any call to drm_sched_entity_push_job
should already be under a lock together with matching drm_sched_job_init
to match the order of insertion into queue with job's fence seqence
number.

v2:
Improve patch description.
Add functions documentation describing the locking considerations

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-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>
6 years agodrm/amdgpu: remove unused member
Christian König [Thu, 19 Apr 2018 07:57:21 +0000 (09:57 +0200)]
drm/amdgpu: remove unused member

This lock isn't used any more.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/pp: Workaround flickering issue on RV
Rex Zhu [Mon, 14 May 2018 08:03:01 +0000 (16:03 +0800)]
drm/amd/pp: Workaround flickering issue on RV

Screen flickering observed while running 1080p video using
MPV_VAAPI/VDPAU with 4x4K@60 monitors

Need to set higher mclk in this configuration.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Skip drm_sched_entity related ops for KIQ ring.
Andrey Grodzovsky [Tue, 15 May 2018 18:12:21 +0000 (14:12 -0400)]
drm/amdgpu: Skip drm_sched_entity related ops for KIQ ring.

Following change 75fbed2 we never initialize or use the GPU
scheduler for KIQ and hence we need to skip KIQ ring when iterating
amdgpu_ctx's scheduler entites.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: flag Vega20 as experimental
Alex Deucher [Mon, 14 May 2018 16:28:04 +0000 (11:28 -0500)]
drm/amdgpu: flag Vega20 as experimental

Must set amdgpu.exp_hw_support=1 on the kernel command line in
grub to enable support.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Add vega20 pci ids
Feifei Xu [Mon, 22 Jan 2018 11:08:33 +0000 (19:08 +0800)]
drm/amdgpu: Add vega20 pci ids

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu: Switch to use df_v3_6_funcs for vega20 (v2)
Feifei Xu [Wed, 4 Apr 2018 06:32:10 +0000 (14:32 +0800)]
drm/amdgpu: Switch to use df_v3_6_funcs for vega20 (v2)

v2: fix whitespace (Alex)

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/df: implement df v3_6 callback functions (v2)
Feifei Xu [Wed, 4 Apr 2018 06:30:28 +0000 (14:30 +0800)]
drm/amdgpu/df: implement df v3_6 callback functions (v2)

New df helpers for 3.6.

v2: switch to using df 3.6 headers (Alex)

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: add df 3.6 headers
Alex Deucher [Mon, 14 May 2018 16:50:46 +0000 (11:50 -0500)]
drm/amdgpu: add df 3.6 headers

Needed for vega20.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:Enable UVD/VCE for Vega20
James Zhu [Mon, 30 Apr 2018 12:43:12 +0000 (08:43 -0400)]
drm/amdgpu/vg20:Enable UVD/VCE for Vega20

Vega20 ucode load type is set to AMDGPU_FW_LOAD_DIRECT for default.
So UVD/VCE needn't PSP IP block up. UVD/VCE for Vega20 can be enabled
at this moment.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:Enable 2nd instance queue maping for uvd 7.2
James Zhu [Tue, 24 Apr 2018 01:00:58 +0000 (21:00 -0400)]
drm/amdgpu/vg20:Enable 2nd instance queue maping for uvd 7.2

Enable 2nd instance uvd queue maping for uvd 7.2. For user, only one UVD
instance presents. there is two rings for uvd decode, and
4 rings for uvd encode.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:Enable the 2nd instance IRQ for uvd 7.2
James Zhu [Tue, 24 Apr 2018 00:56:01 +0000 (20:56 -0400)]
drm/amdgpu/vg20:Enable the 2nd instance IRQ for uvd 7.2

For Vega20, the 2nd instance uvd IRQ using different client id.
Enable the 2nd instance IRQ for uvd 7.2

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:Add IH client ID for the 2nd UVD
James Zhu [Tue, 24 Apr 2018 00:49:28 +0000 (20:49 -0400)]
drm/amdgpu/vg20:Add IH client ID for the 2nd UVD

For Vega20, there are two UVD hardware. Need add
the 2nd IH client ID for the 2nd UVD Hardware.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:Enable the 2nd instance for uvd
James Zhu [Fri, 11 May 2018 18:56:44 +0000 (13:56 -0500)]
drm/amdgpu/vg20:Enable the 2nd instance for uvd

For Vega20, set num of uvd instance to 2, to enble 2nd instance.
The IB test build-in registers need update for vega20 2nd instance.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:increase 3 rings for AMDGPU_MAX_RINGS
James Zhu [Mon, 23 Apr 2018 23:11:46 +0000 (19:11 -0400)]
drm/amdgpu/vg20:increase 3 rings for AMDGPU_MAX_RINGS

For Vega20, there are two UVD Hardware. One more UVD hardware
adds one decode ring and two encode rings. So AMDGPU_MAX_RINGS
need increase by 3.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:Restruct uvd.inst to support multiple instances
James Zhu [Tue, 15 May 2018 19:31:24 +0000 (14:31 -0500)]
drm/amdgpu/vg20:Restruct uvd.inst to support multiple instances

Vega20 has dual-UVD. Need add multiple instances support for uvd.
Restruct uvd.inst, using uvd.inst[0] to replace uvd.inst->.
Repurpose amdgpu_ring::me for instance index, and initialize to 0.
There are no any logical changes here.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/vg20:Restruct uvd to support multiple uvds
James Zhu [Tue, 15 May 2018 19:25:46 +0000 (14:25 -0500)]
drm/amdgpu/vg20:Restruct uvd to support multiple uvds

Vega20 has dual-UVD. Need Restruct amdgpu_device::uvd to support
multiple uvds. There are no any logical changes here.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Disable ip modules that are not ready yet
Feifei Xu [Tue, 24 Apr 2018 03:20:16 +0000 (11:20 +0800)]
drm/amdgpu: Disable ip modules that are not ready yet

Please enable above ips on soc15.c when they're available.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/powerplay: update vega20 cg flags (v2)
Evan Quan [Mon, 26 Mar 2018 03:43:04 +0000 (11:43 +0800)]
drm/amd/powerplay: update vega20 cg flags (v2)

v2: remove duplicate flag.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Set vega20 load_type to AMDGPU_FW_LOAD_DIRECT.
Feifei Xu [Tue, 24 Apr 2018 03:11:16 +0000 (11:11 +0800)]
drm/amdgpu: Set vega20 load_type to AMDGPU_FW_LOAD_DIRECT.

Please revert this patch when psp load fw is enabled.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Use vbios table for gpu info on vega20
Alex Deucher [Fri, 20 Apr 2018 04:31:04 +0000 (12:31 +0800)]
drm/amdgpu: Use vbios table for gpu info on vega20

Use the vbios table rather than gpu info firmware.

Squash of the following patches:
drm/amdgpu/vg20: fallback to vbios table if gpu info fw is not available (v2)
drm/amdgpu: drop gpu_info firmware for vega20

Reviewed-by: Amber Lin <Amber.Lin@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/atomfirmware: add parser for gfx_info table
Alex Deucher [Tue, 20 Mar 2018 17:24:03 +0000 (12:24 -0500)]
drm/amdgpu/atomfirmware: add parser for gfx_info table

Add support for the gfx_info table on boards that use atomfirmware.

Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/atomfirmware: add new gfx_info data table v2.4 (v2)
Alex Deucher [Fri, 16 Mar 2018 02:32:27 +0000 (21:32 -0500)]
drm/amdgpu/atomfirmware: add new gfx_info data table v2.4 (v2)

Adds additional gfx configuration data.

v2: fix typo

Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: Add harvest IP support for Vega20
Jerry (Fangzhi) Zuo [Mon, 5 Mar 2018 21:12:23 +0000 (16:12 -0500)]
drm/amd/display: Add harvest IP support for Vega20

Retrieve fuses to determine the availability of pipes, and
eliminate pipes that cannot be used.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
6 years agodrm/amd/display: Add BIOS smu_info v3_3 support for Vega20
Jerry (Fangzhi) Zuo [Fri, 11 May 2018 18:51:43 +0000 (13:51 -0500)]
drm/amd/display: Add BIOS smu_info v3_3 support for Vega20

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
6 years agodrm/amd/display: Remove COMBO_DISPLAY_PLL0 from Vega20
Feifei Xu [Fri, 20 Apr 2018 13:03:10 +0000 (21:03 +0800)]
drm/amd/display: Remove COMBO_DISPLAY_PLL0 from Vega20

Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
6 years agodrm/amd/display: Add Vega20 config. support
Jerry (Fangzhi) Zuo [Fri, 11 May 2018 18:46:19 +0000 (13:46 -0500)]
drm/amd/display: Add Vega20 config. support

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd: Add dce-12.1 gpio aux registers (v2)
Roman Li [Wed, 14 Feb 2018 22:20:54 +0000 (17:20 -0500)]
drm/amd: Add dce-12.1 gpio aux registers (v2)

Updating dce12 register headers by adding dc registers
required for potential DP LTTPR support.

v2: fix mode change

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Roman Li <Roman.Li@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Add vega20 to dc support check (v2)
Feifei Xu [Sat, 3 Feb 2018 04:19:46 +0000 (12:19 +0800)]
drm/amdgpu: Add vega20 to dc support check (v2)

v2: fix whitespace

Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amd/display/dm: Add vega20 support
Feifei Xu [Fri, 20 Apr 2018 11:50:01 +0000 (19:50 +0800)]
drm/amd/display/dm: Add vega20 support

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu: Add nbio support for vega20 (v2)
Feifei Xu [Fri, 23 Mar 2018 19:44:28 +0000 (14:44 -0500)]
drm/amdgpu: Add nbio support for vega20 (v2)

Some register offset in nbio v7.4 are different with v7.0.

v2: Use nbio7.0 for now.

TODO: add a new nbio 7.4 module (Alex)

Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/soc15: Add ip blocks for vega20 (v2)
Feifei Xu [Fri, 20 Apr 2018 10:35:42 +0000 (18:35 +0800)]
drm/amdgpu/soc15: Add ip blocks for vega20 (v2)

Same as vega10 now.

v2: squash in typo fix

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/soc15: dynamic initialize ip offset for vega20
Feifei Xu [Fri, 23 Mar 2018 19:42:28 +0000 (14:42 -0500)]
drm/amdgpu/soc15: dynamic initialize ip offset for vega20

Vega20 need a seperate vega20_reg_init.c due to ip base
offset difference.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/soc15: Set common clockgating for vega20.
Feifei Xu [Fri, 26 Jan 2018 07:10:55 +0000 (15:10 +0800)]
drm/amdgpu/soc15: Set common clockgating for vega20.

Same as vega10 for now.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/soc15:Add vega20 soc15_common_early_init support
Feifei Xu [Fri, 26 Jan 2018 07:06:22 +0000 (15:06 +0800)]
drm/amdgpu/soc15:Add vega20 soc15_common_early_init support

Set external_rev_id and disable cg,pg for now.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/gfx9: Add clockgatting support for vega20
Feifei Xu [Tue, 23 Jan 2018 07:03:36 +0000 (15:03 +0800)]
drm/amdgpu/gfx9: Add clockgatting support for vega20

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu/gfx9: Add support for vega20
Feifei Xu [Fri, 20 Apr 2018 07:51:26 +0000 (15:51 +0800)]
drm/amdgpu/gfx9: Add support for vega20

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu/gfx9: Add gfx config for vega20. (v4)
Feifei Xu [Fri, 20 Apr 2018 06:40:11 +0000 (14:40 +0800)]
drm/amdgpu/gfx9: Add gfx config for vega20. (v4)

v2: clean up (Alex)
v3: additional cleanups (Alex)
v4: drop leftover TODO (Alex)

Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu/gfx9: Add vega20 golden settings (v3)
Feifei Xu [Tue, 23 Jan 2018 06:47:26 +0000 (14:47 +0800)]
drm/amdgpu/gfx9: Add vega20 golden settings (v3)

v2: squash in updates (Alex)
v3: squash in more updates (Alex)

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu/gfx9: Add support for vega20 firmware
Feifei Xu [Fri, 20 Apr 2018 06:22:48 +0000 (14:22 +0800)]
drm/amdgpu/gfx9: Add support for vega20 firmware

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu/sdma4: Add clockgating support for vega20
Feifei Xu [Tue, 23 Jan 2018 03:16:16 +0000 (11:16 +0800)]
drm/amdgpu/sdma4: Add clockgating support for vega20

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu/sdma4: Add vega20 golden settings (v3)
Feifei Xu [Tue, 23 Jan 2018 03:13:02 +0000 (11:13 +0800)]
drm/amdgpu/sdma4: Add vega20 golden settings (v3)

v2: squash in updates (Alex)
v3: squash in more updates (Alex)

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu/sdma4: Specify vega20 firmware
Feifei Xu [Fri, 20 Apr 2018 06:00:02 +0000 (14:00 +0800)]
drm/amdgpu/sdma4: Specify vega20 firmware

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu/mmhub: Add clockgating support for vega20
Feifei Xu [Fri, 20 Apr 2018 05:58:09 +0000 (13:58 +0800)]
drm/amdgpu/mmhub: Add clockgating support for vega20

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu/gmc9: Add vega20 support
Feifei Xu [Fri, 20 Apr 2018 05:56:43 +0000 (13:56 +0800)]
drm/amdgpu/gmc9: Add vega20 support

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu/virtual_dce: Add vega20 support
Feifei Xu [Fri, 20 Apr 2018 05:48:23 +0000 (13:48 +0800)]
drm/amdgpu/virtual_dce: Add vega20 support

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu: Specify vega20 vce firmware
Feifei Xu [Fri, 20 Apr 2018 05:46:49 +0000 (13:46 +0800)]
drm/amdgpu: Specify vega20 vce firmware

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu: Specify vega20 uvd firmware
Feifei Xu [Fri, 11 May 2018 18:44:09 +0000 (13:44 -0500)]
drm/amdgpu: Specify vega20 uvd firmware

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu: Add vega20 ucode loading method
Feifei Xu [Fri, 20 Apr 2018 05:38:24 +0000 (13:38 +0800)]
drm/amdgpu: Add vega20 ucode loading method

The same as vega10.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu/psp: Add initial psp support for vega20
Feifei Xu [Fri, 20 Apr 2018 05:36:54 +0000 (13:36 +0800)]
drm/amdgpu/psp: Add initial psp support for vega20

The same as vega10 for now.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu/powerplay: Add initial vega20 support v2
Feifei Xu [Fri, 20 Apr 2018 05:32:46 +0000 (13:32 +0800)]
drm/amdgpu/powerplay: Add initial vega20 support v2

Initial powerplay support the same as vega10 for now.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu: Add smu firmware support for vega20
Feifei Xu [Fri, 20 Apr 2018 04:46:21 +0000 (12:46 +0800)]
drm/amdgpu: Add smu firmware support for vega20

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu: set asic family for vega20.
Feifei Xu [Fri, 20 Apr 2018 04:33:33 +0000 (12:33 +0800)]
drm/amdgpu: set asic family for vega20.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu: Add gpu_info firmware for vega20. (v2)
Feifei Xu [Thu, 17 May 2018 15:01:19 +0000 (10:01 -0500)]
drm/amdgpu: Add gpu_info firmware for vega20. (v2)

vega20_gpu_info firmware stores gpu configuration for vega20.

v2: drop gpu info firmware for vega20

Squash of:
drm/amdgpu: Add gpu_info firmware for vega20.
drm/amdgpu: drop gpu_info firmware for vega20

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amdgpu: Add vega20 to asic_type enum.
Feifei Xu [Fri, 20 Apr 2018 04:27:54 +0000 (12:27 +0800)]
drm/amdgpu: Add vega20 to asic_type enum.

Add vega20 to amd_asic_type enum and amdgpu_asic_name[].

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@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>
6 years agodrm/amd/include/vg20: adjust VCE_BASE to reuse vce 4.0 header files
James Zhu [Tue, 17 Apr 2018 20:25:58 +0000 (16:25 -0400)]
drm/amd/include/vg20: adjust VCE_BASE to reuse vce 4.0 header files

Vega20 uses vce 4.1 engine, all the registers have the
same absolute offset with vce 4.0. By adjusting vega20
VCE_BASE, vce 4.1 can reuse vce 4.0 header files.

Signed-off-by: James Zhu <James.Zhu@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>
6 years agodrm/amd: Add vega20_ip_offset.h headerfile for vega20. (v2)
Feifei Xu [Tue, 30 Jan 2018 02:59:23 +0000 (10:59 +0800)]
drm/amd: Add vega20_ip_offset.h headerfile for vega20. (v2)

This headerfile contains vega20's ip base addresses.

v2: squash in MP1_BASE fix

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Fix hardcoded base offset of vram pages
Feifei Xu [Tue, 6 Feb 2018 04:29:23 +0000 (12:29 +0800)]
drm/amdgpu: Fix hardcoded base offset of vram pages

In gmc_v9_0_vram_gtt_location(),the vram_base_offset is hardcoded
to 0 in dGPU. Fix it by reading mmMC_VM_FB_OFFSET or return
zfb_phys_addr if ZFB is enabled.

Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Drop the unused header files in soc15.c.
Feifei Xu [Fri, 11 May 2018 06:41:40 +0000 (14:41 +0800)]
drm/amdgpu: Drop the unused header files in soc15.c.

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>
6 years agodrm/amd/powerplay: add a framework for perfroming pre display
Evan Quan [Wed, 9 May 2018 03:08:29 +0000 (11:08 +0800)]
drm/amd/powerplay: add a framework for perfroming pre display
configuration change settings

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/powerplay: new framework to honour DAL clock limits
Evan Quan [Wed, 9 May 2018 02:57:53 +0000 (10:57 +0800)]
drm/amd/powerplay: new framework to honour DAL clock limits

This is needed for vega12 and vega20 which do not support legacy
powerstate. With this new framework, the DAL clocks limits can also
be honored on these asics.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/gfx9: Update golden setting for gfx9_0.
Feifei Xu [Fri, 9 Mar 2018 21:15:18 +0000 (05:15 +0800)]
drm/amdgpu/gfx9: Update golden setting for gfx9_0.

Update golden_settings_gc_9_0[].

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>
6 years agodrm: rcar-du: Fix build failure
Laurent Pinchart [Tue, 15 May 2018 17:47:52 +0000 (20:47 +0300)]
drm: rcar-du: Fix build failure

Commit 75a07f399cd4 ("drm: rcar-du: Zero-out sg_tables when duplicating
plane state") introduced a reference to the alpha field of struct
rcar_du_vsp_plane_state that got removed in commit 301a9b8d5456
("drm/rcar-du: Convert to the new generic alpha property"). The issue
stems from the merge of the two commits through separate branches and
breaks compilation of the driver. Fix it.

Fixes: 75a07f399cd4 ("drm: rcar-du: Zero-out sg_tables when duplicating plane state")
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180515174752.28954-1-laurent.pinchart+renesas@ideasonboard.com
6 years agodrm: rcar-du: Fix rcar_du_of_init() stub
Laurent Pinchart [Tue, 15 May 2018 15:57:36 +0000 (18:57 +0300)]
drm: rcar-du: Fix rcar_du_of_init() stub

The rcar_du_of_init() function is supposed to be defined as a stub when
CONFIG_DRM_RCAR_LVDS is disabled as the rcar_du_of.c file isn't compiled
in that case. However, a bug in the configuration option check makes it
a stub when CONFIG_DRM_RCAR_LVDS=m as well, which prevents legacy DTs
from being fixed at boot time. Fix the configuration option check by
using IS_ENABLED.

Fixes: 81c0e3dd8292 ("drm: rcar-du: Fix legacy DT to create LVDS encoder nodes")
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180515155736.3379-1-laurent.pinchart+renesas@ideasonboard.com
6 years agodrm/amdgpu: include pagemap.h for release_pages()
Stephen Rothwell [Wed, 16 May 2018 06:43:34 +0000 (16:43 +1000)]
drm/amdgpu: include pagemap.h for release_pages()

Fixes: 5ae0283e831a ("drm/amdgpu: Add userptr support for KFD"
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agoMerge branch 'drm-next-4.18' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Tue, 15 May 2018 22:21:51 +0000 (08:21 +1000)]
Merge branch 'drm-next-4.18' of git://people.freedesktop.org/~agd5f/linux into drm-next

Main changes for 4.18.  I'd like to do a separate pull for vega20 later
this week or next.  Highlights:
- Reserve pre-OS scanout buffer during init for seemless transition from
  console to driver
- VEGAM support
- Improved GPU scheduler documentation
- Initial gfxoff support for raven
- SR-IOV fixes
- Default to non-AGP on PowerPC for radeon
- Fine grained clock voltage control for vega10
- Power profiles for vega10
- Further clean up of powerplay/driver interface
- Underlay fixes
- Display link bw updates
- Gamma fixes
- Scatter/Gather display support on CZ/ST
- Misc bug fixes and clean ups

[airlied: fixup v3d vs scheduler API change]

Link: https://patchwork.freedesktop.org/patch/msgid/20180515185450.1113-1-alexander.deucher@amd.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
6 years agoMerge tag 'drm-intel-next-2018-05-14' of git://anongit.freedesktop.org/drm/drm-intel...
Dave Airlie [Tue, 15 May 2018 21:10:13 +0000 (07:10 +1000)]
Merge tag 'drm-intel-next-2018-05-14' of git://anongit.freedesktop.org/drm/drm-intel into drm-next

Last drm/i915 changes for v4.18:

- NV12 enabling (Chandra, Maarten)
- ICL workarounds (Oscar)
- ICL basic DPLL enabling (Paulo)
- GVT updates
- DP link config refactoring (Jani)
- Module parameter to override DMC firmware (Jani)
- PSR updates (José, DK, Daniel, Ville)
- ICL DP vswing programming (Manasi)
- ICL DBuf slice updates (Mahesh)
- Selftest fixes and updates (Chris, Matthew, Oscar)
- Execlist fixes and updates (Chris)
- Stolen memory first 4k fix (Hans de Goede)
- wait_for fixes (Mika)
- Tons of GEM improvements (Chris)
- Plenty of other fixes and improvements (Everyone)
- Crappy changelog (Me)

Signed-off-by: Dave Airlie <airlied@redhat.com>
# gpg: Signature made Mon 14 May 2018 11:04:24 PM AEST
# gpg:                using RSA key D398079D26ABEE6F
# gpg: Good signature from "Jani Nikula <jani.nikula@intel.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 1565 A65B 77B0 632E 1124  E59C D398 079D 26AB EE6F

# Conflicts:
# drivers/gpu/drm/i915/intel_lrc.c
# drivers/gpu/drm/i915/intel_sprite.c
Link: https://patchwork.freedesktop.org/patch/msgid/87k1s51bvw.fsf@intel.com
6 years agodrm/scheduler: remove unused parameter
Nayan Deshmukh [Thu, 29 Mar 2018 17:06:32 +0000 (22:36 +0530)]
drm/scheduler: remove unused parameter

this patch also effect the amdgpu and etnaviv drivers which
use the function drm_sched_entity_init

Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agoAdd SPDX idenitifier and clarify license
Dirk Hohndel [Wed, 2 May 2018 13:46:21 +0000 (15:46 +0200)]
Add SPDX idenitifier and clarify license

This is dual licensed under GPL-2.0 or MIT.

Signed-off-by: Dirk Hohndel (VMware) <dirk@hohndel.org>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: print the BO flags in the gem debugfs entry
Christian König [Fri, 11 May 2018 15:14:29 +0000 (23:14 +0800)]
drm/amdgpu: print the BO flags in the gem debugfs entry

Quite useful to know.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: drop printing the BO offset in the gem debugfs (v2)
Christian König [Fri, 11 May 2018 15:13:39 +0000 (23:13 +0800)]
drm/amdgpu: drop printing the BO offset in the gem debugfs (v2)

It is meaningless anyway.

v2: remove unused variable (Alex)

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: Add support to change mtype for 2nd part of gart BOs on GFX9
Yong Zhao [Mon, 14 May 2018 16:15:27 +0000 (12:15 -0400)]
drm/amdgpu: Add support to change mtype for 2nd part of gart BOs on GFX9

This change prepares for a workaround in amdkfd for a GFX9 HW bug. It
requires the control stack memory of compute queues, which is allocated
from the second page of MQD gart BOs, to have mtype NC, rather than
the default UC.

Signed-off-by: Yong Zhao <yong.zhao@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/powerplay: Add notify PWE function to SMU10
Mikita Lipski [Mon, 14 May 2018 14:13:57 +0000 (10:13 -0400)]
drm/amd/powerplay: Add notify PWE function to SMU10

Functionality to message smc to enable pwe after gpu suspense.
It is used in case when display resumes from S3 and wants to start
audio driver by enabling pwe.

Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amd/display: remove need of modeset flag for overlay planes (V2)
Shirish S [Fri, 27 Apr 2018 10:17:21 +0000 (15:47 +0530)]
drm/amd/display: remove need of modeset flag for overlay planes (V2)

This patch is in continuation to the
"843e3c7 drm/amd/display: defer modeset check in dm_update_planes_state"
where we started to eliminate the dependency on
DRM_MODE_ATOMIC_ALLOW_MODESET to be set by the user space,
which as such is not mandatory.

After deferring, this patch eliminates the dependency on the flag
for overlay planes.

This has to be done in stages as its a pretty complex and requires thorough
testing before we free primary planes as well from dependency on modeset
flag.

V2: Simplified the plane type check.

Signed-off-by: Shirish S <shirish.s@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: fix null pointer for bo unmap trace function
Junwei Zhang [Fri, 11 May 2018 06:54:31 +0000 (14:54 +0800)]
drm/amdgpu: fix null pointer for bo unmap trace function

fix crash in trace.

Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu/gmc9: remove unused register defs
Alex Deucher [Thu, 10 May 2018 20:10:14 +0000 (15:10 -0500)]
drm/amdgpu/gmc9: remove unused register defs

These got moved to the new df module so no longer
used in this file.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: add HDP flush dummy for UVD 6/7
Christian König [Tue, 8 May 2018 10:26:52 +0000 (12:26 +0200)]
drm/amdgpu: add HDP flush dummy for UVD 6/7

The UVD firmware doesn't seem to like the HDP flush here.

This worked for years without HDP flush, so just skip it.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/amdgpu: set ttm bo priority before initialization
Junwei Zhang [Fri, 11 May 2018 03:02:23 +0000 (11:02 +0800)]
drm/amdgpu: set ttm bo priority before initialization

Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: David Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
6 years agodrm/ttm: remove priority hard code when initializing ttm bo
Junwei Zhang [Fri, 11 May 2018 02:54:40 +0000 (10:54 +0800)]
drm/ttm: remove priority hard code when initializing ttm bo

Then priority could be set before initialization.
By default, it requires to kzalloc ttm bo. In fact, we always do so.

Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: David Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>