Re: [PATCH v2 4/9] drm/amdgpu: create GFX-gen11 MQD for userqueue

2023-02-16 Thread Shashank Sharma
On 16/02/2023 08:31, Christian König wrote: Am 15.02.23 um 19:43 schrieb Shashank Sharma: From: Shashank Sharma A Memory queue descriptor (MQD) of a userqueue defines it in the harware's context. As MQD format can vary between different graphics IPs, we need gfx GEN specific handlers to

[PATCH] drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini()

2023-02-16 Thread Thomas Zimmermann
Move drm_fb_helper_unprepare() from drm_fb_helper_fini() into the calling fbdev implementation. Avoids a possible stale mutex with generic fbdev code. As indicated by its name, drm_fb_helper_prepare() prepares struct drm_fb_helper before setting up the fbdev support with a call to

Re: [RFC] drm/amd/display: Pass proper parent for DM backlight device registration

2023-02-16 Thread Alex Deucher
On Wed, Feb 15, 2023 at 6:38 AM Hans de Goede wrote: > > The parent for the backlight device should be the drm-connector object, > not the PCI device. > > Userspace relies on this to be able to detect which backlight class device > to use on hybrid gfx devices where there may be multiple native

Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-02-16 Thread Daniel Vetter
On Tue, Jan 17, 2023 at 04:06:05AM +0300, Dmitry Osipenko wrote: > 16.01.2023 18:11, Christian König пишет: > > > > > >> mmapping the memory with that new offset should still work. The > >> imported BO is created with ttm_bo_type_sg, and AFAICT ttm_bo_vm.c > >> supports mapping of

Re: [PATCH v2 7/8] drm/amdgpu: create doorbell kernel object

2023-02-16 Thread Shashank Sharma
On 14/02/2023 20:26, Shashank Sharma wrote: On 14/02/2023 19:35, Christian König wrote: Am 14.02.23 um 17:15 schrieb Shashank Sharma: From: Shashank Sharma This patch does the following: - Initializes TTM range management for domain DOORBELL. - Introduces a kernel bo for doorbell

[PATCHv2] drm/amdgpu: register a vga_switcheroo client for MacBooks with apple-gmux

2023-02-16 Thread Orlando Chamberlain
Commit 3840c5bcc245 ("drm/amdgpu: disentangle runtime pm and vga_switcheroo") made amdgpu only register a vga_switcheroo client for GPU's with PX, however AMD GPUs in dual gpu Apple Macbooks do need to register, but don't have PX. Instead of AMD's PX, they use apple-gmux. Use apple_gmux_detect()

RE: [PATCH] drm/amdgpu: don't increase UMC RAS UE count if no new bad page

2023-02-16 Thread Yang, Stanley
[AMD Official Use Only - General] > -Original Message- > From: Zhou1, Tao > Sent: Thursday, February 16, 2023 3:58 PM > To: amd-gfx@lists.freedesktop.org; Zhang, Hawking > ; Yang, Stanley ; Chai, > Thomas ; Li, Candice ; Lazar, > Lijo > Cc: Zhou1, Tao > Subject: [PATCH] drm/amdgpu:

Re: [PATCH v2 3/9] drm/amdgpu: add new IOCTL for usermode queue

2023-02-16 Thread Shashank Sharma
Hey Christian, On 16/02/2023 08:23, Christian König wrote: Am 15.02.23 um 19:43 schrieb Shashank Sharma: From: Shashank Sharma This patch adds: - A new IOCTL function to create and destroy - A new structure to keep all the user queue data in one place. - A function to generate unique index

[PATCH] drm/amd: use drm_kms_helper_poll_fini in amdgpu_device_suspend to avoid warning

2023-02-16 Thread Bert Karwatzki
When drm_kms_helper_poll_disable is used in amdgpu_device_suspend without drm_kms_helper_poll_init having been called it causes a warning in __flush_work: https://gitlab.freedesktop.org/drm/amd/-/issues/2411 To avoid this one can use drm_kms_helper_poll_fini instead: >From

