RE: [PATCH 5/5] drm/amdgpu/soc15: add support for baco reset with swSMU

2019-10-10 Thread Quan, Evan
Except patch2, series is reviewed-by: Evan Quan -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Thursday, October 10, 2019 11:26 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH 5/5] drm/amdgpu/soc15: add support for baco reset with swSMU

[PATCH v2] drm/amdgpu/discovery: reserve discovery data at the top of VRAM

2019-10-10 Thread Yuan, Xiaojie
IP Discovery data is TMR fenced by the latest PSP BL, so we need to reserve this region. Tested on navi10/12/14 with VBIOS integrated with latest PSP BL. v2: use DISCOVERY_TMR_SIZE macro as bo size use amdgpu_bo_create_kernel_at() to allocate bo Signed-off-by: Xiaojie Yuan Reviewed-by:

RE: [PATCH 2/5] drm/amdgpu: move gpu reset out of amdgpu_device_suspend

2019-10-10 Thread Quan, Evan
> There are cases were we don't want it. Typo: were -> where? -Original Message- From: Quan, Evan Sent: Friday, October 11, 2019 12:07 PM To: Alex Deucher ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: RE: [PATCH 2/5] drm/amdgpu: move gpu reset out of

RE: [PATCH 2/5] drm/amdgpu: move gpu reset out of amdgpu_device_suspend

2019-10-10 Thread Quan, Evan
It seems amdgpu_pmops_runtime_suspend() needs to be updated accordingly also. -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Thursday, October 10, 2019 11:26 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH 2/5] drm/amdgpu: move gpu reset out

RE: [PATCH 0/3] RAS Support for GFX blocks

2019-10-10 Thread Zhang, Hawking
Series is Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Dennis Li Sent: 2019年10月11日 10:49 To: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Zhou1, Tao ; Zhang, Hawking ; Chen, Guchun Cc: Li, Dennis Subject: [PATCH 0/3] RAS Support for GFX blocks 1.

[PATCH 8/8] drm/amdgpu/psp: add psp memory training implementation

2019-10-10 Thread Tianci Yin
From: "Tianci.Yin" add memory training implementation code to save resume time. Change-Id: I625794a780b11d824ab57ef39cc33b872c6dc6c9 Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 9 ++

[PATCH 6/8] drm/amdgpu: add psp memory training callbacks and macro

2019-10-10 Thread Tianci Yin
From: "Tianci.Yin" add interface for memory training. Change-Id: Ibb6d1d24eb651df796bc2bb3419a44937af60242 Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 18 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 55 + 2

[PATCH 7/8] drm/amdgpu: reserve vram for memory training

2019-10-10 Thread Tianci Yin
From: "Tianci.Yin" memory training using specific fixed vram segment, reserve these segments before anyone may allocate it. Change-Id: I1436755813a565608a2857a683f535377620a637 Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 96

[PATCH 4/8] drm/amdgpu: update atomfirmware header with memory training related members

2019-10-10 Thread Tianci Yin
From: "Tianci.Yin" add new vram_reserve_block structure and atomfirmware_internal_constants enumeration Change-Id: I6ba642ecd7ad94250162ae5c322ed8d85de9c35a Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin --- drivers/gpu/drm/amd/include/atomfirmware.h | 28 +- 1 file

[PATCH 5/8] drm/amdgpu/atomfirmware: add memory training related helper functions

2019-10-10 Thread Tianci Yin
From: "Tianci.Yin" parse firmware to get memory training capability and fb location. Change-Id: I147c1d48e255e0191be4beb1ad6b637da607bf75 Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +

[PATCH 2/8] drm/amdgpu: add a generic fb accessing helper function

2019-10-10 Thread Tianci Yin
From: "Tianci.Yin" add a generic helper function for accessing framebuffer via MMIO Change-Id: I4baa0aa53c93a94c2eff98c6211a61f369239982 Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

RE: [PATCH] drm/amdgpu/swSMU: custom UMD pstate peak clock for navi14

