[PATCH] drm/amdgpu: fix GCR_GENERAL_CNTL offset for dimgrey_cavefish

2021-04-19 Thread Jiansong Chen
dimgrey_cavefish has similar gc_10_3 ip with sienna_cichlid, so follow its registers offset setting. Signed-off-by: Jiansong Chen Change-Id: I2c8f1022c0b4c5baf70d09ec99b7b2ca8da36bba --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

Re: [PATCH] drm/amdgpu: fix GCR_GENERAL_CNTL offset for dimgrey_cavefish

2021-04-19 Thread Zhou1, Tao
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Tao Zhou mailto:tao.zh...@amd.com>> From: Jiansong Chen Sent: Monday, April 19, 2021 4:47 PM To: amd-gfx@lists.freedesktop.org Cc: Zhou1, Tao ; Gui, Jack ; Chen, Jiansong (Simon) Subject: [PATCH]

[PATCH Review 1/1] drm/amdgpu: optimize gfx ras features flag clean

2021-04-19 Thread Stanley . Yang
Signed-off-by: Stanley.Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index ec3ebc33ee03..8fdf355d7de8 100644 --- a/drivers/gpu/drm/a

Re: [PATCH 13/19] drm/amd/display: force CP to DESIRED when removing display.

2021-04-19 Thread Pillai, Aurabindo
[AMD Official Use Only - Internal Distribution Only] This patch introduces a null pointer deref on MST hotplug, so this shall be dropped. -- Thanks & Regards, Aurabindo Pillai From: Aurabindo Pillai Sent: Friday, April 16, 2021 10:34 AM To: amd-gfx@lists.freede

Re: [PATCH 14/19] drm/amd/display: fix HDCP drm prop update for MST

2021-04-19 Thread Pillai, Aurabindo
[AMD Official Use Only - Internal Distribution Only] This patch is a related change for the MST null pointer deref regression, so will be dropped. -- Thanks & Regards, Aurabindo Pillai From: Aurabindo Pillai Sent: Friday, April 16, 2021 10:34 AM To: amd-gfx@lis

RE: [PATCH 00/19] DC Patches for 2021 April 19

2021-04-19 Thread Wheeler, Daniel
[AMD Official Use Only - Internal Distribution Only] Hi all,   This week this patchset was tested on a HP Envy 360, with Ryzen 5 4500U, on the following display types: eDP 1080p 60hz, 4k 60hz (via USB-C to DP/HDMI), 1440p 144hz (via USB-C to DP/HDMI), 1680*1050 60hz (via USB-C to DP and then DP

[PATCH] drm/amdgpu: extend xnack limit page fault timeout

2021-04-19 Thread Alex Sierra
Extending this timeout will prevent IH from storm interrupts coming from SDMA while a page fault is active. Currently, on Aldebaran, handling that many interrupts can take a lot of CPU time (up to 4 seconds). This eventually causes timeouts in other tasks. Signed-off-by: Alex Sierra --- drivers/

[PATCH] drm/amdkfd: svm ranges creation for unregistered memory

2021-04-19 Thread Alex Sierra
SVM ranges are created for unregistered memory, triggered by page faults. These ranges are migrated/mapped to GPU VRAM memory. Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 85 +++- 1 file changed, 82 insertions(+), 3 deletions(-) diff --git a/dri

Re: [PATCH 2/2] drm/amdkfd: handle stale retry fault

2021-04-19 Thread Felix Kuehling
Am 2021-04-18 um 1:35 p.m. schrieb Philip Yang: > Retry fault interrupt maybe pending in IH ring after GPU page table is > updated to recover the vm fault, because each page of the range generate > retry fault interrupt. There is race if application unmap range to > remove and free the range first

Re: [PATCH] drm/amdgpu: extend xnack limit page fault timeout

2021-04-19 Thread Felix Kuehling
Am 2021-04-19 um 1:22 p.m. schrieb Alex Sierra: > Extending this timeout will prevent IH from storm interrupts coming > from SDMA while a page fault is active. Currently, on Aldebaran, > handling that many interrupts can take a lot of CPU time > (up to 4 seconds). > This eventually causes timeout

RE: [PATCH 4/4] Revert "drm/amdgpu: workaround the TMR MC address issue (v2)"

2021-04-19 Thread Kasiviswanathan, Harish
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Harish Kasiviswanathan -Original Message- From: amd-gfx On Behalf Of Oak Zeng Sent: Thursday, April 1, 2021 3:42 PM To: amd-gfx@lists.freedesktop.org Cc: Kuehling, Felix ; Lazar, Lijo ; Koenig, Christian ; Zeng, Oak ; Z

Re: [PATCH] drm/amdkfd: svm ranges creation for unregistered memory

2021-04-19 Thread Felix Kuehling
Am 2021-04-19 um 1:24 p.m. schrieb Alex Sierra: > SVM ranges are created for unregistered memory, triggered > by page faults. These ranges are migrated/mapped to > GPU VRAM memory. > > Signed-off-by: Alex Sierra > --- > drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 85 +++- > 1 f

[PATCH v3 00/20] drm: Use new DRM printk funcs (like drm_dbg_*()) in DP helpers

2021-04-19 Thread Lyude Paul
Since it's been asked quite a few times on some of the various DP related patch series I've submitted to use the new DRM printk helpers, and it technically wasn't really trivial to do this before due to the lack of a consistent way to find a drm_device for an AUX channel, this patch series aims to

[PATCH v3 01/20] drm/amdgpu: Add error handling to amdgpu_dm_initialize_dp_connector()

2021-04-19 Thread Lyude Paul
While working on moving i2c device registration into drm_dp_aux_init() - I realized that in order to do so we need to make sure that drivers calling drm_dp_aux_init() handle any errors it could possibly return. In the process of doing that, I noticed that the majority of AMD's code for DP connector

[PATCH v3 02/20] drm/dp: Add __no_check to drm_dp_aux_register()

2021-04-19 Thread Lyude Paul
Since we're about to make it so that drm_dp_aux_init() can fail (and thus - should have it's return value checked) - we should require that callers of drm_dp_aux_register() also check it's return value since drm_dp_aux_init() can be called from there. Signed-off-by: Lyude Paul --- include/drm/dr

[PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini

2021-04-19 Thread Lyude Paul
When moving around drm_dp_aux_register() calls, it turned out we accidentally managed to cause issues with the Tegra driver due to the fact the Tegra driver would attempt to retrieve a reference to the AUX channel's i2c adapter - which wouldn't be initialized until drm_dp_aux_register() is called.

[PATCH v3 04/20] drm/bridge/cdns-mhdp8546: Register DP aux channel with userspace

2021-04-19 Thread Lyude Paul
Just adds some missing calls to drm_dp_aux_register()/drm_dp_aux_unregister() for when we attach/detach the bridge. Signed-off-by: Lyude Paul --- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/br

[PATCH v3 05/20] drm/nouveau/kms/nv50-: Move AUX adapter reg to connector late register/early unregister

2021-04-19 Thread Lyude Paul
Since AUX adapters on nouveau have their respective DRM connectors as parents, we need to make sure that we register then after their connectors. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_connector.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-)

[PATCH v3 06/20] drm/dp: Add backpointer to drm_device in drm_dp_aux

2021-04-19 Thread Lyude Paul
This is something that we've wanted for a while now: the ability to actually look up the respective drm_device for a given drm_dp_aux struct. This will also allow us to transition over to using the drm_dbg_*() helpers for debug message printing, as we'll finally have a drm_device to reference for d

[PATCH v3 07/20] drm/dp: Clarify DP AUX registration time

2021-04-19 Thread Lyude Paul
The docs we had for drm_dp_aux_init() and drm_dp_aux_register() were mostly correct, except for the fact that they made the assumption that all AUX devices were grandchildren of their respective DRM devices. This is the case for most normal GPUs, but is almost never the case with SoCs and display b

[PATCH v3 08/20] drm/dp: Pass drm_dp_aux to drm_dp_link_train_clock_recovery_delay()

2021-04-19 Thread Lyude Paul
So that we can start using drm_dbg_*() in drm_dp_link_train_clock_recovery_delay(). Signed-off-by: Lyude Paul Reviewed-by: Laurent Pinchart Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/drm_dp_helper.c | 3 ++-

[PATCH v3 09/20] drm/dp: Pass drm_dp_aux to drm_dp*_link_train_channel_eq_delay()

2021-04-19 Thread Lyude Paul
So that we can start using drm_dbg_*() for drm_dp_link_train_channel_eq_delay() and drm_dp_lttpr_link_train_channel_eq_delay(). Signed-off-by: Lyude Paul Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 +- drivers/gpu/drm/drm_dp_helper.c

[PATCH v3 10/20] drm/dp: Always print aux channel name in logs

2021-04-19 Thread Lyude Paul
Since we're about to convert everything in drm_dp_helper.c over to using drm_dbg_*(), let's also make our logging more consistent in drm_dp_helper.c while we're at it to ensure that we always print the name of the AUX channel in question. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_help