Re: [PATCHv2] drm/amdgpu: register a vga_switcheroo client for MacBooks with apple-gmux

2023-02-16 Thread Alex Deucher
On Thu, Feb 16, 2023 at 8:45 AM Orlando Chamberlain wrote: > > Commit 3840c5bcc245 ("drm/amdgpu: disentangle runtime pm and > vga_switcheroo") made amdgpu only register a vga_switcheroo client for > GPU's with PX, however AMD GPUs in dual gpu Apple Macbooks do need to > register, but don't have

Re: [regression, bisected, pci/iommu] Bug 216865 - Black screen when amdgpu started during 6.2-rc1 boot with AMD IOMMU enabled

2023-02-16 Thread Felix Kuehling
[+Suravee] Am 2023-02-16 um 00:37 schrieb Vasant Hegde: Hi Jason, On 2/16/2023 6:14 AM, Jason Gunthorpe wrote: On Wed, Feb 15, 2023 at 07:35:45PM -0500, Felix Kuehling wrote: If I understand this correctly, the HW or the BIOS is doing something wrong about reporting ACS. I don't know what

[linux-next:master] BUILD REGRESSION 509583475828c4fd86897113f78315c1431edcc3

2023-02-16 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 509583475828c4fd86897113f78315c1431edcc3 Add linux-next specific files for 20230216 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202302061911.c7xvhx9v-...@intel.com https

Re: [regression, bisected, pci/iommu] Bug 216865 - Black screen when amdgpu started during 6.2-rc1 boot with AMD IOMMU enabled

2023-02-16 Thread Felix Kuehling
[+Suravee] Am 2023-02-15 um 19:44 schrieb Jason Gunthorpe: On Wed, Feb 15, 2023 at 07:35:45PM -0500, Felix Kuehling wrote: If I understand this correctly, the HW or the BIOS is doing something wrong about reporting ACS. I don't know what the GPU driver can do other than add some quirk to stop

[bug report] drm/amd/display: break down dc_link.c

2023-02-16 Thread Dan Carpenter
Hello Wenjing Liu, This is a semi-automatic email about new static checker warnings. The patch 5461d1ea: "drm/amd/display: break down dc_link.c" from Jan 18, 2023, leads to the following Smatch complaint: drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c:365

Re: [PATCH v2 20/20] jump_label: RFC - tolerate toggled state

2023-02-16 Thread Jason Baron
On 1/17/23 6:57 AM, Peter Zijlstra wrote: On Fri, Jan 13, 2023 at 12:30:16PM -0700, Jim Cromie wrote: __jump_label_patch currently will "crash the box" if it finds a jump_entry not as expected. ISTM this overly harsh; it doesn't distinguish between "alternate/opposite" state, and truly

Re: [PATCH] drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini()

2023-02-16 Thread Daniel Vetter
On Thu, Feb 16, 2023 at 03:06:20PM +0100, Thomas Zimmermann wrote: > Move drm_fb_helper_unprepare() from drm_fb_helper_fini() into the > calling fbdev implementation. Avoids a possible stale mutex with > generic fbdev code. > > As indicated by its name, drm_fb_helper_prepare() prepares struct >

Re: [PATCH 2/3] drm/connector: Add enum documentation to drm_colorspace

2023-02-16 Thread Harry Wentland
On 2/8/23 03:56, Pekka Paalanen wrote: > On Fri, 3 Feb 2023 02:07:43 + > Joshua Ashton wrote: > >> To match the other enums, and add more information about these values. >> >> Signed-off-by: Joshua Ashton >> >> Cc: Pekka Paalanen >> Cc: Sebastian Wick >> Cc: vitaly.pros...@amd.com >>

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

2023-02-16 Thread Alex Deucher
On Wed, Feb 15, 2023 at 1:44 PM Shashank Sharma wrote: > > From: Alex Deucher > > This patch intorduces new UAPI/IOCTL for usermode graphics > queue. The userspace app will fill this structure and request > the graphics driver to add a graphics work queue for it. The > output of this UAPI is a