2019-10-10 Thread Feng, Kenneth
Reviewed-by: Kenneth Feng -Original Message- From: Wang, Kevin(Yang) Sent: Friday, October 11, 2019 8:52 AM To: amd-gfx@lists.freedesktop.org Cc: Feng, Kenneth ; Zhang, Hawking ; Hesik, Christopher ; Wang, Kevin(Yang) Subject: [PATCH] drm/amdgpu/swSMU: custom UMD pstate peak clock

[PATCH 1/8] drm/amdgpu: update amdgpu_discovery to handle revision

2019-10-10 Thread Tianci Yin
From: "Tianci.Yin" update amdgpu_discovery to get IP revision. Change-Id: If8152103d03b58e1dc0f32db63625e290f5f08a0 Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h | 2 +- 2 files

[PATCH 3/8] drm/amdgpu: introduce psp_v11_0_is_sos_alive interface

2019-10-10 Thread Tianci Yin
From: "Tianci.Yin" introduce psp_v11_0_is_sos_alive func for common use. Change-Id: Iee0a6dd924d6a4b164eb751c0bec49fcb7d79483 Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin --- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 22 +- 1 file changed, 13 insertions(+), 9

[PATCH 3/3] drm/amdgpu: add RAS support for VML2 and ATCL2

2019-10-10 Thread Dennis Li
Add codes to query the EDC count of VML2 & ATCL2 Change-Id: If2c251481ba0a1a34ce3405a85f86d65eecee461 Signed-off-by: Dennis Li --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 167 ++ 1 file changed, 167 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

[PATCH 1/3] drm/amdgpu: change to query the actual EDC counter

2019-10-10 Thread Dennis Li
For the potential request in the future, change to query the actual EDC counter. Change-Id: I783ccd76f4c65f9829f7a8967a539a23ae5484b5 Signed-off-by: Dennis Li --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 819 -- drivers/gpu/drm/amd/amdgpu/soc15.h| 2 + 2 files

[PATCH 2/3] drm/amd/include: add register define for VML2 and ATCL2

2019-10-10 Thread Dennis Li
Add VML2 and ATCL2 ECC registers to support VEGA20 RAS Change-Id: I8860f2e37fa7afd8d6123290fb7b9dcee56edd6e Signed-off-by: Dennis Li --- .../amd/include/asic_reg/gc/gc_9_0_offset.h| 18 -- .../amd/include/asic_reg/gc/gc_9_0_sh_mask.h | 18 -- 2 files

[PATCH 0/3] RAS Support for GFX blocks

2019-10-10 Thread Dennis Li
1. Add the EDC count from hardware. 2. Add RAS support for VML2 amd ATCL2 sub blocks. Dennis Li (3): drm/amdgpu: change to query the actual EDC counter drm/amd/include: add register define for VML2 and ATCL2 drm/amdgpu: add RAS support for VML2 and ATCL2

[PATCH 18/19] ALSA: hda/hdmi - enable runtime pm for newer AMD display audio

2019-10-10 Thread Alex Deucher
We are able to power down the GPU and audio via the GPU driver so flag these asics as supporting runtime pm. Signed-off-by: Alex Deucher --- sound/pci/hda/hda_intel.c | 35 ++- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git

[PATCH 06/19] drm/amdgpu: add supports_baco callback for NV asics.

2019-10-10 Thread Alex Deucher
Check the BACO capabilities from the powerplay table. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/nv.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c index 46206a1a1f4d..68c18f5f4b41 100644 ---

[PATCH 08/19] drm/amdgpu: rename amdgpu_device_is_px to amdgpu_device_supports_boco

2019-10-10 Thread Alex Deucher
To better match what we are checking for and to align with amdgpu_device_supports_baco. BACO - Bus Active, Chip Off BOCO - Bus Off, Chip Off Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8

[PATCH 19/19] ALSA: hda/hdmi - enable automatic runtime pm for AMD HDMI codecs by default

2019-10-10 Thread Alex Deucher
So that we can power down the GPU and audio to save power. Signed-off-by: Alex Deucher --- sound/pci/hda/patch_hdmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index bea7b0961080..26613733f109 100644 ---

