[PATCH] drm/amdgpu: Fix the warning info when unload or remove amdgpu

2023-02-07 Thread Ma Jun
Checking INVOKE_CMD to fix the below warning info when unload or remove amdgpu driver [ 319.489809] Call Trace: [ 319.489810] [ 319.489812] psp_ta_unload+0x9a/0xd0 [amdgpu] [ 319.489926] ? smu_smc_hw_cleanup+0x2f6/0x360 [amdgpu] [ 319.490072] psp_hw_fini+0xea/0x170 [amdgpu] [

[PATCH] drm/amd/display: fix dm irq error message in gpu recover

2023-02-07 Thread Tianci Yin
From: tiancyin [Why] Variable adev->crtc_irq.num_types was initialized as the value of adev->mode_info.num_crtc at early_init stage, later at hw_init stage, the num_crtc changed due to the display pipe harvest on some SKUs, but the num_types was not updated accordingly, that cause below error in

Re: [PATCH] drm/amd/display: Align num_crtc to max_streams

2023-02-07 Thread Yin, Tianci (Rico)
[AMD Official Use Only - General] Thank you very much Harry and Hamza. You are right, adev->mode_info.num_crtc has already been updated, the variables that really need updating are adev->mode_info.num_crtc, adev->vline0_irq.num_types, adev->vupdate_irq.num_types and

Re: [PATCH] drm/amdkfd: Prevent user space using both svm and kfd api to register same user buffer

2023-02-07 Thread Felix Kuehling
Am 2023-02-07 um 18:36 schrieb Chen, Xiaogang: On 2/7/2023 2:48 PM, Felix Kuehling wrote: Am 2023-02-07 um 15:35 schrieb Xiaogang.Chen: From: Xiaogang Chen When xnack is on user space can use svm page restore to set a vm range without setup it first, then use regular api to register.

Re: [PATCH] drm/amdkfd: Prevent user space using both svm and kfd api to register same user buffer

2023-02-07 Thread Chen, Xiaogang
On 2/7/2023 2:48 PM, Felix Kuehling wrote: Am 2023-02-07 um 15:35 schrieb Xiaogang.Chen: From: Xiaogang Chen When xnack is on user space can use svm page restore to set a vm range without setup it first, then use regular api to register. Currently kfd api and svm are not interoperable.

[PATCH] drm/amd/display: fix glitches on hw rotation without pipe split

2023-02-07 Thread Melissa Wen
Fix glitches when moving cursor close to the edge on a rotated screen for drivers with one pipe (without pipe split) by halving dst_x_offset. Reported-by: Xaver Hugl Signed-off-by: Melissa Wen --- Hi, I'm not sure if having dst_x_offset (or only for the one pipe case) is the right solution,

Re: gpu_metrics does not provide 'current_gfxclk', 'current_uclk', 'average_cpu_power' & 'temperature_core' on AMD Ryzen 7000 CPU

2023-02-07 Thread sfrcorne
Dear Alex, If current_gfxclk is not supported for my CPU, then using average_gfxclk_frequency instead is indeed the best solution in my opinion. I will try to get a fix merged for my CPU in Mangohud. On a side note: you mentioned that unsupported fields would be 0 but I don't think this is

Re: [PATCH] drm/amdkfd: Prevent user space using both svm and kfd api to register same user buffer

2023-02-07 Thread Felix Kuehling
Am 2023-02-07 um 15:35 schrieb Xiaogang.Chen: From: Xiaogang Chen When xnack is on user space can use svm page restore to set a vm range without setup it first, then use regular api to register. Currently kfd api and svm are not interoperable. We already have check on that, but for user

[PATCH] drm/amdkfd: Prevent user space using both svm and kfd api to register same user buffer

2023-02-07 Thread Xiaogang . Chen
From: Xiaogang Chen When xnack is on user space can use svm page restore to set a vm range without setup it first, then use regular api to register. Currently kfd api and svm are not interoperable. We already have check on that, but for user buffer the mapping address is not same as buffer cpu

Re: [PATCH 4/8] drm/amdgpu: Add V11 graphics MQD functions

2023-02-07 Thread Alex Deucher
On Tue, Feb 7, 2023 at 1:28 PM Shashank Sharma wrote: > > > On 07/02/2023 18:57, Alex Deucher wrote: > > On Tue, Feb 7, 2023 at 12:14 PM Shashank Sharma > > wrote: > >> > >> On 07/02/2023 17:54, Alex Deucher wrote: > >>> On Tue, Feb 7, 2023 at 11:37 AM Shashank Sharma > >>> wrote: > On

Re: [PATCH 4/8] drm/amdgpu: Add V11 graphics MQD functions

2023-02-07 Thread Shashank Sharma
On 07/02/2023 18:57, Alex Deucher wrote: On Tue, Feb 7, 2023 at 12:14 PM Shashank Sharma wrote: On 07/02/2023 17:54, Alex Deucher wrote: On Tue, Feb 7, 2023 at 11:37 AM Shashank Sharma wrote: On 07/02/2023 17:05, Alex Deucher wrote: On Tue, Feb 7, 2023 at 10:43 AM Shashank Sharma

[linux-next:master] BUILD REGRESSION 49a8133221c71b935f36a7c340c0271c2a9ee2db

2023-02-07 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 49a8133221c71b935f36a7c340c0271c2a9ee2db Add linux-next specific files for 20230207 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202301230743.xnut0zvc-...@intel.com https

Re: [PATCH 4/8] drm/amdgpu: Add V11 graphics MQD functions

2023-02-07 Thread Alex Deucher
On Tue, Feb 7, 2023 at 12:14 PM Shashank Sharma wrote: > > > On 07/02/2023 17:54, Alex Deucher wrote: > > On Tue, Feb 7, 2023 at 11:37 AM Shashank Sharma > > wrote: > >> > >> On 07/02/2023 17:05, Alex Deucher wrote: > >>> On Tue, Feb 7, 2023 at 10:43 AM Shashank Sharma > >>> wrote: > On

Re: [PATCH 4/8] drm/amdgpu: Add V11 graphics MQD functions

2023-02-07 Thread Shashank Sharma
On 07/02/2023 17:54, Alex Deucher wrote: On Tue, Feb 7, 2023 at 11:37 AM Shashank Sharma wrote: On 07/02/2023 17:05, Alex Deucher wrote: On Tue, Feb 7, 2023 at 10:43 AM Shashank Sharma wrote: On 07/02/2023 16:17, Alex Deucher wrote: On Fri, Feb 3, 2023 at 4:55 PM Shashank Sharma wrote:

Re: [PATCH 4/8] drm/amdgpu: Add V11 graphics MQD functions

2023-02-07 Thread Alex Deucher
On Tue, Feb 7, 2023 at 11:37 AM Shashank Sharma wrote: > > > On 07/02/2023 17:05, Alex Deucher wrote: > > On Tue, Feb 7, 2023 at 10:43 AM Shashank Sharma > > wrote: > >> > >> On 07/02/2023 16:17, Alex Deucher wrote: > >>> On Fri, Feb 3, 2023 at 4:55 PM Shashank Sharma > >>> wrote: >

Re: [PATCH 5/8] drm/amdgpu: Create context for usermode queue

2023-02-07 Thread Alex Deucher
On Tue, Feb 7, 2023 at 11:51 AM Alex Deucher wrote: > > On Fri, Feb 3, 2023 at 4:54 PM Shashank Sharma > wrote: > > > > The FW expects us to allocate atleast one page as context space to > > process gang, process, shadow, GDS and FW_space related work. This > > patch creates some object for the

Re: [PATCH 5/8] drm/amdgpu: Create context for usermode queue

2023-02-07 Thread Alex Deucher
On Fri, Feb 3, 2023 at 4:54 PM Shashank Sharma wrote: > > The FW expects us to allocate atleast one page as context space to > process gang, process, shadow, GDS and FW_space related work. This > patch creates some object for the same, and adds an IP specific > functions to do this. > > Cc: Alex

Re: [PATCH 4/8] drm/amdgpu: Add V11 graphics MQD functions

2023-02-07 Thread Shashank Sharma
On 07/02/2023 17:05, Alex Deucher wrote: On Tue, Feb 7, 2023 at 10:43 AM Shashank Sharma wrote: On 07/02/2023 16:17, Alex Deucher wrote: On Fri, Feb 3, 2023 at 4:55 PM Shashank Sharma wrote: From: Shashank Sharma MQD describes the properies of a user queue to the HW, and allows it to

Re: [PATCH] drm/amd/display: Align num_crtc to max_streams

2023-02-07 Thread Harry Wentland
On 2/7/23 09:41, Hamza Mahfooz wrote: > > On 2/7/23 09:31, Harry Wentland wrote: >> >> >> On 2/7/23 08:00, Hamza Mahfooz wrote: >>> >>> On 2/6/23 23:05, Tianci Yin wrote: From: tiancyin [Why] Display pipe might be harvested on some SKUs, that cause the

Re: [PATCH 4/8] drm/amdgpu: Add V11 graphics MQD functions

2023-02-07 Thread Alex Deucher
On Tue, Feb 7, 2023 at 10:43 AM Shashank Sharma wrote: > > > On 07/02/2023 16:17, Alex Deucher wrote: > > On Fri, Feb 3, 2023 at 4:55 PM Shashank Sharma > > wrote: > >> From: Shashank Sharma > >> > >> MQD describes the properies of a user queue to the HW, and allows it to > >> accurately

Re: [PATCH 4/8] drm/amdgpu: Add V11 graphics MQD functions

2023-02-07 Thread Shashank Sharma
On 07/02/2023 16:17, Alex Deucher wrote: On Fri, Feb 3, 2023 at 4:55 PM Shashank Sharma wrote: From: Shashank Sharma MQD describes the properies of a user queue to the HW, and allows it to accurately configure the queue while mapping it in GPU HW. This patch adds: - A new header file which

Re: [PATCH 4/8] drm/amdgpu: Add V11 graphics MQD functions

2023-02-07 Thread Alex Deucher
On Fri, Feb 3, 2023 at 4:55 PM Shashank Sharma wrote: > > From: Shashank Sharma > > MQD describes the properies of a user queue to the HW, and allows it to > accurately configure the queue while mapping it in GPU HW. This patch > adds: > - A new header file which contains the userqueue MQD

Re: [PATCH 2/8] drm/amdgpu: add usermode queues

2023-02-07 Thread Shashank Sharma
On 07/02/2023 15:54, Alex Deucher wrote: On Fri, Feb 3, 2023 at 4:54 PM Shashank Sharma wrote: From: Shashank Sharma This patch adds skeleton code for usermode queue creation. It typically contains: - A new structure to keep all the user queue data in one place. - An IOCTL function to

Re: [PATCH 3/8] drm/amdgpu: introduce userqueue MQD handlers

2023-02-07 Thread Alex Deucher
On Fri, Feb 3, 2023 at 4:54 PM Shashank Sharma wrote: > > From: Shashank Sharma > > A Memory queue descriptor (MQD) of a userqueue defines it in the harware's > context. As the method of formation of a MQD, and its format can vary between > different graphics IPs, we need gfx GEN specific

Re: [RFC PATCH] drm: Create documentation about device resets

2023-02-07 Thread Michel Dänzer
On 2/7/23 14:30, Pekka Paalanen wrote: > On Mon, 23 Jan 2023 21:38:11 +0100 > Christian König wrote: >> Am 23.01.23 um 21:26 schrieb André Almeida: >>> >>> diff --git a/Documentation/gpu/drm-reset.rst >>> b/Documentation/gpu/drm-reset.rst >>> new file mode 100644 >>> index

Re: [PATCH 2/8] drm/amdgpu: add usermode queues

2023-02-07 Thread Alex Deucher
On Fri, Feb 3, 2023 at 4:54 PM Shashank Sharma wrote: > > From: Shashank Sharma > > This patch adds skeleton code for usermode queue creation. It > typically contains: > - A new structure to keep all the user queue data in one place. > - An IOCTL function to create/free a usermode queue. > - A

Re: [PATCH] drm/amd/display: Align num_crtc to max_streams

2023-02-07 Thread Hamza Mahfooz
On 2/7/23 09:31, Harry Wentland wrote: On 2/7/23 08:00, Hamza Mahfooz wrote: On 2/6/23 23:05, Tianci Yin wrote: From: tiancyin [Why] Display pipe might be harvested on some SKUs, that cause the adev->mode_info.num_crtc mismatch with the usable crtc number, then below error dmesgs

Re: [PATCH 1/8] drm/amdgpu: UAPI for user queue management

2023-02-07 Thread Shashank Sharma
On 07/02/2023 15:20, Alex Deucher wrote: On Tue, Feb 7, 2023 at 9:19 AM Christian König wrote: Am 07.02.23 um 15:17 schrieb Alex Deucher: On Tue, Feb 7, 2023 at 9:11 AM Christian König wrote: Am 07.02.23 um 15:07 schrieb Alex Deucher: On Tue, Feb 7, 2023 at 2:38 AM Shashank Sharma

Re: [PATCH] drm/amd/display: Align num_crtc to max_streams

2023-02-07 Thread Harry Wentland
On 2/7/23 08:00, Hamza Mahfooz wrote: > > On 2/6/23 23:05, Tianci Yin wrote: >> From: tiancyin >> >> [Why] >> Display pipe might be harvested on some SKUs, that cause the >> adev->mode_info.num_crtc mismatch with the usable crtc number, >> then below error dmesgs observed after GPU recover.

Re: [PATCH] drm/amdgpu: Use the TGID for trace_amdgpu_vm_update_ptes

2023-02-07 Thread Alex Deucher
I'll add the stable CC. Thanks, Alex On Tue, Feb 7, 2023 at 2:34 AM Christian König wrote: > > That sounds like a good idea to me as well. > > If you think that a patch should be backported please add a "CC: > sta...@vger.kernel.org" tag to it before sending it out. > > We can always remove it

Re: [PATCH 1/8] drm/amdgpu: UAPI for user queue management

2023-02-07 Thread Alex Deucher
On Tue, Feb 7, 2023 at 9:19 AM Christian König wrote: > > Am 07.02.23 um 15:17 schrieb Alex Deucher: > > On Tue, Feb 7, 2023 at 9:11 AM Christian König > > wrote: > >> Am 07.02.23 um 15:07 schrieb Alex Deucher: > >>> On Tue, Feb 7, 2023 at 2:38 AM Shashank Sharma > >>> wrote: > On

Re: [PATCH 1/8] drm/amdgpu: UAPI for user queue management

2023-02-07 Thread Christian König
Am 07.02.23 um 15:17 schrieb Alex Deucher: On Tue, Feb 7, 2023 at 9:11 AM Christian König wrote: Am 07.02.23 um 15:07 schrieb Alex Deucher: On Tue, Feb 7, 2023 at 2:38 AM Shashank Sharma wrote: On 07/02/2023 08:03, Christian König wrote: Am 06.02.23 um 22:03 schrieb Alex Deucher: On Mon,

Re: [PATCH 1/8] drm/amdgpu: UAPI for user queue management

2023-02-07 Thread Alex Deucher
On Tue, Feb 7, 2023 at 9:11 AM Christian König wrote: > > Am 07.02.23 um 15:07 schrieb Alex Deucher: > > On Tue, Feb 7, 2023 at 2:38 AM Shashank Sharma > > wrote: > >> > >> On 07/02/2023 08:03, Christian König wrote: > >>> Am 06.02.23 um 22:03 schrieb Alex Deucher: > On Mon, Feb 6, 2023 at

Re: [PATCH 1/2] drm/amdgpu: Fix incorrect filenames in sysfs comments

2023-02-07 Thread Christian König
Am 06.02.23 um 18:25 schrieb kent.russ...@amd.com: This looks like a standard copy/paste mistake. Replace the incorrect serial_number references with product_name and product_model Signed-off-by: kent.russ...@amd.com Reviewed-by: Christian König for the series. ---

Re: Indexing of FeatureCtrlMask for SMU13 OverDrive

2023-02-07 Thread Alex Deucher
On Mon, Feb 6, 2023 at 11:36 PM Alex Deucher wrote: > > On Mon, Feb 6, 2023 at 8:17 PM Matt Coffin wrote: > > > > Hello again, > > > > I've been working on OverDrive support for smu13, as you probably > > already know. In that endeavor, it also contains the following: > > > > 1. I've come up

Re: [PATCH 1/8] drm/amdgpu: UAPI for user queue management

2023-02-07 Thread Christian König
Am 07.02.23 um 15:07 schrieb Alex Deucher: On Tue, Feb 7, 2023 at 2:38 AM Shashank Sharma wrote: On 07/02/2023 08:03, Christian König wrote: Am 06.02.23 um 22:03 schrieb Alex Deucher: On Mon, Feb 6, 2023 at 12:01 PM Christian König wrote: Am 06.02.23 um 17:56 schrieb Alex Deucher: On

Re: [PATCH 1/8] drm/amdgpu: UAPI for user queue management

2023-02-07 Thread Alex Deucher
On Tue, Feb 7, 2023 at 2:38 AM Shashank Sharma wrote: > > > On 07/02/2023 08:03, Christian König wrote: > > Am 06.02.23 um 22:03 schrieb Alex Deucher: > >> On Mon, Feb 6, 2023 at 12:01 PM Christian König > >> wrote: > >>> Am 06.02.23 um 17:56 schrieb Alex Deucher: > On Fri, Feb 3, 2023 at

Re: [PATCH 1/5] drm/amd/display: disable S/G display on DCN 2.1.0

2023-02-07 Thread Christian König
If it's not already committed Reviewed-by: Christian König . Sorry for the vacation delay, I'm still catching up on mails. Christian. Am 31.01.23 um 19:13 schrieb Alex Deucher: Causes flickering or white screens in some configurations. Disable it for now until we can fix the issue. Bug:

Re: [RFC PATCH] drm: Create documentation about device resets

2023-02-07 Thread Pekka Paalanen
On Mon, 23 Jan 2023 21:38:11 +0100 Christian König wrote: > Am 23.01.23 um 21:26 schrieb André Almeida: > > Create a document that specifies how to deal with DRM device resets for > > kernel and userspace drivers. > > > > Signed-off-by: André Almeida > > --- > >

Re: [PATCH] drm/amd/display: Align num_crtc to max_streams

2023-02-07 Thread Hamza Mahfooz
On 2/6/23 23:05, Tianci Yin wrote: From: tiancyin [Why] Display pipe might be harvested on some SKUs, that cause the adev->mode_info.num_crtc mismatch with the usable crtc number, then below error dmesgs observed after GPU recover. *ERROR* amdgpu_dm_set_crtc_irq_state: crtc is NULL at id

Re: [PATCH v2 00/21] Enable Colorspace connector property in amdgpu

2023-02-07 Thread Pekka Paalanen
On Fri, 13 Jan 2023 11:24:07 -0500 Harry Wentland wrote: > This patchset enables the DP and HDMI infoframe properties > in amdgpu. > > The first two patches are not completely related to the rest. The > first patch allows for HDR_OUTPUT_METADATA with EOTFs that are > unknown in the kernel. > >

Re: [PATCH v2 18/21] drm/amd/display: Fallback to 2020_YCBCR if the pixel encoding is not RGB

2023-02-07 Thread Pekka Paalanen
On Wed, 25 Jan 2023 12:59:53 + Joshua Ashton wrote: > On 1/23/23 20:30, Sebastian Wick wrote: > > A new property to control YCC and subsampling would be the more > > complete path here. If we actually want to fix this in the short-term > > though, we should handle the YCC and RGB Colorspace

Re: [PATCH 5/8] drm/amdgpu: Create context for usermode queue

2023-02-07 Thread Shashank Sharma
On 07/02/2023 08:55, Christian König wrote: Am 07.02.23 um 08:51 schrieb Shashank Sharma: On 07/02/2023 08:14, Christian König wrote: Am 03.02.23 um 22:54 schrieb Shashank Sharma: The FW expects us to allocate atleast one page as context space to process gang, process, shadow, GDS and