Re: [PATCH] drm/amdgpu: Verify root PD is mapped into kernel address space.

2018-07-04 Thread zhoucm1
On 2018年07月05日 03:49, Andrey Grodzovsky wrote: Problem: When PD/PT update made by CPU root PD was not yet mapped causing page fault. Fix: Move amdgpu_bo_kmap into amdgpu_vm_bo_base_init to cover all cases and avoid code duplication with amdgpu_vm_alloc_levels. Link: https://bugs.freedesktop.o

Re: [PATCH v2 2/2] drm/admgpu: Present amdgpu_task_info in VM_FAULTS.

2018-07-04 Thread zhoucm1
On 2018年07月04日 23:04, Andrey Grodzovsky wrote: Extract and present the reposnsible process and thread when VM_FAULT happens. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 12 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 10 -- drivers/gpu/d

Proposal to merge KFD into amdgpu

2018-07-04 Thread Felix Kuehling
Since KFD is only supported by a single GPU driver now (amdgpu), it makes sense to merge the two. This has been raised on the amd-gfx list before and I've been putting it off to avoid more churn while I was working on upstreaming KFD. Now seems a good time to pick this up again. At this stage ther

[PATCH v2] drm/amd/display: add a check for display depth validity

2018-07-04 Thread mikita.lipski
From: Mikita Lipski [why] HDMI 2.0 fails to validate 4K@60 timing with 10 bpc [how] Adding a helper function that would verify if the display depth assigned would pass a bandwidth validation. Drop the display depth by one level till calculated pixel clk is lower than maximum TMDS clk. Bugzilla:

[PATCH v2] drm/amd/display: adding ycbcr420 pixel encoding for hdmi

2018-07-04 Thread mikita.lipski
From: Mikita Lipski [why] HDMI EDID's VSDB contains spectial timings for specifically YCbCr 4:2:0 colour space. In those cases we need to verify if the mode provided is one of the special ones has to use YCbCr 4:2:0 pixel encoding for display info. [how] Verify if the mode is using specific ycbcr

Re: [PATCH] drm/amd/display: add a check for display depth validity

2018-07-04 Thread Harry Wentland
On 2018-07-04 04:57 PM, Mikita Lipski wrote: > > > On 2018-07-04 04:51 PM, Harry Wentland wrote: >> On 2018-07-04 04:40 PM, mikita.lip...@amd.com wrote: >>> From: Mikita Lipski >>> >>> [why] >>> HDMI 2.0 fails to validate 4K@60 timing with 10 bpc >>> [how] >>> Adding a helper function that would

Re: [PATCH] drm/amd/display: add a check for display depth validity

2018-07-04 Thread Mikita Lipski
On 2018-07-04 04:51 PM, Harry Wentland wrote: On 2018-07-04 04:40 PM, mikita.lip...@amd.com wrote: From: Mikita Lipski [why] HDMI 2.0 fails to validate 4K@60 timing with 10 bpc [how] Adding a helper function that would verify if the display depth assigned would pass a bandwidth validation. D

Re: [PATCH] drm/amd/display: add a check for display depth validity

2018-07-04 Thread Harry Wentland
On 2018-07-04 04:40 PM, mikita.lip...@amd.com wrote: > From: Mikita Lipski > > [why] > HDMI 2.0 fails to validate 4K@60 timing with 10 bpc > [how] > Adding a helper function that would verify if the display depth > assigned would pass a bandwidth validation. > Drop the display depth by one level

Re: [PATCH] drm/amd/display: adding ycbcr420 pixel encoding for hdmi

2018-07-04 Thread Harry Wentland
On 2018-07-04 04:38 PM, mikita.lip...@amd.com wrote: > From: Mikita Lipski > > [why] > HDMI EDID's VSDB contains spectial timings for specifically > YCbCr 4:2:0 colour space. In those cases we need to verify > if the mode provided is one of the special ones has to use > YCbCr 4:2:0 pixel encoding