[PATCH 15/19] drm/amdgpu: enable runtime pm on BACO capable boards if runpm=1

2019-10-10 Thread Alex Deucher
Everything is in place now. Not enabled by default yet. You still have to specify runpm=1. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

[PATCH 09/19] drm/amdgpu: add additional boco checks to runtime suspend/resume

2019-10-10 Thread Alex Deucher
We will take slightly different paths for boco and baco. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 46 ++--- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

[PATCH 14/19] drm/amdgpu: disentangle runtime pm and vga_switcheroo

2019-10-10 Thread Alex Deucher
Originally we only supported runtime pm on PX/HG laptops so vga_switcheroo and runtime pm are sort of entangled. Attempt to logically separate them. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 22 ++ 1 file changed, 14 insertions(+), 8

[PATCH 13/19] drm/amdgpu: start to disentangle boco from runtime pm

2019-10-10 Thread Alex Deucher
We originally only supported runtime pm on PX/HG laptops so most of the runtime pm code looks for this. Add a new flag to check for runtime pm enablement and use this rather than checking for PX/HG. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++

[PATCH 11/19] drm/amdgpu: add helpers for baco entry and exit

2019-10-10 Thread Alex Deucher
Will be used for runtime pm. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 61 ++ 2 files changed, 63 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH 16/19] drm/amdgpu/runpm: enable runpm on baco capable VI+ asics

2019-10-10 Thread Alex Deucher
Seems to work reliably on VI+. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 63ae8fd76e53..25cf4df4f781

[PATCH 17/19] ALSA: hda/hdmi - fix vgaswitcheroo detection for AMD

2019-10-10 Thread Alex Deucher
Only enable the vga_switcheroo logic on systems with the ATPX ACPI method. This logic is not needed for asics that are not part of a PX (PowerXpress)/HG (Hybrid Graphics) platform. Signed-off-by: Alex Deucher --- sound/pci/hda/hda_intel.c | 39 +++ 1 file

[PATCH 07/19] drm/amdgpu: add a amdgpu_device_supports_baco helper

2019-10-10 Thread Alex Deucher
To check if a device supports BACO or not. This will be used in determining when to enable runtime pm. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 15 +++ 2 files changed, 16 insertions(+) diff

[PATCH 05/19] drm/amdgpu: add supports_baco callback for VI asics.

2019-10-10 Thread Alex Deucher
Check the BACO capabilities from the powerplay table. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/vi.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index 78e5cdc0c058..871c0b8c6b0b

[PATCH 00/19] Enable BACO for power savings

2019-10-10 Thread Alex Deucher
This patch set enables BACO (Bus Active Chip Off) for power savings on VI+ asics. Similar to PowerXpress and Hybrid Graphics (PX/HG) laptops, we can disable GPUs at runtime when they are not in use is they support BACO. The runtime pm code in amdgpu was originally developed for PX/HG laptops, so

[PATCH 12/19] drm/amdgpu: add baco support to runtime suspend/resume

2019-10-10 Thread Alex Deucher
This adds the necessary support to the runtime suspend and resume functions to handle boards that support baco. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

[PATCH 01/19] drm/amdgpu: add asic callback for BACO support

2019-10-10 Thread Alex Deucher
Used to check whether the device supports BACO. This will be used to enable runtime pm on devices which support BACO. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH 02/19] drm/amdgpu: add supports_baco callback for soc15 asics.

2019-10-10 Thread Alex Deucher
Check the BACO capabilities from the powerplay table. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index

[PATCH 04/19] drm/amdgpu: add supports_baco callback for CIK asics.

2019-10-10 Thread Alex Deucher
Check the BACO capabilities from the powerplay table. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/cik.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c index fc8b34480f66..423ff97ac7dc

[PATCH 03/19] drm/amdgpu: add supports_baco callback for SI asics.

2019-10-10 Thread Alex Deucher
Not supported. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/si.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c index 493af42152f2..401e43255a64 100644 --- a/drivers/gpu/drm/amd/amdgpu/si.c +++

[PATCH 08/15] drm/amdgpu/powerplay: add support for BACO on Iceland

