[PATCH 03/15] dma-buf & drm/amdgpu: remove dma_resv workaround

2022-04-07 Thread Christian König
Rework the internals of the dma_resv object to allow adding more than one write fence and remember for each fence what purpose it had. This allows removing the workaround from amdgpu which used a container for this instead. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Cc: amd-gfx@l

[PATCH] drm/amd/display: Fix indenting mistakes in dcn10_hw_sequencer.c

2022-04-07 Thread Haowen Bai
Smatch reports the following: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2174 dcn10_enable_vblanks_synchronization() warn: if statement not indented Signed-off-by: Haowen Bai --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 14 +++--- 1 file change

[PATCH] drm/amdgpu: Ensure HDA function is suspended before ASIC reset

2022-04-07 Thread Kai-Heng Feng
DP/HDMI audio on AMD PRO VII stops working after S3: [ 149.450391] amdgpu :63:00.0: amdgpu: MODE1 reset [ 149.450395] amdgpu :63:00.0: amdgpu: GPU mode1 reset [ 149.450494] amdgpu :63:00.0: amdgpu: GPU psp mode1 reset [ 149.983693] snd_hda_intel :63:00.1: refused to change power

[PATCH] drm/amd/display: Fix pointer dereferenced before checking

2022-04-07 Thread Haowen Bai
The pointer dc is dereferencing pointer plane_state before plane_state is being null checked. Fix this by assigning plane_state->ctx->dc to dc only if plane_state is not NULL, otherwise just NULL. Signed-off-by: Haowen Bai --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- 1 f

Re: [PATCH v12] drm/amdgpu: add drm buddy support to amdgpu

2022-04-07 Thread Paul Menzel
Dear Arunpravin, Thank you for your patch. Am 07.04.22 um 07:46 schrieb Arunpravin Paneer Selvam: - Switch to drm buddy allocator - Add resource cursor support for drm buddy I though after the last long discussion, you would actually act on the review comments. Daniel wrote a good summary,

Re: [PATCH] drm/amd/display: Fix pointer dereferenced before checking

2022-04-07 Thread Harry Wentland
On 2022-04-07 01:52, Haowen Bai wrote: > The pointer dc is dereferencing pointer plane_state before plane_state > is being null checked. Fix this by assigning plane_state->ctx->dc to > dc only if plane_state is not NULL, otherwise just NULL. > > Signed-off-by: Haowen Bai > --- > drivers/gpu/d

Re: [PATCH] drm/amd/display: Fix indenting mistakes in dcn10_hw_sequencer.c

2022-04-07 Thread Harry Wentland
On 2022-04-07 02:00, Haowen Bai wrote: > Smatch reports the following: > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2174 > dcn10_enable_vblanks_synchronization() warn: if statement not indented > > Signed-off-by: Haowen Bai Reviewed-by: Harry Wentland Harry > --- >

Re: [PATCH v2] drm/amd/display: don't ignore alpha property on pre-multiplied mode

2022-04-07 Thread Rodrigo Siqueira Jordao
Patch merged to amd-staging-drm-next. Thanks a lot! On 2022-04-05 15:32, Simon Ser wrote: I've tested this patch and it fixes my bug [1]. Thanks! Tested-by: Simon Ser [1]: https://gitlab.freedesktop.org/drm/amd/-/issues/1734>

Re: [EXTERNAL] Re: Code Review Request for AMDGPU Hotplug Support

2022-04-07 Thread Shuotao Xu
Hi Joshi, Per your comment, I produced a fix to work with multi-GPU system for hotplug support for our group’s internal usage. I have tested on a 4-node MI100 system, which seems to be working. It is pushed in the github PR. The details are in: https://github.com/RadeonOpenCompute/ROCK-Kernel-

Re: [PATCH] drm/amd/display: Fix indenting mistakes in dcn10_hw_sequencer.c

2022-04-07 Thread Alex Deucher
Applied. Thanks! Alex On Thu, Apr 7, 2022 at 10:18 AM Harry Wentland wrote: > > > > On 2022-04-07 02:00, Haowen Bai wrote: > > Smatch reports the following: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2174 > > dcn10_enable_vblanks_synchronization() warn: if statement