Re: [regression, bisected, pci/iommu] Bug 216865 - Black screen when amdgpu started during 6.2-rc1 boot with AMD IOMMU enabled

2023-02-16 Thread Felix Kuehling
Feb 16 13:22:32 kernel: kfd kfd: amdgpu: Failed to resume IOMMU for device 1002:9874 Feb 16 13:22:32 kernel: kfd kfd: amdgpu: device 1002:9874 NOT added due to errors This look like IOMMU device initialization still fails (but more gracefully now). Vasant, is that expected? This would lead

Re: [PATCH 03/32] drm/amdkfd: prepare per-process debug enable and disable

2023-02-16 Thread Felix Kuehling
On 2023-01-25 14:53, Jonathan Kim wrote: The ROCm debugger will attach to a process to debug by PTRACE and will expect the KFD to prepare a process for the target PID, whether the target PID has opened the KFD device or not. This patch is to explicity handle this requirement. Further HW mode

Re: [PATCH 01/32] drm/amdkfd: add debug and runtime enable interface

2023-02-16 Thread Felix Kuehling
On 2023-01-25 14:53, Jonathan Kim wrote: Introduce the GPU debug operations interface. For ROCm-GDB to extend the GNU Debugger's ability to inspect the AMD GPU instruction set, provide the necessary interface to allow the debugger to HW debug-mode set and query exceptions per HSA queue,

Re: [PATCH 02/32] drm/amdkfd: display debug capabilities

2023-02-16 Thread Felix Kuehling
On 2023-01-25 14:53, Jonathan Kim wrote: Expose debug capabilities in the KFD topology node's HSA capabilities and debug properties flags. Ensure correct capabilities are exposed based on firmware support. Flag definitions can be referenced in uapi/linux/kfd_sysfs.h. v2: v1 was reviewed but

Re: [PATCH 09/32] drm/amdgpu: add gfx9.4.2 hw debug mode enable and disable calls

2023-02-16 Thread Felix Kuehling
On 2023-01-25 14:53, Jonathan Kim wrote: GFX9.4.2 now supports per-VMID debug mode controls registers (SPI_GDBG_PER_VMID_CNTL). Because the KFD lets the HWS handle PASID-VMID mapping, the KFD will forward all debug mode setting register writes to the HWS scheduler using a new MAP_PROCESS API,

Re: [PATCH 07/32] drm/amdgpu: add gfx9.4.1 hw debug mode enable and disable calls

2023-02-16 Thread Felix Kuehling
On 2023-01-25 14:53, Jonathan Kim wrote: On GFX9.4.1, the implicit wait count instruction on s_barrier is disabled by default in the driver during normal operation for performance requirements. There is a hardware bug in GFX9.4.1 where if the implicit wait count instruction after an s_barrier

Re: [PATCH 08/32] drm/amdgpu: add gfx10 hw debug mode enable and disable calls

2023-02-16 Thread Felix Kuehling
On 2023-01-25 14:53, Jonathan Kim wrote: Similar to GFX9 debug devices, set the hardware debug mode by draining the SPI appropriately prior the mode setting request. Because GFX10 has waves allocated by the work group boundaray and each Typo: boundary? SE's SPI instances do not

Re: [PATCH 10/32] drm/amdgpu: add gfx11 hw debug mode enable and disable calls

2023-02-16 Thread Felix Kuehling
On 2023-01-25 14:53, Jonathan Kim wrote: Implement the per-device calls to enable or disable HW debug mode for GFX11. Signed-off-by: Jonathan Kim --- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c| 39 +++ 1 file changed, 39 insertions(+) diff --git

Re: [PATCH 06/32] drm/amdgpu: add gfx9 hw debug mode enable and disable calls

2023-02-16 Thread Felix Kuehling
On 2023-01-25 14:53, Jonathan Kim wrote: Implement the per-device calls to enable or disable HW debug mode for GFX9 prior to GFX9.4.1. GFX9.4.1 and onward will require their own enable/disable sequence as follow on patches. When hardware debug mode setting is requested, waves will inherit