2019-10-10 Thread Alex Deucher
This adds BACO support for Iceland asics. Signed-off-by: Alex Deucher --- .../gpu/drm/amd/powerplay/hwmgr/tonga_baco.c | 54 --- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_baco.c

[PATCH 12/15] drm/amdgpu/powerplay: add support for BACO on CI

2019-10-10 Thread Alex Deucher
This adds BACO support for CI asics. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 3 +- drivers/gpu/drm/amd/powerplay/hwmgr/ci_baco.c | 227 ++ drivers/gpu/drm/amd/powerplay/hwmgr/ci_baco.h | 32 +++ 3 files changed, 261 insertions(+), 1

[PATCH 15/15] drm/amdgpu: enable BACO reset for SMU7 based dGPUs (v2)

2019-10-10 Thread Alex Deucher
Use BACO to reset the GPU if supported on SMU7 based dGPUs. v2: don't use baco on CI parts Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/cik.c | 48 -- drivers/gpu/drm/amd/amdgpu/cik.h | 3 ++ drivers/gpu/drm/amd/amdgpu/vi.c | 84 ++--

[PATCH 13/15] drm/amdgpu/powerplay: split out common smu7 BACO code

2019-10-10 Thread Alex Deucher
Several of the BACO functions are common across smu7-based asics. Split the common code out. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/ci_baco.c | 34 +-- drivers/gpu/drm/amd/powerplay/hwmgr/ci_baco.h | 5 +-

[PATCH 02/15] drm/amdgpu: add new BIF 5.0 register for BACO

2019-10-10 Thread Alex Deucher
Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/include/asic_reg/bif/bif_5_0_d.h | 1 + drivers/gpu/drm/amd/include/asic_reg/bif/bif_5_0_sh_mask.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/include/asic_reg/bif/bif_5_0_d.h

[PATCH 05/15] drm/amdgpu: add new SMU 7.1.3 registers for BACO

2019-10-10 Thread Alex Deucher
Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_1_3_d.h | 1 + drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_1_3_sh_mask.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_1_3_d.h

[PATCH 14/15] drm/amdgpu/powerplay: wire up BACO to powerplay API for smu7

2019-10-10 Thread Alex Deucher
Wire up the powerplay callbacks for for BACO for smu7 devices. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c

[PATCH 00/15] Add BACO support for CI/VI asics

2019-10-10 Thread Alex Deucher
This patch set enables BACO CI and VI asics. BACO is Bus Active Chip Off. It allows us to turn off the GPU while still keeping the bus interface up, so the device does not disappear from the system. PowerXpress and Hybrid Graphics laptops support BOCO (Bus Off Chip Off) which is controlled by

[PATCH 06/15] drm/amdgpu/powerplay: add core support for pre-SOC15 baco

2019-10-10 Thread Alex Deucher
This adds core support for BACO on pre-vega asics. Signed-off-by: Alex Deucher --- .../gpu/drm/amd/powerplay/hwmgr/common_baco.c | 19 +++ .../gpu/drm/amd/powerplay/hwmgr/common_baco.h | 13 + 2 files changed, 32 insertions(+) diff --git

[PATCH 09/15] drm/amdgpu/powerplay: add support for BACO on polaris

2019-10-10 Thread Alex Deucher
This adds BACO support for Polaris asics. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- .../drm/amd/powerplay/hwmgr/polaris_baco.c| 218 ++ .../drm/amd/powerplay/hwmgr/polaris_baco.h| 32 +++ 3 files changed, 251 insertions(+),

[PATCH 04/15] drm/amdgpu: add new SMU 7.1.2 registers for BACO

2019-10-10 Thread Alex Deucher
Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_1_2_d.h | 1 + drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_1_2_sh_mask.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_1_2_d.h

[PATCH 10/15] drm/amdgpu/powerplay: add support for BACO on VegaM

2019-10-10 Thread Alex Deucher
This adds BACO support for VegaM asics. Signed-off-by: Alex Deucher --- .../drm/amd/powerplay/hwmgr/polaris_baco.c| 42 +-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris_baco.c