Re: [PATCH] drm/amdgpu: Ensure HDA function is suspended before ASIC reset

2022-04-07 Thread Alex Deucher
Applied. Thanks! Alex On Thu, Apr 7, 2022 at 8:21 AM Kai-Heng Feng wrote: > > DP/HDMI audio on AMD PRO VII stops working after S3: > [ 149.450391] amdgpu :63:00.0: amdgpu: MODE1 reset > [ 149.450395] amdgpu :63:00.0: amdgpu: GPU mode1 reset > [ 149.450494] amdgpu :63:00.0: amdgpu

Re: [PATCH] drm/amd/display: Fix indenting mistakes in dcn10_hw_sequencer.c

2022-04-07 Thread Alex Deucher
Actually this just causes another warning. Dropped for now. More below. On Thu, Apr 7, 2022 at 11:52 AM Alex Deucher wrote: > > Applied. Thanks! > > Alex > > On Thu, Apr 7, 2022 at 10:18 AM Harry Wentland wrote: > > > > > > > > On 2022-04-07 02:00, Haowen Bai wrote: > > > Smatch reports the f

[PATCH] drm/amdkfd: Cleanup IO links during KFD device removal

2022-04-07 Thread Mukul Joshi
Currently, the IO-links to the device being removed from topology, are not cleared. As a result, there would be dangling links left in the KFD topology. This patch aims to fix the following: 1. Cleanup all IO links to the device being removed. 2. Ensure that node numbering in sysfs and nodes proxim

Re: [PATCH] drm/amd/amdgpu: Only reserve vram for firmware with vega10 Hyper-V host.

2022-04-07 Thread Alex Deucher
On Wed, Apr 6, 2022 at 10:03 AM Yongqiang Sun wrote: > > driver loading failed on VEGA10 SRIOV VF with linux host due to a wide > range of stolen reserved vram. > Since VEGA10 SRIOV VF need to reserve vram for firmware with windows > Hyper_V host specifically, check high part of FB address > to on

RE: [EXTERNAL] Re: Code Review Request for AMDGPU Hotplug Support

2022-04-07 Thread Joshi, Mukul
[AMD Official Use Only] Hi Shuotao, Just sent out the patch to cleanup IO links upon KFD device removal to the public mailing list. Please try it, review it and let us know how it goes for you. Thank you. Regards, Mukul From: Shuotao Xu Sent: Thursday, April 7, 2022 11:09 AM To: Joshi, Mukul

Re: [PATCH] drm/amdgpu: Enable gfxoff quirk on MacBook Pro

2022-04-07 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Apr 6, 2022 at 3:49 PM Tomasz Moń wrote: > > Enabling gfxoff quirk results in perfectly usable graphical user > interface on MacBook Pro (15-inch, 2019) with Radeon Pro Vega 20 4 GB. > > Without the quirk, X server is completely unusable as every few seconds > ther

Re: [EXTERNAL] Re: Code Review Request for AMDGPU Hotplug Support

2022-04-07 Thread Shuotao Xu
Thanks Mukul very much! The code looks neat, although kfd_locked looks still would cause trouble. I will try it. Best, Shuotao From: Joshi, Mukul Date: Friday, April 8, 2022 at 12:23 AM To: Shuotao Xu , Grodzovsky, Andrey , amd-gfx@lists.freedesktop.org Cc: Ziyue Yang , Lei Qu , Peng Cheng

RE: [EXTERNAL] Re: Code Review Request for AMDGPU Hotplug Support

2022-04-07 Thread Joshi, Mukul
[AMD Official Use Only] Thanks Shuotao. If the IO link cleanup works ok for you, you can use this patch as the base for adding your changes to add Hot Plug support. You can send a separate patch for that. Regards, Mukul From: Shuotao Xu Sent: Thursday, April 7, 2022 12:28 PM To: Joshi, Mukul

Re: [PATCH] drm/amdkfd: Cleanup IO links during KFD device removal

2022-04-07 Thread Andrey Grodzovsky
I suggest adding another patch to handle unbalanced decrement of kfd_lock in kgd2kfd_suspend. This patch alone is not enough to fix all removal issues. Andrey On 2022-04-07 12:15, Mukul Joshi wrote: Currently, the IO-links to the device being removed from topology, are not cleared. As a result,