Re: [PATCH 05/32] drm/amdgpu: setup hw debug registers on driver initialization

2023-02-16 Thread Felix Kuehling
On 2023-01-25 14:53, Jonathan Kim wrote: Add missing debug trap registers references and initialize all debug registers on boot by clearing the hardware exception overrides and the wave allocation ID index. The debugger requires that TTMPs 6 & 7 save the dispatch ID to map waves onto dispatch

[PATCH]: add tmz support for GC 10.3.6

2023-02-16 Thread Zhang, Jesse(Jie)
[AMD Official Use Only - General] drm/amdgpu: add tmz support for GC 10.3.6 this patch to add tmz support for GC 10.3.6 Signed-off-by: Jesse Zhang jesse.zh...@amd.com diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c

Re: [bug][vaapi][h264] The commit 7cbe08a930a132d84b4cf79953b00b074ec7a2a7 on certain video files leads to problems with VAAPI hardware decoding.

2023-02-16 Thread Mikhail Gavrilov
On Fri, Dec 9, 2022 at 7:37 PM Leo Liu wrote: > > Please try the latest AMDGPU driver: > > https://gitlab.freedesktop.org/agd5f/linux/-/commits/amd-staging-drm-next/ > Sorry Leo, I miss your message. This issue is still actual for 6.2-rc8. In my first message I was mistaken. > Before kernel

RE: [PATCH 1/2] drm/amdgpu: optimize VRAM allocation when using drm buddy

2023-02-16 Thread Xiao, Shane
> -Original Message- > From: Paneer Selvam, Arunpravin > Sent: Thursday, February 16, 2023 3:24 PM > To: Koenig, Christian ; Xiao, Shane > ; Kuehling, Felix ; > Christian König > Cc: amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH 1/2] drm/amdgpu: optimize VRAM allocation when

[PATCH 1/2] drm/amdgpu: add umc retire unit element

2023-02-16 Thread Tao Zhou
It records how many bad pages are retired in one uncorrectable error. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h | 2 ++ drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 +++ 4

[PATCH 2/2] drm/amdgpu: exclude duplicate pages from UMC RAS UE count

2023-02-16 Thread Tao Zhou
If a UMC bad page is reserved but not freed by an application, the application may trigger uncorrectable error repeatly by accessing the page. v2: add specific function to do the check. v3: remove duplicate pages, calculate new added bad page number. Signed-off-by: Tao Zhou ---

Re: [regression, bisected, pci/iommu] Bug 216865 - Black screen when amdgpu started during 6.2-rc1 boot with AMD IOMMU enabled

2023-02-16 Thread Vasant Hegde
Matt, Thanks a lot for testing and the dmesg log. On 2/17/2023 12:29 AM, Matt Fagnani wrote: > Vasant, > > I applied your four patches to 6.2-rc8 and built that. The black screen, null > pointer dereference, and warnings didn't happen when booting 6.2-rc8 with your > patches. There were errors

Re: [regression, bisected, pci/iommu] Bug 216865 - Black screen when amdgpu started during 6.2-rc1 boot with AMD IOMMU enabled

2023-02-16 Thread Vasant Hegde
Hi Felix, On 2/17/2023 1:29 AM, Felix Kuehling wrote: >> Feb 16 13:22:32 kernel: kfd kfd: amdgpu: Failed to resume IOMMU for device >> 1002:9874 >> Feb 16 13:22:32 kernel: kfd kfd: amdgpu: device 1002:9874 NOT added due to >> errors > This look like IOMMU device initialization still fails (but

RE: [PATCH 2/2] drm/amdgpu: exclude duplicate pages from UMC RAS UE count

2023-02-16 Thread Yang, Stanley
[AMD Official Use Only - General] > -Original Message- > From: Zhou1, Tao > Sent: Friday, February 17, 2023 11:53 AM > To: amd-gfx@lists.freedesktop.org; Zhang, Hawking > ; Yang, Stanley ; Chai, > Thomas ; Li, Candice ; Lazar, > Lijo > Cc: Zhou1, Tao > Subject: [PATCH 2/2]