[PATCH 11/15] drm/amdgpu/powerplay: add support for BACO on Fiji

2019-10-10 Thread Alex Deucher
This adds BACO support for Fiji asics. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- .../gpu/drm/amd/powerplay/hwmgr/fiji_baco.c | 228 ++ .../gpu/drm/amd/powerplay/hwmgr/fiji_baco.h | 32 +++ 3 files changed, 261 insertions(+), 1

[PATCH 07/15] drm/amdgpu/powerplay: add support for BACO on tonga

2019-10-10 Thread Alex Deucher
This adds BACO support for Tonga. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- .../gpu/drm/amd/powerplay/hwmgr/tonga_baco.c | 221 ++ .../gpu/drm/amd/powerplay/hwmgr/tonga_baco.h | 32 +++ 3 files changed, 254 insertions(+), 1

[PATCH 01/15] drm/amdgpu: add new BIF 4.1 register for BACO

2019-10-10 Thread Alex Deucher
Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/include/asic_reg/bif/bif_4_1_d.h | 1 + drivers/gpu/drm/amd/include/asic_reg/bif/bif_4_1_sh_mask.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/include/asic_reg/bif/bif_4_1_d.h

[PATCH 03/15] drm/amdgpu: add new SMU 7.0.1 registers for BACO

2019-10-10 Thread Alex Deucher
Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_0_1_d.h | 1 + drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_0_1_sh_mask.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/include/asic_reg/smu/smu_7_0_1_d.h

[PATCH] drm/amdgpu/swSMU: custom UMD pstate peak clock for navi14

2019-10-10 Thread Wang, Kevin(Yang)
add navi14 umd pstate peak clock support. NAVI14_UMD_PSTATE_PEAK_XT_GFXCLK 1670 MHz NAVI14_UMD_PSTATE_PEAK_XTM_GFXCLK 1448 MHz NAVI14_UMD_PSTATE_PEAK_XLM_GFXCLK 1181 MHz NAVI14_UMD_PSTATE_PEAK_XTX_GFXCLK 1717 MHz NAVI14_UMD_PSTATE_PEAK_XL_GFXCLK 1448 MHz Signed-off-by: Kevin Wang ---

[amdgpu] ASSERT()'s in write_i2c*retimer_setting() functions

2019-10-10 Thread Gabriel C
Hello, I've built recently a new box with a Ryzen3 2200G APU. Each time I plug in an HDMI cable ( to a TV or Monitor ), or boot with HDMI connected a lot ASSERT()'s from write_i2c*retimer_setting() functions are triggered. I see the same on a Laptop with a Ryzen7 3750H with hybrid GPU

[PATCH v3] drm/radeon: Fix EEH during kexec

2019-10-10 Thread KyleMahlkuch
During kexec some adapters hit an EEH since they are not properly shut down in the radeon_pci_shutdown() function. Adding radeon_suspend_kms() fixes this issue. Enabled only on PPC because this patch causes issues on some other boards. Signed-off-by: Kyle Mahlkuch ---

[PATCH] drm/amdgpu: Bail earlier when amdgpu.cik_/si_support is not set to 1

2019-10-10 Thread Hans de Goede
Bail from the pci_driver probe function instead of from the drm_driver load function. This avoid /dev/dri/card0 temporarily getting registered and then unregistered again, sending unwanted add / remove udev events to userspace. Specifically this avoids triggering the (userspace) bug fixed by

Re: [PATCH] drm/amdgpu: Bail earlier when amdgpu.cik_/si_support is not set to 1

2019-10-10 Thread Daniel Vetter
On Thu, Oct 10, 2019 at 6:28 PM Hans de Goede wrote: > > Bail from the pci_driver probe function instead of from the drm_driver > load function. > > This avoid /dev/dri/card0 temporarily getting registered and then > unregistered again, sending unwanted add / remove udev events to > userspace. >

Re: [PATCH] drm/amdgpu/sdma5: fix mask value of POLL_REGMEM packet for pipe sync