[PATCH] drm/amd/display: add a check for display depth validity

2018-07-04 Thread mikita.lipski
From: Mikita Lipski [why] HDMI 2.0 fails to validate 4K@60 timing with 10 bpc [how] Adding a helper function that would verify if the display depth assigned would pass a bandwidth validation. Drop the display depth by one level till calculated pixel clk is lower than maximum TMDS clk. Bugzilla:

[PATCH] drm/amd/display: adding ycbcr420 pixel encoding for hdmi

2018-07-04 Thread mikita.lipski
From: Mikita Lipski [why] HDMI EDID's VSDB contains spectial timings for specifically YCbCr 4:2:0 colour space. In those cases we need to verify if the mode provided is one of the special ones has to use YCbCr 4:2:0 pixel encoding for display info. [how] Verify if the mode is using specific ycbcr

[PATCH] drm/amdgpu: Verify root PD is mapped into kernel address space.

2018-07-04 Thread Andrey Grodzovsky
Problem: When PD/PT update made by CPU root PD was not yet mapped causing page fault. Fix: Move amdgpu_bo_kmap into amdgpu_vm_bo_base_init to cover all cases and avoid code duplication with amdgpu_vm_alloc_levels. Link: https://bugs.freedesktop.org/show_bug.cgi?id=107065 Signed-off-by: Andrey Gro

[PATCH v3] drm/amdgpu: update documentation for amdgpu_drv.c

2018-07-04 Thread Sonny Jiang
Signed-off-by: Sonny Jiang Acked-by: Junwei Zhang --- Documentation/gpu/amdgpu.rst| 7 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 370 +++- 2 files changed, 370 insertions(+), 7 deletions(-) diff --git a/Documentation/gpu/amdgpu.rst b/Documentation/gpu

Re: [PATCH] drm/amd/display/dc/dce: Fix multiple potential integer overflows

2018-07-04 Thread Harry Wentland
On 2018-07-04 01:54 PM, Gustavo A. R. Silva wrote: > > > On 07/04/2018 12:51 PM, Harry Wentland wrote: > [..] @@ -145,8 +145,8 @@ static bool calculate_fb_and_fractional_fb_divider( * of fractional feedback decimal point and the fractional FB Divider precision * is

Re: [PATCH] drm/amd/display: Use 2-factor allocator calls

2018-07-04 Thread Harry Wentland
On 2018-07-04 01:27 PM, Kees Cook wrote: > As already done treewide, switch from open-coded multiplication to > 2-factor allocation helper. > > Signed-off-by: Kees Cook Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 8 > 1 file ch

Re: [PATCH] drm/amd/display/dc/dce: Fix multiple potential integer overflows

2018-07-04 Thread Harry Wentland
On 2018-07-04 03:38 AM, Michel Dänzer wrote: > On 2018-07-04 03:13 AM, Gustavo A. R. Silva wrote: >> Add suffix ULL to constant 5 and cast variables target_pix_clk_khz and >> feedback_divider to uint64_t in order to avoid multiple potential integer >> overflows and give the compiler complete info

Re: [bug report] drm/amd/display: Fix indentation in dcn10 resource constructor

2018-07-04 Thread Harry Wentland
On 2018-06-27 09:14 AM, Dan Carpenter wrote: > Hello Hersen Wu, > > The patch cb1d7eacb58f: "drm/amd/display: Fix indentation in dcn10 > resource constructor" from May 8, 2018, leads to the following static > checker warning: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_resource

Re: [PATCH v2] drm/amdgpu: update documentation for amdgpu_drv.c

2018-07-04 Thread Jiang, Sonny
Hi Alex, IP blocks indexes are not fixed. What's your idea to list them? By asic family? enum amd_ip_block_type { AMD_IP_BLOCK_TYPE_COMMON, AMD_IP_BLOCK_TYPE_GMC, AMD_IP_BLOCK_TYPE_IH, AMD_IP_BLOCK_TYPE_SMC, AMD_IP_BLOCK_TYPE_PSP, AMD_IP_BLOCK_TYP

[PATCH v2] dma-buf: Move BUG_ON from _add_shared_fence to _add_shared_inplace

2018-07-04 Thread Michel Dänzer
From: Michel Dänzer Fixes the BUG_ON spuriously triggering under the following circumstances: * reservation_object_reserve_shared is called with shared_count == shared_max - 1, so obj->staged is freed in preparation of an in-place update. * reservation_object_add_shared_fence is called with

[PATCH v2 1/2] drm/amdgpu: Add support for logging process info in amdgpu_vm.

2018-07-04 Thread Andrey Grodzovsky
Add process and thread names and pids and a function to extract this info from relevant amdgpu_vm. v2: Add documentation and fix identation. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 21 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 14 ++

[PATCH v2 2/2] drm/admgpu: Present amdgpu_task_info in VM_FAULTS.

2018-07-04 Thread Andrey Grodzovsky
Extract and present the reposnsible process and thread when VM_FAULT happens. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 12 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 10 -- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 9 +++-- 3 files chan

Re: [PATCH] drm/amd/display: off by one in find_irq_source_info()

2018-07-04 Thread Harry Wentland
On 2018-07-04 05:46 AM, Dan Carpenter wrote: > The ->info[] array has DAL_IRQ_SOURCES_NUMBER elements so this condition > should be >= instead of > or we could read one element beyond the end of > the array. > > Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)") > Signed-off-by: Dan Ca