Re: [PATCH] drm/amdgpu: Ensure HDA function is suspended before ASIC reset

2022-04-07 Thread Alex Deucher
On Thu, Apr 7, 2022 at 8:21 AM Kai-Heng Feng wrote: > > DP/HDMI audio on AMD PRO VII stops working after S3: > [ 149.450391] amdgpu :63:00.0: amdgpu: MODE1 reset > [ 149.450395] amdgpu :63:00.0: amdgpu: GPU mode1 reset > [ 149.450494] amdgpu :63:00.0: amdgpu: GPU psp mode1 reset > [

Re: [EXTERNAL] Re: Code Review Request for AMDGPU Hotplug Support

2022-04-07 Thread Shuotao Xu
Thanks Joshi. I will just do that. Will hold onto my current patch based on one in the github PR. Best regards, Shuotao From: Joshi, Mukul Date: Friday, April 8, 2022 at 12:33 AM To: Shuotao Xu , Grodzovsky, Andrey , amd-gfx@lists.freedesktop.org Cc: Ziyue Yang , Lei Qu , Peng Cheng , Ran S

Re: [PATCH] drm/amd/display: cleanup extern usage in function definition

2022-04-07 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Apr 4, 2022 at 11:57 AM Harry Wentland wrote: > > > > On 2022-04-04 11:43, Tom Rix wrote: > > > > On 4/4/22 8:22 AM, Harry Wentland wrote: > >> > >> On 2022-04-03 10:21, Tom Rix wrote: > >>> Smatch reports this issue > >>> hdcp1_execution.c:500:29: warning: functio

Re: [PATCH] drm/amd/display: Fix indenting mistakes in dcn10_hw_sequencer.c

2022-04-07 Thread Harry Wentland
On 2022-04-07 12:07, Alex Deucher wrote: > Actually this just causes another warning. Dropped for now. More below. > > On Thu, Apr 7, 2022 at 11:52 AM Alex Deucher wrote: >> >> Applied. Thanks! >> >> Alex >> >> On Thu, Apr 7, 2022 at 10:18 AM Harry Wentland >> wrote: >>> >>> >>> >>> On 20

Re: [PATCH] drm/amd/display: Fix indenting mistakes in dcn10_hw_sequencer.c

2022-04-07 Thread Alex Deucher
On Thu, Apr 7, 2022 at 1:32 PM Harry Wentland wrote: > > > > On 2022-04-07 12:07, Alex Deucher wrote: > > Actually this just causes another warning. Dropped for now. More below. > > > > On Thu, Apr 7, 2022 at 11:52 AM Alex Deucher wrote: > >> > >> Applied. Thanks! > >> > >> Alex > >> > >> On T

Re: [PATCH] drm/amdgpu: Fix code with incorrect enum type

2022-04-07 Thread Alex Deucher
On Thu, Apr 7, 2022 at 2:21 AM Christian König wrote: > > Am 06.04.22 um 18:50 schrieb Grigory Vasilyev: > > Instead of the 'amdgpu_ring_priority_level' type, > > the 'amdgpu_gfx_pipe_priority' type was used, > > which is an error when setting ring priority. > > This is a minor error, but may caus

RE: [PATCH] drm/amdgpu: Ensure HDA function is suspended before ASIC reset

2022-04-07 Thread Limonciello, Mario
[Public] > -Original Message- > From: Alex Deucher > Sent: Thursday, April 7, 2022 12:08 > To: Kai-Heng Feng > Cc: Deucher, Alexander ; Koenig, Christian > ; Pan, Xinhui ; David > Airlie ; Maling list - DRI developers de...@lists.freedesktop.org>; LKML ; amd- > gfx list ; Chiu, Solomon

[PATCH] drm/amd/amdgpu: Only reserve vram for firmware with vega10 MS_HYPERV host.

2022-04-07 Thread Yongqiang Sun
Fixes: 8011a76ad370 ("drm/amdgpu: Add stolen reserved memory for MI25 SRIOV.") driver loading failed on VEGA10 SRIOV VF with linux host due to a wide range of stolen reserved vram. Since VEGA10 SRIOV VF need to reserve vram for firmware with windows Hyper_V host specifically, check hypervisor type

Re: [PATCH] drm/amdgpu: Fix code with incorrect enum type

2022-04-07 Thread Григорий
Alex Deucher I will do it. Initially, I came across an error that different enum types are used. Now I looked at the files, and indeed AMDGPU_GFX_PIPE_PRIO_* is used instead of AMDGPU_RING_PRIO_*. The question remains whether it is worth increasing the priority to AMDGPU_RING_PRIO_MAX=3 ? Regards,

Re: [PATCH] drm/amd/amdgpu: Only reserve vram for firmware with vega10 MS_HYPERV host.

2022-04-07 Thread Alex Deucher
On Thu, Apr 7, 2022 at 2:35 PM Yongqiang Sun wrote: > > Fixes: 8011a76ad370 > ("drm/amdgpu: Add stolen reserved memory for MI25 SRIOV.") Please put this line between the commit message and your signed-off-by. > > driver loading failed on VEGA10 SRIOV VF with linux host due to a wide > range of s

[PATCH] drm/amd/display: fix 64 bit divide in freesync code

2022-04-07 Thread Alex Deucher
Use do_div() rather than a a 64 bit divide. Fixes: 3fe5739db48843 ("drm/amd/display: Add flip interval workaround") Reported-by: kernel test robot Signed-off-by: Alex Deucher Cc: Angus Wang Cc: Anthony Koo Cc: Aric Cyr --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 5 - 1

[PATCH] drm/radeon: change cayman_default_state table from global to static

2022-04-07 Thread Tom Rix
cayman_default_state and cayman_default_size are only used in ni.c. Single file symbols should be static. So move their definitions to cayman_blit_shaders.h and change their storage-class-specifier to static. Remove unneeded cayman_blit_shader.c cayman_ps/vs definitions were removed with commit

Re: [PATCH] drm/amd/display: fix 64 bit divide in freesync code

2022-04-07 Thread Nathan Chancellor
On Thu, Apr 07, 2022 at 03:50:29PM -0400, Alex Deucher wrote: > Use do_div() rather than a a 64 bit divide. > > Fixes: 3fe5739db48843 ("drm/amd/display: Add flip interval workaround") > Reported-by: kernel test robot > Signed-off-by: Alex Deucher > Cc: Angus Wang > Cc: Anthony Koo > Cc: Aric C

[PATCH 1/1] drm/amdkfd: Handle drain retry fault race with XNACK mode change

2022-04-07 Thread Philip Yang
Application could change XNACK enabled to disabled while KFD is draining stall retry fault, the check for whether to drain retry faults must be before the check for whether xnack_enabled, to avoid report incorrect vm fault after application changes XNACK mode. Signed-off-by: Philip Yang --- driv

[PATCH Review 1/1] drm/amdgpu: print more correctable error info

2022-04-07 Thread Stanley . Yang
Change-Id: I09a2aae85cde3ab2cb6b042b973da6839ad024ec Signed-off-by: Stanley.Yang --- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 62 ++- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v6_7.c b/drivers/gpu/drm/amd/amdgpu/umc_v6_7.

[PATCH 1/1] amdgpu/pm: Clarify Documentation of error handling in send_smc_mesg

2022-04-07 Thread Darren Powell
Contrary to the smu_cmn_send_smc_msg_with_param documentation, two cases exist where messages are silently dropped with no error returned to the caller. These cases occur in unusual situations where either: 1. the caller is a virtual GPU, or 2. a PCI recovery is underway and the HW is not ye

[PATCH] drm/amdkfd: Asynchronously free events

2022-04-07 Thread Felix Kuehling
The synchronize_rcu call in destroy_events can take several ms, which noticeably slows down applications destroying many events. Use kfree_rcu to free the event structure asynchronously and eliminate the synchronize_rcu call in the user thread. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/a

[PATCH] drm/amdkfd: Ignore bogus signals from MEC efficiently

2022-04-07 Thread Felix Kuehling
MEC firmware sometimes sends signal interrupts without a valid context ID on end of pipe events that don't intend to signal any HSA signals. This triggers the slow path in kfd_signal_event_interrupt that scans the entire event page for signaled events. Detect these signals in the top half interrupt

Re: [PATCH 1/1] drm/amdkfd: Handle drain retry fault race with XNACK mode change

2022-04-07 Thread Felix Kuehling
Am 2022-04-07 um 21:21 schrieb Philip Yang: Application could change XNACK enabled to disabled while KFD is draining stall retry fault, the check for whether to drain retry faults must be typo: stall -> stale I think there is also a word missing, linking the two sentences. Maybe "... stale re

RE: [PATCH Review 1/1] drm/amdgpu: print more correctable error info

2022-04-07 Thread Zhou1, Tao
[AMD Official Use Only] > -Original Message- > From: Stanley.Yang > Sent: Friday, April 8, 2022 10:18 AM > To: amd-gfx@lists.freedesktop.org; Zhang, Hawking > ; Zhou1, Tao ; Li, Candice > > Cc: Yang, Stanley > Subject: [PATCH Review 1/1] drm/amdgpu: print more correctable error info >

RE: [PATCH Review 1/1] drm/amdgpu: print more correctable error info

2022-04-07 Thread Zhang, Hawking
We shall consider centralize UMC MCA status check in a helper function, at least, querying IPID, SYND, and MCA_STATUS should be the same for both ue and ce. Regards, Hawking -Original Message- From: Zhou1, Tao Sent: Friday, April 8, 2022 10:59 To: Yang, Stanley ; amd-gfx@lists.freedes

回复: [PATCH Review 1/1] drm/amdgpu: print more correctable error info

2022-04-07 Thread Yang, Stanley
Thanks for your suggestion, it’s better to centralize umc mca status check in a helper function, will update. Regards, Stanley > -邮件原件- > 发件人: Zhang, Hawking > 发送时间: Friday, April 8, 2022 11:11 AM > 收件人: Zhou1, Tao ; Yang, Stanley > ; amd-gfx@lists.freedesktop.org; Li, Candice > > 抄送: Y

[PATCH] drm/amdgpu: Use flexible array member

2022-04-07 Thread Lijo Lazar
Use flexible array member in ip discovery struct as recommended[1]. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +- drivers/gpu/drm/amd/include/discovery.h

Re: [PATCH 1/1] amdgpu/pm: Clarify Documentation of error handling in send_smc_mesg

2022-04-07 Thread Paul Menzel
Dear Darren, Thank you for your patch. Am 08.04.22 um 04:26 schrieb Darren Powell: Contrary to the smu_cmn_send_smc_msg_with_param documentation, two cases exist where messages are silently dropped with no error returned to the caller. These cases occur in unusual situations where either

[PATCH 1/3] drm/debug: Expose connector's max supported bpc via debugfs

2022-04-07 Thread Bhanuprakash Modem
It's useful to know the connector's max supported bpc for IGT testing. Expose it via a debugfs file on the connector "output_bpc". Example: cat /sys/kernel/debug/dri/0/DP-1/output_bpc Cc: Jani Nikula Cc: Ville Syrjälä Cc: Harry Wentland Signed-off-by: Bhanuprakash Modem --- drivers/gpu/drm/d

[PATCH 2/3] drm/i915/display/debug: Expose crtc current bpc via debugfs

2022-04-07 Thread Bhanuprakash Modem
This new debugfs will expose the currently using bpc by crtc. It is very useful for verifying whether we enter the correct output color depth from IGT. This patch will also add the connector's max supported bpc to "i915_display_info" debugfs. Example: cat /sys/kernel/debug/dri/0/crtc-0/i915_curre

[PATCH 0/3] Expose max and current bpc via debugfs

2022-04-07 Thread Bhanuprakash Modem
This series will expose the Connector's max supported bpc via connector debugfs and Crtc's current bpc via crtc debugfs. Also move the existing vendor specific "output_bpc" logic to drm. Test-with: 20220408065143.1485069-2-bhanuprakash.mo...@intel.com Bhanuprakash Modem (3): drm/debug: Expose c

[PATCH 3/3] drm/amd/display: Move connector debugfs to drm

2022-04-07 Thread Bhanuprakash Modem
As drm_connector already have the display_info, instead of creating "output_bpc" debugfs in vendor specific driver, move the logic to the drm layer. This patch will also move "Current" bpc to the crtc debugfs from connector debugfs, since we are getting this info from crtc_state. Cc: Harry Wentla