2019-10-10 Thread Michel Dänzer
On 2019-10-09 7:09 p.m., Yuan, Xiaojie wrote: sdma will hang once sequence number to be polled reaches 0x1000_ Signed-off-by: Xiaojie Yuan --- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] drm/amdgpu: user pages array memory leak fix

2019-10-10 Thread Joe Barnett
Thanks for looking at this Christian. Let me know if there's anything I can do to help. In the meantime, is there a workaround to avoid the memory leak other than using a kernel from before the HMM change? Thanks, -Joe On Fri, Oct 4, 2019 at 8:02 AM Koenig, Christian wrote: > Hi Philip, > >

[PATCH 1/5] drm/amdgpu: move pci_save_state into suspend path

2019-10-10 Thread Alex Deucher
for amdgpu_device_suspend. This follows the logic in the resume path. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH 2/5] drm/amdgpu: move gpu reset out of amdgpu_device_suspend

2019-10-10 Thread Alex Deucher
Move it into the caller. There are cases were we don't want it. We need it for hibernation, but we don't need it for runtime pm. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 7 ++- 2 files changed, 6

[PATCH 0/5] Misc runpm and baco fixes

2019-10-10 Thread Alex Deucher
While cleaning up the runtime pm code in amdgpu, I came across a few things. These patches fix them up. Please review! Alex Deucher (5): drm/amdgpu: move pci_save_state into suspend path drm/amdgpu: move gpu reset out of amdgpu_device_suspend drm/amdgpu: simplify ATPX detection

[PATCH 5/5] drm/amdgpu/soc15: add support for baco reset with swSMU

2019-10-10 Thread Alex Deucher
Add support for vega20 when the swSMU path is used. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 53 +++--- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c

[PATCH 4/5] drm/amdgpu: remove in_baco_reset hack

2019-10-10 Thread Alex Deucher
It was a vega20 specific hack. Check if we are in reset and what reset method we are using. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 -- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 -- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c |

[PATCH 3/5] drm/amdgpu: simplify ATPX detection

2019-10-10 Thread Alex Deucher
Use the base class rather than the specific class and drop the second loop. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c

[PATCH] drm/amdgpu/display: clean up dcn2*_pp_smu functions

2019-10-10 Thread Alex Deucher
Use the dcn21 functions in dcn21_resource.c and make the dcn20 functions static since they are only used in dcn20_resource now. Cc: bhawanpreet.la...@amd.com Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 6 --

[PATCH] drm/amdgpu/powerplay: add renoir funcs to support dc

2019-10-10 Thread Hersen Wu
there are two paths for renoir dc access smu. one dc access smu directly using bios smc interface: set disply, dprefclk, etc. another goes through pplib for get dpm clock table and set watermmark. Signed-off-by: Hersen Wu --- .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 16 +---

Re: [pull] amdgpu/kfd, radeon, ttm drm-next-5.5

2019-10-10 Thread Daniel Vetter
On Thu, Oct 10, 2019 at 4:37 PM Koenig, Christian wrote: > Am 10.10.19 um 16:34 schrieb Alex Deucher: > > AOn Thu, Oct 10, 2019 at 5:54 AM Daniel Vetter > > wrote: > >> On Thu, Oct 10, 2019 at 6:17 AM Alex Deucher wrote: > >>> [SNIP] > >>> Christian König (22): > >>>drm/amdgpu: use

Re: [pull] amdgpu/kfd, radeon, ttm drm-next-5.5

2019-10-10 Thread Koenig, Christian
Am 10.10.19 um 16:34 schrieb Alex Deucher: > AOn Thu, Oct 10, 2019 at 5:54 AM Daniel Vetter wrote: >> On Thu, Oct 10, 2019 at 6:17 AM Alex Deucher wrote: >>> [SNIP] >>> Christian König (22): >>>drm/amdgpu: use moving fence instead of exclusive for VM updates >>>drm/amdgpu:

Re: [pull] amdgpu/kfd, radeon, ttm drm-next-5.5