Re: [PATCH 1/2] drm/amdgpu: Add support for logging process info in amdgpu_vm.

2018-07-04 Thread Andrey Grodzovsky
On 07/04/2018 10:17 AM, Christian König wrote: Am 04.07.2018 um 16:10 schrieb Andrey Grodzovsky: Add process and thread names and pids and a function to extract this info from relevant amdgpu_vm. Signed-off-by: Andrey Grodzovsky ---   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14 +

Re: [PATCH 1/2] drm/amdgpu: Add support for logging process info in amdgpu_vm.

2018-07-04 Thread Christian König
Am 04.07.2018 um 16:10 schrieb Andrey Grodzovsky: Add process and thread names and pids and a function to extract this info from relevant amdgpu_vm. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 14 ++

[PATCH 1/2] drm/amdgpu: Add support for logging process info in amdgpu_vm.

2018-07-04 Thread Andrey Grodzovsky
Add process and thread names and pids and a function to extract this info from relevant amdgpu_vm. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 14 ++ 2 files changed, 28 insertions(+) diff

[PATCH 2/2] drm/admgpu: Present amdgpu_task_info in VM_FAULTS.

2018-07-04 Thread Andrey Grodzovsky
Extract and present the reposnsible process and thread when VM_FAULT happens. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 12 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 10 -- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 9 +++-- 3 files chan

Re: [PATCH] drm/amdgpu: Reserve fence slots for command submission

2018-07-04 Thread Michel Dänzer
On 2018-07-04 09:57 AM, Zhang, Jerry (Junwei) wrote: > On 07/04/2018 03:21 PM, Michel Dänzer wrote: >> On 2018-07-04 08:55 AM, Zhang, Jerry (Junwei) wrote: >>> On 07/04/2018 02:34 PM, Christian König wrote: Am 04.07.2018 um 05:02 schrieb Junwei Zhang: > From: Michel Dänzer > > Wit

Re: [PATCH 1/3] drm/amdgpu: separate gpu address from bo pin

2018-07-04 Thread Christian König
Am 26.06.2018 um 10:35 schrieb Junwei Zhang: It could be got by amdgpu_bo_gpu_offset() if need Signed-off-by: Junwei Zhang Reviewed-by: Michel Dänzer Patches #1 and #3 are Reviewed-by: Christian König . Christian. --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 6 ++ dri

Re: [PATCH] drm/amdgpu: allocate gart memory when it's required (v3)