[PATCH v3 13/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_max_tmds_clock()

2021-04-19 Thread Lyude Paul
Another function we need to pass drm_device down to in order to start using drm_dbg_*(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- include/drm/drm_dp_dual_mode_helper.h | 2 +- 3 files changed, 4 inserti

[PATCH v3 12/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_set_tmds_output()

2021-04-19 Thread Lyude Paul
Another function that we'll need to pass a drm_device (and not drm_dp_aux) down to so that we can move over to using drm_dbg_*(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdmi.c | 3 +-- include/drm/drm_dp_dual_mode_helpe

[PATCH v3 14/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_get_tmds_output()

2021-04-19 Thread Lyude Paul
Another function to pass drm_device * down to so we can start using the drm_dbg_*() in the DRM DP helpers. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 5 +++-- include/drm/drm_dp_dual_mode_helper.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff -

[PATCH v3 11/20] drm/dp_dual_mode: Pass drm_device to drm_dp_dual_mode_detect()

2021-04-19 Thread Lyude Paul
Since we're about to be using drm_dbg_*() throughout the DP helpers, we'll need to be able to access the DRM device in the dual mode DP helpers as well. Note however that since drm_dp_dual_mode_detect() can be called with DDC adapters that aren't part of a drm_dp_aux struct, we need to pass down th

[PATCH v3 17/20] drm/print: Handle potentially NULL drm_devices in drm_dbg_*

2021-04-19 Thread Lyude Paul
While this shouldn't really be something that happens all that often, since we're going to be using the drm_dbg_* log helpers in DRM helpers it's technically possible that a driver could use an AUX adapter before it's been associated with it's respective drm_device. While drivers should take care t

[PATCH v3 18/20] drm/dp: Convert drm_dp_helper.c to using drm_err/drm_dbg_*()

2021-04-19 Thread Lyude Paul
Now that we've added a back-pointer to drm_device to drm_dp_aux, made drm_dp_aux available to any functions in drm_dp_helper.c which need to print to the kernel log, and ensured all of our logging uses a consistent format, let's do the final step of the conversion and actually move everything over

[PATCH v3 16/20] drm/dp_mst: Pass drm_dp_mst_topology_mgr to drm_dp_get_vc_payload_bw()

2021-04-19 Thread Lyude Paul
Since this is one of the few functions in drm_dp_mst_topology.c that doesn't have any way of getting access to a drm_device, let's pass the drm_dp_mst_topology_mgr down to this function so that it can use drm_dbg_kms(). Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c |

[PATCH v3 19/20] drm/dp_dual_mode: Convert drm_dp_dual_mode_helper.c to using drm_err/drm_dbg_kms()

2021-04-19 Thread Lyude Paul
Next step in the conversion, move everything in drm_dp_dual_mode_helper.c over to using drm_err() and drm_dbg_kms(). This was done using the following cocci script: @@ expression list expr; @@ ( - DRM_DEBUG_KMS(expr); + drm_dbg_kms(dev, expr); | - DRM_ERROR(expr); + drm_err(dev,

[PATCH v3 15/20] drm/dp_dual_mode: Pass drm_device to drm_lspcon_(get|set)_mode()

2021-04-19 Thread Lyude Paul
So that we can start using drm_dbg_*() throughout the DRM DP helpers. Signed-off-by: Lyude Paul --- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 8 +--- drivers/gpu/drm/i915/display/intel_lspcon.c | 12 +++- include/drm/drm_dp_dual_mode_helper.h | 4 ++-- 3 files changed, 14

[PATCH v3 20/20] drm/dp_mst: Convert drm_dp_mst_topology.c to drm_err()/drm_dbg*()

2021-04-19 Thread Lyude Paul
And finally, convert all of the code in drm_dp_mst_topology.c over to using drm_err() and drm_dbg*(). Note that this refactor would have been a lot more complicated to have tried writing a coccinelle script for, so this whole thing was done by hand. v2: * Fix line-wrapping in drm_dp_mst_atomic_che

Re: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini

2021-04-19 Thread Ville Syrjälä
On Mon, Apr 19, 2021 at 06:55:05PM -0400, Lyude Paul wrote: > When moving around drm_dp_aux_register() calls, it turned out we > accidentally managed to cause issues with the Tegra driver due to the fact > the Tegra driver would attempt to retrieve a reference to the AUX channel's > i2c adapter - w

[PATCH] drm/amdkfd: svm ranges creation for unregistered memory

2021-04-19 Thread Alex Sierra
SVM ranges are created for unregistered memory, triggered by page faults. These ranges are migrated/mapped to GPU VRAM memory. Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 103 ++- 1 file changed, 101 insertions(+), 2 deletions(-) diff --git a/dr

[PATCH] drm/amdgpu: Add mem sync flag for SDMA IB test

2021-04-19 Thread Jinzhou Su
The buffer for SDMA IB test is allocated by sa bo which may be used by other purpose. Better to flush the cache before commit the IB. Signed-off-by: Jinzhou Su --- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b

Re: [PATCH] drm/amdgpu: Add mem sync flag for SDMA IB test

2021-04-19 Thread Christian König
Am 20.04.21 um 04:23 schrieb Jinzhou Su: The buffer for SDMA IB test is allocated by sa bo which may be used by other purpose. Better to flush the cache before commit the IB. Good point, but shouldn't we do this for a lot of other cases as well? I think the only place where we should not set t

RE: [PATCH] drm/amdgpu: Add mem sync flag for SDMA IB test

2021-04-19 Thread Su, Jinzhou (Joe)
[AMD Official Use Only - Internal Distribution Only] Hello Christian, Thanks for your information. We add this due to sdma0 timeout during S3 stress test. Will update this for other cases in v2. Regards, Joe -Original Message- From: Christian König Sent: Tuesday, April 20, 2021 2:39