RE: [PATCH] drm/amd/powerplay: handle features disablement for baco reset in SMU FW

2020-02-07 Thread Quan, Evan
>Do we need the in_gpu_reset check here? Is there ever a case where would >ever want to execute the rest of this? What if we enable BACO for power >savings on arcturus? That is used to rule out the system suspend case. But yes, it may cause some problem for the runtime suspend case(which uses bac

[PATCH] drm/amdgpu/sriov set driver_table address in VF

2020-02-07 Thread Jack Zhang
With the recent patch to unify VRAM address for driver table(a83f82e). VF cannot dump table info any more because SMU_MSG_SetDriverDramAddrHigh/Low were deleted in the function of smu_update_table. Therefore, VF also needs to set driver_table address in smu_hw_init to fix this regression issue. S

[PATCH] drm/amdgpu/vcn2.5: fix warning

2020-02-07 Thread James Zhu
Fix warning during switching to dpg pause mode for VCN firmware Version ENC: 1.1 DEC: 1 VEP: 0 Revision: 16 Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/

[RFC PATCH v2] drm/amdgpu: Remove kfd eviction fence before release bo

2020-02-07 Thread Pan, Xinhui
No need to trigger eviction as the memory mapping will not be used anymore. All pt/pd bos share same resv, hence the same shared eviction fence. Everytime page table is freed, the fence will be signled and that cuases kfd unexcepted evictions. Signed-off-by: xinhui pab --- drivers/gpu/drm/amd

Re: [RFC PATCH v2] drm/amdgpu: Remove kfd eviction fence before release bo

2020-02-07 Thread Christian König
Am 07.02.20 um 14:42 schrieb Pan, Xinhui: No need to trigger eviction as the memory mapping will not be used anymore. All pt/pd bos share same resv, hence the same shared eviction fence. Everytime page table is freed, the fence will be signled and that cuases kfd unexcepted evictions. Signed-

回复: [RFC PATCH v2] drm/amdgpu: Remove kfd eviction fence before release bo

2020-02-07 Thread Pan, Xinhui
[AMD Official Use Only - Internal Distribution Only] 发件人: Koenig, Christian 发送时间: 2020年2月7日 21:46 收件人: Pan, Xinhui; amd-gfx@lists.freedesktop.org 抄送: Kuehling, Felix; Deucher, Alexander 主题: Re: [RFC PATCH v2] drm/amdgpu: Remove kfd eviction fence before re

Re: 回复: [RFC PATCH v2] drm/amdgpu: Remove kfd eviction fence before release bo

2020-02-07 Thread Christian König
Am 07.02.20 um 14:50 schrieb Pan, Xinhui: [AMD Official Use Only - Internal Distribution Only] 发件人: Koenig, Christian 发送时间: 2020年2月7日 21:46 收件人: Pan, Xinhui; amd-gfx@lists.freedesktop.org 抄送: Kuehling, Felix; Deucher, Alexander 主题: Re: [RFC PATCH v2] drm

Re: [PATCH] drm/amd/powerplay: handle features disablement for baco reset in SMU FW

2020-02-07 Thread Alex Deucher
On Fri, Feb 7, 2020 at 3:28 AM Quan, Evan wrote: > > >Do we need the in_gpu_reset check here? Is there ever a case where would > >ever want to execute the rest of this? What if we enable BACO for power > >savings on arcturus? > That is used to rule out the system suspend case. > But yes, it may

[PATCH 1/3] drm/amdgpu: add flag for runtime suspend

2020-02-07 Thread Alex Deucher
So we know whether we in are in runtime suspend or system suspend. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/

[PATCH 2/3] drm/amdgpu/smu: properly handle runpm/suspend/reset

2020-02-07 Thread Alex Deucher
We need some special handling when using baco vs. other things. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 35 -- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/am

[PATCH 3/3] drm/amdgpu/powerplay: fix baco check for vega20

2020-02-07 Thread Alex Deucher
We need to handle the runpm case as well as GPU reset. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay

Re: [PATCH] drm/amdgpu/sriov set driver_table address in VF

2020-02-07 Thread Deucher, Alexander
[AMD Public Use] Acked-by: Alex Deucher From: amd-gfx on behalf of Jack Zhang Sent: Friday, February 7, 2020 4:51 AM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Jack (Jian) Subject: [PATCH] drm/amdgpu/sriov set driver_table address in VF With the recent pat

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-07 Thread Daniel Vetter
On Thu, Feb 6, 2020 at 3:51 PM Christian König wrote: > > Am 06.02.20 um 15:49 schrieb Alex Deucher: > > On Thu, Feb 6, 2020 at 6:50 AM Christian König > > wrote: > >> Am 06.02.20 um 12:10 schrieb Lucas Stach: > >>> Hi all, > >>> > >>> On Mi, 2020-02-05 at 19:24 +0100, Lucas Stach wrote: > H

[PATCH 00/17] DC Patches February 07, 2020

2020-02-07 Thread Rodrigo Siqueira
This DC patchset brings improvements in multiple areas. In summary, we highlight: * Enable backlight support via AUX for OLED displays. * Improvements in the PSR. * Improvements in the dmub code. * ODM calculation improvements. Anthony Koo (2): drm/amd/display: Update register defines drm/am

Re: [PATCH 1/2] drm/amdgpu: update smu_v11_0_pptable.h

2020-02-07 Thread Alex Deucher
On Fri, Feb 7, 2020 at 2:36 AM Quan, Evan wrote: > > > SMU_11_0_ODFEATURE_COUNT= 14, > This seems a little weird. > Maybe it should be "SMU_11_0_ODFEATURE_COUNT = 1 << SMU_11_0_ODCAP_COUNT, " I copied it verbatim. The naming makes more sense as 14 (number of features) as oppo

[PATCH 02/17] drm/amd/display: Don't treat missing command table as failure

2020-02-07 Thread Rodrigo Siqueira
From: Nicholas Kazlauskas [Why] With the fallback case in place for command table offloading via DMCUB it's no longer an error for the command table to be missing specific entries. [How] Drop the BREAK_TO_DEBUGGER(); Signed-off-by: Nicholas Kazlauskas Reviewed-by: Chris Park Acked-by: Rodrigo

[PATCH 11/17] drm/amd/display: 3.2.72

2020-02-07 Thread Rodrigo Siqueira
From: Anthony Koo Signed-off-by: Anthony Koo Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 8c88706

[PATCH 16/17] drm/amd/display: Use fb_base/fb_offset if available for translation

2020-02-07 Thread Rodrigo Siqueira
From: Nicholas Kazlauskas [Why] In the case where we do have these passed in then we should be using these instead of the registers - those are only programmed when booting the adapter as primary. [How] Check if fb_base/fb_offset are non-zero. The value of 0 is invalid for fb_base but is valid f

[PATCH 06/17] drm/amd/display: Add AUX backlight register

2020-02-07 Thread Rodrigo Siqueira
Introduce vendor-specific registers for handling backlight via AUX. Signed-off-by: Rodrigo Siqueira Reviewed-by: Nicholas Kazlauskas Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 8 drivers/gpu/drm/amd/display/include/dpcd_

[PATCH 01/17] drm/amd/display: always apply T7/T9 delay logic

2020-02-07 Thread Rodrigo Siqueira
From: Martin Leung [why] before we exit early in edp_reciever_ready if we detect that panel is not edp or below rev 1.2. This will skip the backlight/t7 delay panel patch. [how] edit logic to ensure panel patch is applied regardless of edp rev. Signed-off-by: Martin Leung Reviewed-by: Anthony

[PATCH 04/17] drm/amd/display: Pass override OUI in to dc_init_data

2020-02-07 Thread Rodrigo Siqueira
From: Calvin Hou [WHY] Vendor dongle requires propietary OUI and handshake sequence. [HOW] Add a new structure to dc_init_data, to allow creator to pass an override vendor_oui. This value will be written to DP_SOURCE_OUI instead of AMD signature, when dpcd_set_source_specific_data is called. Si

[PATCH 13/17] drm/amd/display: add monitor patch to disable SCDC read/write

2020-02-07 Thread Rodrigo Siqueira
From: Martin Leung [why] customer issue: found that for their specific panel, EDID register space being overwritten during SCDC read write [how] customer accepted HDMI 2 features not working - disabled SCDC read/write as well as HDMI 2 in general based on monitor patch Signed-off-by: Martin Leu

[PATCH 12/17] drm/amd/display: add odm split logic to scaling calculations

2020-02-07 Thread Rodrigo Siqueira
From: Dmytro Laktyushkin Currently odm scaling calculations are only done when adding initial odm pipe. Any scaling re-calculations will mess up odm because of this. This change resolves the problem by updating scaling split logic to handle odm. Signed-off-by: Dmytro Laktyushkin Reviewed-by: E

[PATCH 07/17] drm/amd/display: Add backlight support via AUX

2020-02-07 Thread Rodrigo Siqueira
Several modern displays support HDR/OLED panel, and one of the interesting changes provided by this technology is the new approach for handling backlight. More precisely, in the traditional way, we use PWM to manage display backlight; however, with HDR/OLED we begin to use DP Aux channel for adjust

[PATCH 15/17] drm/amd/display: Add psr get_state call

2020-02-07 Thread Rodrigo Siqueira
From: Wyatt Wood [Why] Driver needs to know PSR state. [How] Use GPINT to call to firmware and get psr state. Signed-off-by: Wyatt Wood Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/d

[PATCH 09/17] drm/amd/display: Update register defines

2020-02-07 Thread Rodrigo Siqueira
From: Anthony Koo [Why] Some register defines are redundant or updated [How] Update register defines Remove some redundant defines Signed-off-by: Anthony Koo Reviewed-by: Wyatt Wood Acked-by: Rodrigo Siqueira Acked-by: Sun peng Li --- .../drm/amd/display/dc/dcn20/dcn20_mmhubbub.h | 20

[PATCH 00/17] DC Patches February 07, 2020

2020-02-07 Thread Rodrigo Siqueira
This DC patchset brings improvements in multiple areas. In summary, we highlight: * Enable backlight support via AUX for OLED displays. * Improvements in the PSR. * Improvements in the dmub code. * ODM calculation improvements. Anthony Koo (2): drm/amd/display: Update register defines drm/am

[PATCH 05/17] drm/amd/display: Hookup psr set version call

2020-02-07 Thread Rodrigo Siqueira
From: Wyatt Wood [Why] Set version is currently not called. [How] Add call to set version from copy settings. This should be the only time this is called as the eDP caps should never change. Signed-off-by: Wyatt Wood Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira --- drivers/gp

[PATCH 10/17] drm/amd/display: Drop unused field from dc_panel_patch

2020-02-07 Thread Rodrigo Siqueira
From: Nikola Cornij In the struct dc_panel_patch, we have a field named manage_secondary_link which is not used by any part of the code. This commit drops the unused field. Signed-off-by: Nikola Cornij Reviewed-by: Joshua Aberback Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc

[PATCH 14/17] drm/amd/display: Don't map ATOM_ENABLE to ATOM_INIT

2020-02-07 Thread Rodrigo Siqueira
From: Nicholas Kazlauskas [Why] In DCN hardware sequencer we do actually call ATOM_INIT correctly per pipe. The workaround is not necessary for command table offloading. [How] Drop the workaround since it's not needed. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Chris Park Acked-by: Rodri

[PATCH 17/17] drm/amd/display: DCN2.x Do not program DPPCLK if same value

2020-02-07 Thread Rodrigo Siqueira
From: Sung Lee [WHY] Programming DPPCLK to the same value currently set may cause underflow while playing video in certain conditions. [HOW] Only program DPPCLK if clock is not the same as the previous value programmed. Signed-off-by: Sung Lee Reviewed-by: Yongqiang Sun Acked-by: Rodrigo Siqu

[PATCH 08/17] drm/amd/display: Toggle VSR button cause system crash

2020-02-07 Thread Rodrigo Siqueira
From: Peikang Zhang [Why] in dcn10_apply_ctx_for_surface(), if we hit !top_pipe_to_program, pipe_ctx->update_flags could not get cleared. [How] Moved clearing pipe_ctx->update_flags logic before if (!top_pipe_to_program) to gurantee pipe_ctx->update_flags get cleared. Signed-off-by: Peikang Zha

[PATCH 03/17] drm/amd/display: Remove unused values from psr struct

2020-02-07 Thread Rodrigo Siqueira
From: Wyatt Wood [Why] Taking up unnecessary space. [How] Remove unused values from psr struct. Signed-off-by: Wyatt Wood Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 13 - drivers/gpu/drm/amd/display/dmub/inc/

[PATCH 02/15] drm/amdgpu/ttm: move debugfs init into core amdgpu debugfs

2020-02-07 Thread Alex Deucher
In order to remove the load and unload drm callbacks, we need to reorder the init sequence to move all the drm debugfs file handling. Do this for ttm. Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 10 ++ drivers/gpu/drm/amd/amdg

[PATCH 11/15] drm/amd/display: move dpcd debugfs members setup

2020-02-07 Thread Alex Deucher
Into the function that creates the debugfs files rather than setting them explicitly in the callers. Reviewed-by: Harry Wentland Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- drivers/gpu/drm/amd/display/amdgpu_dm/a

[PATCH 13/15] drm/amdgpu/display: split dp connector registration (v2)

2020-02-07 Thread Alex Deucher
Split into init and register functions to avoid a segfault in some configs when the load/unload callbacks are removed. v2: - add back accidently dropped has_aux setting - set dev in late_register Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 16 +

[PATCH 01/15] drm/amdgpu: rename amdgpu_debugfs_preempt_cleanup

2020-02-07 Thread Alex Deucher
to amdgpu_debugfs_fini. It will be used for other things in the future. Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 3 file

[PATCH 03/15] drm/amdgpu/pm: move debugfs init into core amdgpu debugfs

2020-02-07 Thread Alex Deucher
In order to remove the load and unload drm callbacks, we need to reorder the init sequence to move all the drm debugfs file handling. Do this for pm. Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 7 +++ drivers/gpu/drm/amd/amdgpu/am

[PATCH 09/15] drm/amdgpu: don't call drm_connector_register for non-MST ports

2020-02-07 Thread Alex Deucher
The core does this for us now. Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c| 1 - drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 1 - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 3 files changed, 3 deletions(-) di

[PATCH 04/15] drm/amdgpu/sa: move debugfs init into core amdgpu debugfs

2020-02-07 Thread Alex Deucher
In order to remove the load and unload drm callbacks, we need to reorder the init sequence to move all the drm debugfs file handling. Do this for SA (sub allocator). Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 drivers/gpu/drm/

[PATCH 08/15] drm/amdgpu/firmware: move debugfs init into core amdgpu debugfs

2020-02-07 Thread Alex Deucher
In order to remove the load and unload drm callbacks, we need to reorder the init sequence to move all the drm debugfs file handling. Do this for firmware. Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 drivers/gpu/drm/amd/amdgpu

[PATCH 05/15] drm/amdgpu/fence: move debugfs init into core amdgpu debugfs

2020-02-07 Thread Alex Deucher
In order to remove the load and unload drm callbacks, we need to reorder the init sequence to move all the drm debugfs file handling. Do this for fence handling. Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 +++ drivers/gpu/drm/amd/a

[PATCH 06/15] drm/amdgpu/gem: move debugfs init into core amdgpu debugfs

2020-02-07 Thread Alex Deucher
In order to remove the load and unload drm callbacks, we need to reorder the init sequence to move all the drm debugfs file handling. Do this for gem. Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 drivers/gpu/drm/amd/amdgpu/amdg

[PATCH 00/15] amdgpu: remove load and unload callbacks (v3)

2020-02-07 Thread Alex Deucher
These are deprecated and the drm will soon start warning when drivers still use them. It was a long and twisty road, but seems to work. v2: Add additional patch (13/15) which should fix the crash reported by Thomas Zimmermann. v3: Fix dp aux registration harder, add missing kconfig guard Alex De

[PATCH 12/15] drm/amdgpu/display: add a late register connector callback

2020-02-07 Thread Alex Deucher
To handle debugfs setup on non DP MST connectors. Reviewed-by: Harry Wentland Acked-by: Christian König Signed-off-by: Alex Deucher --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/dis

[PATCH 07/15] drm/amdgpu/regs: move debugfs init into core amdgpu debugfs

2020-02-07 Thread Alex Deucher
In order to remove the load and unload drm callbacks, we need to reorder the init sequence to move all the drm debugfs file handling. Do this for register access files. Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 drivers/gpu/d

[PATCH 15/15] drm/amdgpu: drop legacy drm load and unload callbacks

2020-02-07 Thread Alex Deucher
We've moved the debugfs handling into a centralized place so we can remove the legacy load an unload callbacks. Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 13 +++-- 2 files

[PATCH 10/15] drm/amdgpu/display: move debugfs init into core amdgpu debugfs (v2)

2020-02-07 Thread Alex Deucher
In order to remove the load and unload drm callbacks, we need to reorder the init sequence to move all the drm debugfs file handling. Do this for display. v2: add config guard for DC Reviewed-by: Harry Wentland (v1) Acked-by: Christian König (v1) Signed-off-by: Alex Deucher --- drivers/gpu/d

[PATCH 14/15] drm/amdgpu/ring: move debugfs init into core amdgpu debugfs

2020-02-07 Thread Alex Deucher
In order to remove the load and unload drm callbacks, we need to reorder the init sequence to move all the drm debugfs file handling. Do this for rings. Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 23 - drivers/gpu

Re: [PATCH V6] drm: Add support for DP 1.4 Compliance edid corruption test

2020-02-07 Thread Rodrigo Siqueira
On 02/05, Jerry (Fangzhi) Zuo wrote: > Unlike DP 1.2 edid corruption test, DP 1.4 requires to calculate > real CRC value of the last edid data block, and write it back. > Current edid CRC calculates routine adds the last CRC byte, > and check if non-zero. > > This behavior is not accurate; actuall

[PATCH 13/15] drm/amdgpu/display: split dp connector registration (v3)

2020-02-07 Thread Alex Deucher
Split into init and register functions to avoid a segfault in some configs when the load/unload callbacks are removed. v2: - add back accidently dropped has_aux setting - set dev in late_register v3: - fix dp cec ordering Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_connec

Re: [Patch v3 3/4] drm/amdkfd: refactor runtime pm for baco

2020-02-07 Thread Felix Kuehling
One more nit-pick and one error-handling problem inline. On 2020-02-06 7:09 p.m., Rajneesh Bhardwaj wrote: So far the kfd driver implemented same routines for runtime and system wide suspend and resume (s2idle or mem). During system wide suspend the kfd aquires an atomic lock that prevents any m