2018-07-04 Thread Christian König
Am 27.06.2018 um 10:28 schrieb Junwei Zhang: Instead of calling gart memory on every bo pin, allocates it on demand v2: fix error handling v3: drop the change for kfd gtt bo mapping, not needed. Signed-off-by: Junwei Zhang Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdg

Re: [PATCH] drm/amdgpu: simplify the bo reference on amdgpu_vo_update

2018-07-04 Thread Christian König
Am 04.07.2018 um 12:16 schrieb Huang Rui: BO ptr already be initialized at definition, we needn't use the complicated reference. Signed-off-by: Huang Rui There is a typo in the subject line, with that fixed the patch is Reviewed-by: Christian König . Regards, Christian. --- drivers/gpu

[PATCH] drm/amdgpu: simplify the bo reference on amdgpu_vo_update

2018-07-04 Thread Huang Rui
BO ptr already be initialized at definition, we needn't use the complicated reference. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdg

[PATCH] drm/amd/display: off by one in find_irq_source_info()

2018-07-04 Thread Dan Carpenter
The ->info[] array has DAL_IRQ_SOURCES_NUMBER elements so this condition should be >= instead of > or we could read one element beyond the end of the array. Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/amd/display/dc/irq

Re: [PATCH] dma-buf: Move BUG_ON from _add_shared_fence to _add_shared_inplace

2018-07-04 Thread Christian König
Am 04.07.2018 um 11:09 schrieb Michel Dänzer: On 2018-07-04 10:31 AM, Christian König wrote: Am 26.06.2018 um 16:31 schrieb Michel Dänzer: From: Michel Dänzer Fixes the BUG_ON spuriously triggering under the following circumstances: * ttm_eu_reserve_buffers processes a list containing multip

Re: [PATCH] drm/amdgpu: Reserve fence slots for command submission

2018-07-04 Thread Zhang, Jerry (Junwei)
On 07/04/2018 05:15 PM, Michel Dänzer wrote: On 2018-07-04 11:01 AM, Christian König wrote: Am 04.07.2018 um 09:57 schrieb Zhang, Jerry (Junwei): On 07/04/2018 03:21 PM, Michel Dänzer wrote: On 2018-07-04 08:55 AM, Zhang, Jerry (Junwei) wrote: On 07/04/2018 02:34 PM, Christian König wrote: A

Re: [PATCH] drm/amdgpu: Reserve fence slots for command submission

2018-07-04 Thread Michel Dänzer
On 2018-07-04 11:01 AM, Christian König wrote: > Am 04.07.2018 um 09:57 schrieb Zhang, Jerry (Junwei): >> On 07/04/2018 03:21 PM, Michel Dänzer wrote: >>> On 2018-07-04 08:55 AM, Zhang, Jerry (Junwei) wrote: On 07/04/2018 02:34 PM, Christian König wrote: > Am 04.07.2018 um 05:02 schrieb Ju

Re: [PATCH] dma-buf: Move BUG_ON from _add_shared_fence to _add_shared_inplace

2018-07-04 Thread Michel Dänzer
On 2018-07-04 10:31 AM, Christian König wrote: > Am 26.06.2018 um 16:31 schrieb Michel Dänzer: >> From: Michel Dänzer >> >> Fixes the BUG_ON spuriously triggering under the following >> circumstances: >> >> * ttm_eu_reserve_buffers processes a list containing multiple BOs using >>    the same rese

Re: [PATCH] drm/amdgpu: Reserve fence slots for command submission

2018-07-04 Thread Christian König
Am 04.07.2018 um 09:21 schrieb Michel Dänzer: On 2018-07-04 08:55 AM, Zhang, Jerry (Junwei) wrote: On 07/04/2018 02:34 PM, Christian König wrote: Am 04.07.2018 um 05:02 schrieb Junwei Zhang: From: Michel Dänzer Without this, there could not be enough slots, which could trigger the BUG_ON in

Re: [PATCH] drm/amdgpu: Reserve fence slots for command submission

