Re: [PATCH] drm/radeon: Fix screen corruption (v2)

2022-12-15 Thread Robin Murphy
Robin Murphy: On 2022-12-14 22:02, Alex Deucher wrote: On Wed, Dec 14, 2022 at 4:54 PM Robin Murphy wrote: On 2022-12-12 02:08, Luben Tuikov wrote: Fix screen corruption on older 32-bit systems using AGP chips. On older systems with little memory, for instance 1.5 GiB, using an AGP chip, the

Re: [PATCH] drm/radeon: Fix screen corruption (v2)

2022-12-14 Thread Robin Murphy
On 2022-12-14 22:02, Alex Deucher wrote: On Wed, Dec 14, 2022 at 4:54 PM Robin Murphy wrote: On 2022-12-12 02:08, Luben Tuikov wrote: Fix screen corruption on older 32-bit systems using AGP chips. On older systems with little memory, for instance 1.5 GiB, using an AGP chip, the device'

Re: [PATCH] drm/radeon: Fix screen corruption (v2)

2022-12-14 Thread Robin Murphy
nks, Robin. Partially reverts commit 33b3ad3788aba846fc8b9a065fe2685a0b64f713. v2: Amend the commit description. Cc: Mikhail Krylov Cc: Alex Deucher Cc: Robin Murphy Cc: Direct Rendering Infrastructure - Development Cc: AMD Graphics Fixes: 33b3ad3788aba8 ("drm/radeon: handle PCI

Re: Screen corruption using radeon kernel driver

2022-12-01 Thread Robin Murphy
On 2022-11-30 19:59, Mikhail Krylov wrote: On Wed, Nov 30, 2022 at 11:07:32AM -0500, Alex Deucher wrote: On Wed, Nov 30, 2022 at 10:42 AM Robin Murphy wrote: On 2022-11-30 14:28, Alex Deucher wrote: On Wed, Nov 30, 2022 at 7:54 AM Robin Murphy wrote: On 2022-11-29 17:11, Mikhail Krylov

Re: Screen corruption using radeon kernel driver

2022-11-30 Thread Robin Murphy
On 2022-11-30 14:28, Alex Deucher wrote: On Wed, Nov 30, 2022 at 7:54 AM Robin Murphy wrote: On 2022-11-29 17:11, Mikhail Krylov wrote: On Tue, Nov 29, 2022 at 11:05:28AM -0500, Alex Deucher wrote: On Tue, Nov 29, 2022 at 10:59 AM Mikhail Krylov wrote: On Tue, Nov 29, 2022 at 09:44:19AM

Re: Screen corruption using radeon kernel driver

2022-11-30 Thread Robin Murphy
On 2022-11-29 17:11, Mikhail Krylov wrote: On Tue, Nov 29, 2022 at 11:05:28AM -0500, Alex Deucher wrote: On Tue, Nov 29, 2022 at 10:59 AM Mikhail Krylov wrote: On Tue, Nov 29, 2022 at 09:44:19AM -0500, Alex Deucher wrote: On Mon, Nov 28, 2022 at 3:48 PM Mikhail Krylov wrote: On Mon, Nov 2

Re: [PATCH] drm/amdgpu: fix repeated words in comments

2022-09-07 Thread Robin Murphy
On 2022-09-07 12:34, Jilin Yuan wrote: Delete the redundant word 'and'. Delete the redundant word 'in'. Delete the redundant word 'the'. Delete the redundant word 'are'. Signed-off-by: Jilin Yuan --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 de

Re: [PATCH] drm/amdgpu: fix repeated words in comments

2022-09-07 Thread Robin Murphy
On 2022-09-07 12:26, Jilin Yuan wrote: Delete the redundant word 'we'. FWIW, to me it's not redundant because while indeed it is not correct, it looks exactly like the kind of typo I might make of "if we", and parsing it as *that* does make sense. The sentence you end up with here can hardly

Re: amd iommu configuration

2022-09-06 Thread Robin Murphy
On 2022-09-05 15:13, Vasant Hegde wrote: Steven, [+Felix, amd-fgx list] On 9/3/2022 4:29 AM, Steven J Abner wrote: Hi I was referred to you from linux-ker...@vger.kernel.org about the following issue. Here is as was written: On 9/1/22 11:36, Steven J Abner wrote: Hi Building a kernel tailore

Re: [PATCH] drm/amdgpu: cleanup coding style in amdgpu_drv.c

2022-09-06 Thread Robin Murphy
On 2022-09-04 20:15, Jingyu Wang wrote: [...] @@ -565,8 +566,8 @@ module_param_named(timeout_period, amdgpu_watchdog_timer.period, uint, 0644); */ #ifdef CONFIG_DRM_AMDGPU_SI -#if defined(CONFIG_DRM_RADEON) || defined(CONFIG_DRM_RADEON_MODULE) -int amdgpu_si_support = 0; +#if IS_ENABLED

Re: [PATCH v6 00/22] Add generic memory shrinker to VirtIO-GPU and Panfrost DRM drivers

2022-06-28 Thread Robin Murphy
On 2022-05-27 00:50, Dmitry Osipenko wrote: Hello, This patchset introduces memory shrinker for the VirtIO-GPU DRM driver and adds memory purging and eviction support to VirtIO-GPU driver. The new dma-buf locking convention is introduced here as well. During OOM, the shrinker will release BOs

Re: radeon ring 0 test failed on arm64

2022-03-17 Thread Robin Murphy
On 2022-03-17 12:26, Peter Geis wrote: On Thu, Mar 17, 2022 at 6:37 AM Robin Murphy wrote: On 2022-03-17 00:14, Peter Geis wrote: Good Evening, I apologize for raising this email chain from the dead, but there have been some developments that have introduced even more questions. I've l

Re: radeon ring 0 test failed on arm64

2022-03-17 Thread Robin Murphy
On 2022-03-17 00:14, Peter Geis wrote: Good Evening, I apologize for raising this email chain from the dead, but there have been some developments that have introduced even more questions. I've looped the Rockchip mailing list into this too, as this affects rk356x, and likely the upcoming rk3588

Re: I got an IOMMU IO page fault. What to do now?

2021-10-27 Thread Robin Murphy
On 27/10/2021 5:45 pm, Paul Menzel wrote: Dear Robin, On 25.10.21 18:01, Robin Murphy wrote: On 2021-10-25 12:23, Christian König wrote: not sure how the IOMMU gives out addresses, but the printed ones look suspicious to me. Something like we are using an invalid address like -1 or

Re: I got an IOMMU IO page fault. What to do now?

2021-10-25 Thread Robin Murphy
On 2021-10-25 12:23, Christian König wrote: Hi Paul, not sure how the IOMMU gives out addresses, but the printed ones look suspicious to me. Something like we are using an invalid address like -1 or similar. FWIW those look like believable DMA addresses to me, assuming that the DMA mapping

Re: [PATCH] drm/ttm: add a WARN_ON in ttm_set_driver_manager when array bounds (v2)

2021-09-13 Thread Robin Murphy
On 2021-09-10 11:09, Guchun Chen wrote: Vendor will define their own memory types on top of TTM_PL_PRIV, but call ttm_set_driver_manager directly without checking mem_type value when setting up memory manager. So add such check to aware the case when array bounds. v2: lower check level to WARN_O

Re: radeon ring 0 test failed on arm64

2021-05-26 Thread Robin Murphy
On 2021-05-26 10:42, Christian König wrote: Hi Robin, Am 25.05.21 um 22:09 schrieb Robin Murphy: On 2021-05-25 14:05, Alex Deucher wrote: On Tue, May 25, 2021 at 8:56 AM Peter Geis wrote: On Tue, May 25, 2021 at 8:47 AM Alex Deucher wrote: On Tue, May 25, 2021 at 8:42 AM Peter Geis

Re: radeon ring 0 test failed on arm64

2021-05-25 Thread Robin Murphy
On 2021-05-25 14:05, Alex Deucher wrote: On Tue, May 25, 2021 at 8:56 AM Peter Geis wrote: On Tue, May 25, 2021 at 8:47 AM Alex Deucher wrote: On Tue, May 25, 2021 at 8:42 AM Peter Geis wrote: Good Evening, I am stress testing the pcie controller on the rk3566-quartz64 prototype SBC. Th

Re: [RFC 00/17] DRM: fix struct sg_table nents vs. orig_nents misuse

2020-04-28 Thread Robin Murphy
On 2020-04-28 4:32 pm, Daniel Vetter wrote: On Tue, Apr 28, 2020 at 04:02:57PM +0200, Christoph Hellwig wrote: On Tue, Apr 28, 2020 at 03:19:48PM +0200, Marek Szyprowski wrote: 1. introduce a dma_{map,sync,unmap}_sgtable() wrappers, which will use a proper sg_table entries and call respecti

Re: [PATCH v3 1/3] drm/prime: Iterate SG DMA addresses separately

2018-05-25 Thread Robin Murphy
On 30/04/18 18:59, Sinan Kaya wrote: On 4/30/2018 9:54 AM, Robin Murphy wrote: For dma_map_sg(), DMA API implementations are free to merge consecutive segments into a single DMA mapping if conditions are suitable, thus the resulting DMA addresses which drm_prime_sg_to_page_addr_arrays

[PATCH v3 2/3] drm/amdgpu: Allow dma_map_sg() coalescing

2018-04-30 Thread Robin Murphy
g dma-contiguous segments such that it returns 0 < count < nents, we can relax the current count == nents check to only consider genuine failure as other drivers do. Reported-by: Sinan Kaya Reviewed-by: Christian König Signed-off-by: Robin Murphy --- v3: No change drivers/gpu/drm/amd/amdgpu/a

[PATCH v3 3/3] drm/radeon: Allow dma_map_sg() coalescing

2018-04-30 Thread Robin Murphy
ap_sg() coalescing dma-contiguous segments such that it returns 0 < count < nents, we can relax the current count == nents check to only consider genuine failure as other drivers do. Suggested-by: Christian König Reviewed-by: Christian König Signed-off-by: Robin Murphy --- v3: No change driv

Re: [PATCH v2 2/3] drm/amdgpu: Allow dma_map_sg() coalescing

2018-04-30 Thread Robin Murphy
On 27/04/18 20:42, Sinan Kaya wrote: On 4/27/2018 11:54 AM, Robin Murphy wrote: ubuntu@ubuntu:~/amdgpu$_./vectoradd_hip.exe [  834.002206] create_process:620 [  837.413021] Unable to handle kernel NULL pointer dereference at virtual address 0018 £5 says that's sg_dma_len(NULL),

[PATCH v3 1/3] drm/prime: Iterate SG DMA addresses separately

2018-04-30 Thread Robin Murphy
the total DMA length should still be equal to the total buffer length. All we need is a second scatterlist cursor to iterate through the DMA addresses independently of the page addresses. Reviewed-by: Christian König Signed-off-by: Robin Murphy --- v3: Move dma_len == 0 logic earlier to avoid

Re: [PATCH v2 2/3] drm/amdgpu: Allow dma_map_sg() coalescing

2018-04-30 Thread Robin Murphy
On 25/04/18 21:44, Sinan Kaya wrote: On 4/17/2018 5:13 PM, Sinan Kaya wrote: Tested-by: Sinan Kaya using QDF2400 and XFX Vega64 GPU for the first two patches. ./builddir/tests/amdgpu/amdgpu_test -s 1 Suite: Basic Tests Test: Userptr Test ...passed Userptr Test fails without this patch.

Re: [PATCH v2 1/3] drm/prime: Iterate SG DMA addresses separately

2018-04-17 Thread Robin Murphy
On 17/04/18 17:29, Christian König wrote: Am 17.04.2018 um 17:58 schrieb Robin Murphy: For dma_map_sg(), DMA API implementations are free to merge consecutive segments into a single DMA mapping if conditions are suitable, thus the resulting DMA addresses which drm_prime_sg_to_page_addr_arrays

[PATCH v2 2/3] drm/amdgpu: Allow dma_map_sg() coalescing

2018-04-17 Thread Robin Murphy
g dma-contiguous segments such that it returns 0 < count < nents, we can relax the current count == nents check to only consider genuine failure as other drivers do. This avoids a false negative on arm64 systems with an IOMMU. Reported-by: Sinan Kaya Signed-off-by: Robin Murphy --- v2: Ex

[PATCH v2 1/3] drm/prime: Iterate SG DMA addresses separately

2018-04-17 Thread Robin Murphy
he total DMA length should still be equal to the total buffer length. All we need is a second scatterlist cursor to iterate through the DMA addresses independently of the page addresses. Signed-off-by: Robin Murphy --- v2: Remember to iterate dma_len correctly as well. drivers/gpu/drm/drm_

[PATCH v2 3/3] drm/radeon: Allow dma_map_sg() coalescing

2018-04-17 Thread Robin Murphy
ap_sg() coalescing dma-contiguous segments such that it returns 0 < count < nents, we can relax the current count == nents check to only consider genuine failure as other drivers do. Suggested-by: Christian König Signed-off-by: Robin Murphy --- v2: New drivers/gpu/drm/radeon/radeon_ttm.c | 2

Re: [PATCH 2/2] drm/amdgpu: Allow dma_map_sg() coalescing

2018-04-12 Thread Robin Murphy
On 11/04/18 19:28, Christian König wrote: Am 11.04.2018 um 19:11 schrieb Robin Murphy: Now that drm_prime_sg_to_page_addr_arrays() understands the case where dma_map_sg() has coalesced segments and returns 0 < count < nents, we can relax the check to only consider genuine failure.

Re: [PATCH 1/2] drm/prime: Iterate SG DMA addresses separately

2018-04-12 Thread Robin Murphy
schrieb Robin Murphy: For dma_map_sg(), DMA API implementations are free to merge consecutive segments into a single DMA mapping if conditions are suitable, thus the resulting DMA addresses may be packed into fewer entries than ttm->sg->nents implies. drm_prime_sg_to_page_addr_arrays() do

Re: [PATCH V2] drm/amdgpu: limit DMA size to PAGE_SIZE for scatter-gather buffers

2018-04-12 Thread Robin Murphy
On 12/04/18 10:42, Christian König wrote: Am 12.04.2018 um 08:26 schrieb Christoph Hellwig: On Wed, Apr 11, 2018 at 01:03:59PM +0100, Robin Murphy wrote: On 10/04/18 21:59, Sinan Kaya wrote: Code is expecing to observe the same number of buffers returned from dma_map_sg() function compared to

Re: [1/2] drm/prime: Iterate SG DMA addresses separately

2018-04-11 Thread Robin Murphy
On 11/04/18 18:11, Robin Murphy wrote: For dma_map_sg(), DMA API implementations are free to merge consecutive segments into a single DMA mapping if conditions are suitable, thus the resulting DMA addresses may be packed into fewer entries than ttm->sg->nents i

[PATCH 1/2] drm/prime: Iterate SG DMA addresses separately

2018-04-11 Thread Robin Murphy
ngth. All we need is a separate scatterlist cursor to iterate the DMA addresses separately from the CPU addresses. Signed-off-by: Robin Murphy --- Off the back of Sinan's proposal for a workaround, I took a closer look and this jumped out - I have no hardware to test it, nor do I really k

[PATCH 2/2] drm/amdgpu: Allow dma_map_sg() coalescing

2018-04-11 Thread Robin Murphy
Now that drm_prime_sg_to_page_addr_arrays() understands the case where dma_map_sg() has coalesced segments and returns 0 < count < nents, we can relax the check to only consider genuine failure. Signed-off-by: Robin Murphy --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file chan

Re: [PATCH V2] drm/amdgpu: limit DMA size to PAGE_SIZE for scatter-gather buffers

2018-04-11 Thread Robin Murphy
On 11/04/18 15:33, Sinan Kaya wrote: On 4/11/2018 8:03 AM, Robin Murphy wrote: On 10/04/18 21:59, Sinan Kaya wrote: Code is expecing to observe the same number of buffers returned from dma_map_sg() function compared to sg_alloc_table_from_pages(). This doesn't hold true universally espec

Re: [PATCH V2] drm/amdgpu: limit DMA size to PAGE_SIZE for scatter-gather buffers

2018-04-11 Thread Robin Murphy
On 10/04/18 21:59, Sinan Kaya wrote: Code is expecing to observe the same number of buffers returned from dma_map_sg() function compared to sg_alloc_table_from_pages(). This doesn't hold true universally especially for systems with IOMMU. So why not fix said code? It's clearly not a real hardwa