2019-10-10 Thread Alex Deucher
AOn Thu, Oct 10, 2019 at 5:54 AM Daniel Vetter wrote: > > On Thu, Oct 10, 2019 at 6:17 AM Alex Deucher wrote: > > > > Hi Dave, Daniel, > > > > New stuff for 5.5. There's an export of a cgroup function that > > Tejun acked for merging through the drm tree. kfd uses it to handle > > permissions

Re: [PATCH 2/3] drm/amdgpu/powerplay: Use swap() where appropriate

2019-10-10 Thread Alex Deucher
On Thu, Oct 10, 2019 at 9:12 AM Ville Syrjala wrote: > > From: Ville Syrjälä > > @swap@ > identifier TEMP; > expression A,B; > @@ > - TEMP = A; > - A = B; > - B = TEMP; > + swap(A, B); > > @@ > type T; > identifier swap.TEMP; > @@ > ( > - T TEMP; > | > - T TEMP = {...}; > ) > ... when != TEMP >

Re: [PATCH 1/3] drm/amd/display: Use swap() where appropriate

2019-10-10 Thread Alex Deucher
Applied. Thanks! Alex On Thu, Oct 10, 2019 at 9:48 AM Kazlauskas, Nicholas wrote: > > On 2019-10-10 9:11 a.m., Ville Syrjala wrote: > > From: Ville Syrjälä > > > > Mostly a cocci-job, but it flat out refused to remove the > > declaration in drivers/gpu/drm/amd/display/dc/core/dc.c so > > had

Re: [PATCH 1/3] drm/amd/display: Use swap() where appropriate

2019-10-10 Thread Kazlauskas, Nicholas
On 2019-10-10 9:11 a.m., Ville Syrjala wrote: > From: Ville Syrjälä > > Mostly a cocci-job, but it flat out refused to remove the > declaration in drivers/gpu/drm/amd/display/dc/core/dc.c so > had to do that part manually. > > @swap@ > identifier TEMP; > expression A,B; > @@ > - TEMP = A; > - A

[PATCH 2/3] drm/amdgpu/powerplay: Use swap() where appropriate

2019-10-10 Thread Ville Syrjala
From: Ville Syrjälä @swap@ identifier TEMP; expression A,B; @@ - TEMP = A; - A = B; - B = TEMP; + swap(A, B); @@ type T; identifier swap.TEMP; @@ ( - T TEMP; | - T TEMP = {...}; ) ... when != TEMP Cc: Rex Zhu Cc: Evan Quan Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou"

[PATCH 1/3] drm/amd/display: Use swap() where appropriate