2018-07-04 Thread Christian König
Am 04.07.2018 um 09:57 schrieb Zhang, Jerry (Junwei): On 07/04/2018 03:21 PM, Michel Dänzer wrote: On 2018-07-04 08:55 AM, Zhang, Jerry (Junwei) wrote: On 07/04/2018 02:34 PM, Christian König wrote: Am 04.07.2018 um 05:02 schrieb Junwei Zhang: From: Michel Dänzer Without this, there could n

Re: [PATCH] drm/amdgpu/acp: Fix slab-out-of-bounds in mfd_add_device in acp_hw_init

2018-07-04 Thread Mukunda,Vijendar
On Tuesday 03 July 2018 09:50 PM, Alex Deucher wrote: On Mon, Jul 2, 2018 at 5:48 PM, Daniel Kurtz wrote: Hi Alex, On Sun, Apr 15, 2018 at 9:48 PM Agrawal, Akshu wrote: On 4/13/2018 9:45 PM, Daniel Kurtz wrote: Commit 51f7415039d4 ("drm/amd/amdgpu: creating two I2S instances for stoney

Re: [PATCH 0/5] drm: use core pcie functionality for pcie gen/width

2018-07-04 Thread Christian König
Whole series is Acked-by: Christian König . BTW: With patch #2 you created quite some noise in the news: https://www.tomshardware.com/news/amd-vega-20-pcie-4.0,37389.html Cheers, Christian. Am 25.06.2018 um 23:06 schrieb Alex Deucher: This series exports some pcie helper functions for use by

Re: [PATCH] dma-buf: Move BUG_ON from _add_shared_fence to _add_shared_inplace

2018-07-04 Thread Christian König
Am 26.06.2018 um 16:31 schrieb Michel Dänzer: From: Michel Dänzer Fixes the BUG_ON spuriously triggering under the following circumstances: * ttm_eu_reserve_buffers processes a list containing multiple BOs using the same reservation object, so it calls reservation_object_reserve_shared w

Re: [PATCH] drm/amdgpu: Reserve fence slots for command submission

2018-07-04 Thread Zhang, Jerry (Junwei)
On 07/04/2018 03:21 PM, Michel Dänzer wrote: On 2018-07-04 08:55 AM, Zhang, Jerry (Junwei) wrote: On 07/04/2018 02:34 PM, Christian König wrote: Am 04.07.2018 um 05:02 schrieb Junwei Zhang: From: Michel Dänzer Without this, there could not be enough slots, which could trigger the BUG_ON in r

Re: [PATCH] drm/amd/display/dc/dce: Fix multiple potential integer overflows

2018-07-04 Thread Michel Dänzer
On 2018-07-04 03:13 AM, Gustavo A. R. Silva wrote: > Add suffix ULL to constant 5 and cast variables target_pix_clk_khz and > feedback_divider to uint64_t in order to avoid multiple potential integer > overflows and give the compiler complete information about the proper > arithmetic to use. > > N

Re: [PATCH] drm/amdgpu: Reserve fence slots for command submission

2018-07-04 Thread Michel Dänzer
On 2018-07-04 08:55 AM, Zhang, Jerry (Junwei) wrote: > On 07/04/2018 02:34 PM, Christian König wrote: >> Am 04.07.2018 um 05:02 schrieb Junwei Zhang: >>> From: Michel Dänzer >>> >>> Without this, there could not be enough slots, which could trigger the >>> BUG_ON in reservation_object_add_shared_f

Re: [PATCH 2/5] drm/amdgpu: update amd_pcie.h to include gen4 speeds

2018-07-04 Thread Alex Deucher
On Mon, Jun 25, 2018 at 5:06 PM, Alex Deucher wrote: > Internal header used by the driver to specify pcie gen > speeds of the asic and chipset. > > Signed-off-by: Alex Deucher Anyone care to review patches 2,3,4? > --- > drivers/gpu/drm/amd/include/amd_pcie.h | 2 ++ > 1 file changed, 2 insert