2019-10-10 Thread Ville Syrjala
From: Ville Syrjälä Mostly a cocci-job, but it flat out refused to remove the declaration in drivers/gpu/drm/amd/display/dc/core/dc.c so had to do that part manually. @swap@ identifier TEMP; expression A,B; @@ - TEMP = A; - A = B; - B = TEMP; + swap(A, B); @@ type T; identifier swap.TEMP; @@ (

Re: [PATCH] drm/amdgpu/discovery: reserve discovery data at the top of VRAM

2019-10-10 Thread Yuan, Xiaojie
Thanks Alex. I'll try to use the new api and send v2 patch. BR, Xiaojie From: Alex Deucher Sent: Thursday, October 10, 2019 8:57 PM To: Yuan, Xiaojie Cc: amd-gfx@lists.freedesktop.org ; Xiao, Jack ; Zhang, Hawking Subject: Re: [PATCH] drm/amdgpu/discovery:

Re: [PATCH] drm/amdgpu/discovery: reserve discovery data at the top of VRAM

2019-10-10 Thread Alex Deucher
On Thu, Oct 10, 2019 at 8:48 AM Yuan, Xiaojie wrote: > > IP Discovery data is TMR fenced by the latest PSP BL, > so we need to reserve this region. > > Signed-off-by: Xiaojie Yuan > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 15

RE: [PATCH] drm/amdgpu/discovery: reserve discovery data at the top of VRAM

2019-10-10 Thread Zhang, Hawking
Please add define on tmr memory size instead of hard-code. Other than that the patch is Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Yuan, Xiaojie Sent: 2019年10月10日 20:48 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Xiao, Jack ; Yuan, Xiaojie

[PATCH] drm/amdgpu/discovery: reserve discovery data at the top of VRAM

2019-10-10 Thread Yuan, Xiaojie
IP Discovery data is TMR fenced by the latest PSP BL, so we need to reserve this region. Signed-off-by: Xiaojie Yuan --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 15 +++ 2 files changed, 16 insertions(+) diff --git

[RFC PATCH] drm/amdgpu: fix amdgpu_vm_handle_fault return value

2019-10-10 Thread Nirmoy Das
amdgpu_vm_handle_fault should return true on success Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index

Re: [PATCH 2/2] drm/amd/powerplay: re-enable FW_DSTATE feature bit

2019-10-10 Thread Deucher, Alexander
Great. thanks! Alex From: Feng, Kenneth Sent: Thursday, October 10, 2019 3:00 AM To: Yuan, Xiaojie ; Deucher, Alexander ; amd-gfx@lists.freedesktop.org Cc: Xiao, Jack ; Wang, Kevin(Yang) ; Zhang, Hawking ; Quan, Evan Subject: RE: [PATCH 2/2]

Re: [RFC PATCH] drm/amdgpu: fix amdgpu_vm_handle_fault return value

2019-10-10 Thread Nirmoy
On 10/10/19 1:19 PM, Koenig, Christian wrote: > Am 10.10.19 um 12:42 schrieb Nirmoy Das: >> amdgpu_vm_handle_fault should return true on success > NAK, that is intentional. > > There is a follow up patch which didn't made it into our server branch > which implements faults handling. In that case

Re: [RFC PATCH] drm/amdgpu: fix amdgpu_vm_handle_fault return value

2019-10-10 Thread Koenig, Christian
Am 10.10.19 um 12:42 schrieb Nirmoy Das: > amdgpu_vm_handle_fault should return true on success NAK, that is intentional. There is a follow up patch which didn't made it into our server branch which implements faults handling. We could actually change the return value to void until that one

Re: [pull] amdgpu/kfd, radeon, ttm drm-next-5.5

2019-10-10 Thread Daniel Vetter
On Thu, Oct 10, 2019 at 6:17 AM Alex Deucher wrote: > > Hi Dave, Daniel, > > New stuff for 5.5. There's an export of a cgroup function that > Tejun acked for merging through the drm tree. kfd uses it to handle > permissions in containers since there is only one /dev/kfd. > > The following

RE: [PATCH 2/2] drm/amd/powerplay: re-enable FW_DSTATE feature bit

2019-10-10 Thread Feng, Kenneth
Hi Alex, This issue was navi10 specific and was found in May, 2019. It was early after the asic back, then since gfxoff was removed from navi10, we didn't really verify which firmware version started to have a fix. For navi14/navi12, there's no such issue at all. Sorry for losing the track of it.

Re: Potential NULL pointer deference in drm/amdgpu

2019-10-10 Thread Koenig, Christian
Hi Yizhuo, Am 10.10.19 um 07:09 schrieb Yizhuo Zhai: > Hi All: > drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c: > The function to_amdgpu_fence() could return NULL, but callers > in this file does not check the return value but directly dereference it, > which seems potentially unsafe. > Such callers

RE: [PATCH 1/2] drm/amd/powerplay: enable df cstate control on powerplay routine

2019-10-10 Thread Feng, Kenneth
Reviewed-by: Kenneth Feng -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Quan, Evan Sent: Thursday, October 10, 2019 11:45 AM To: amd-gfx@lists.freedesktop.org Cc: Quan, Evan Subject: [PATCH 1/2] drm/amd/powerplay: enable df cstate control

RE: [PATCH 2/2] drm/amd/powerplay: enable df cstate control on swSMU routine

2019-10-10 Thread Feng, Kenneth
Reviewed-by: Kenneth Feng -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Quan, Evan Sent: Thursday, October 10, 2019 11:45 AM To: amd-gfx@lists.freedesktop.org Cc: Quan, Evan Subject: [PATCH 2/2] drm/amd/powerplay: enable df cstate control