Re: [PATCH 1/2] drm/amdgpu/gmc: steal the appropriate amount of vram for fw hand-over (v2)

2018-04-06 Thread Andrey Grodzovsky
OK, sorry for the noise. Andrey On 04/06/2018 04:17 PM, Alex Deucher wrote: This will not work unless gmc_v6_0_mc_init in gmc_v6_0_sw_init will be moved before gmc_v6_0_get_vbios_fb_size, real_vram_size is not initialized in this point. Same for other ASICs. Yeah, I moved it down. See below.

Re: [PATCH 32/32] drm/amd/display: Fix dim display on DCE11

2018-04-06 Thread Leo Li
On 2018-04-04 11:17 AM, Deucher, Alexander wrote: Do other DCE blocks need this fix as well?  Or is this code shared with say DCE8 and DCE10? Yes, it's all shared. The hook for this is initialized in dce110_hw_sequencer_construct(), which is called for all DCE. Leo Alex

Re: [PATCH 1/2] drm/amdgpu/gmc: steal the appropriate amount of vram for fw hand-over (v2)

2018-04-06 Thread Alex Deucher
On Fri, Apr 6, 2018 at 4:06 PM, Andrey Grodzovsky wrote: > On 04/06/2018 03:54 PM, Alex Deucher wrote: > >> Steal 9 MB for vga emulation and fb if vga is enabled, otherwise, >> steal enough to cover the current display size as set by the vbios. >> >> If no memory is used (e.g., secondary or headle

Re: [PATCH 1/2] drm/amdgpu/gmc: steal the appropriate amount of vram for fw hand-over (v2)

2018-04-06 Thread Andrey Grodzovsky
On 04/06/2018 03:54 PM, Alex Deucher wrote: Steal 9 MB for vga emulation and fb if vga is enabled, otherwise, steal enough to cover the current display size as set by the vbios. If no memory is used (e.g., secondary or headless card), skip stolen memory reserve. v2: skip reservation if vram is

[PATCH 2/2] drm/amdgpu: Free VGA stolen memory as soon as possible.

2018-04-06 Thread Alex Deucher
From: Andrey Grodzovsky Reserved VRAM is used to avoid overriding pre OS FB. Once our display stack takes over we don't need the reserved VRAM anymore. v2: Remove comment, we know actually why we need to reserve the stolen VRAM. Fix return type for amdgpu_ttm_late_init. v3: Return 0 in amdgpu_bo

[PATCH 1/2] drm/amdgpu/gmc: steal the appropriate amount of vram for fw hand-over (v2)

2018-04-06 Thread Alex Deucher
Steal 9 MB for vga emulation and fb if vga is enabled, otherwise, steal enough to cover the current display size as set by the vbios. If no memory is used (e.g., secondary or headless card), skip stolen memory reserve. v2: skip reservation if vram is limited, address Christian's comments Reviewe

Re: [PATCH] drm/amd/display: Fix memleak on input transfer function

2018-04-06 Thread Harry Wentland
On 2018-04-06 03:49 PM, sunpeng...@amd.com wrote: > From: "Leo (Sunpeng) Li" > > Input transfer function creation is now done when the plane is created. > This is done within the following change: > > Author: Anthony Koo > drm/amd/display: Have DC manage its own allocation of gamma

[PATCH] drm/amd/display: Fix memleak on input transfer function

2018-04-06 Thread sunpeng.li
From: "Leo (Sunpeng) Li" Input transfer function creation is now done when the plane is created. This is done within the following change: Author: Anthony Koo drm/amd/display: Have DC manage its own allocation of gamma Therefore, we no longer need to create it when filling in the p

Re: [PATCH 1/2] drm/amdgpu/gmc: steal the appropriate amount of vram for fw hand-over

2018-04-06 Thread Alex Deucher
On Fri, Apr 6, 2018 at 3:04 PM, Christian König wrote: > Am 06.04.2018 um 19:24 schrieb Alex Deucher: >> >> Steal 9 MB for vga emulation and fb if vga is enabled, otherwise, >> steal enough to cover the current display size as set by the vbios. >> >> If no memory is used (e.g., secondary or headle

Re: [PATCH 1/2] drm/amdgpu/gmc: steal the appropriate amount of vram for fw hand-over

2018-04-06 Thread Christian König
Am 06.04.2018 um 19:24 schrieb Alex Deucher: Steal 9 MB for vga emulation and fb if vga is enabled, otherwise, steal enough to cover the current display size as set by the vbios. If no memory is used (e.g., secondary or headless card), skip stolen memory reserve. Signed-off-by: Alex Deucher --

Re: [PATCH 1/2] drm/amdgpu/gmc: steal the appropriate amount of vram for fw hand-over

2018-04-06 Thread Andrey Grodzovsky
Reviewed-and-Tested-by: Andrey Grodzovsky Andrey On 04/06/2018 01:24 PM, Alex Deucher wrote: Steal 9 MB for vga emulation and fb if vga is enabled, otherwise, steal enough to cover the current display size as set by the vbios. If no memory is used (e.g., secondary or headless card), skip sto

[PATCH 2/2] drm/amdgpu: Free VGA stolen memory as soon as possible.

2018-04-06 Thread Alex Deucher
From: Andrey Grodzovsky Reserved VRAM is used to avoid overriding pre OS FB. Once our display stack takes over we don't need the reserved VRAM anymore. v2: Remove comment, we know actually why we need to reserve the stolen VRAM. Fix return type for amdgpu_ttm_late_init. v3: Return 0 in amdgpu_bo

[PATCH 1/2] drm/amdgpu/gmc: steal the appropriate amount of vram for fw hand-over

2018-04-06 Thread Alex Deucher
Steal 9 MB for vga emulation and fb if vga is enabled, otherwise, steal enough to cover the current display size as set by the vbios. If no memory is used (e.g., secondary or headless card), skip stolen memory reserve. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 17

[PATCH umr] Add SQ_WAVE_TTMP registers to no_kernel code path

2018-04-06 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/lib/wave_status.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/wave_status.c b/src/lib/wave_status.c index 3b537abefcc8..516e8d33a948 100644 --- a/src/lib/wave_status.c +++ b/src/lib/wave_status.c @@ -73,8 +73,10 @@ stati

Re: [PATCH umr] add SQ_WAVE_TTMP registers for gfx8 devices

2018-04-06 Thread Tom St Denis
Both the vi and ai read only 32 words (in umr). I'll fix those to 64 words before committing these. Also I'm rushing a bit. I didn't add no_kernel support but I'll do that in a later commit since I want to get the functionality out sooner than later. On 04/06/2018 12:16 PM, Tom St Denis wr

[PATCH umr] add SQ_WAVE_TTMP registers for gfx8 devices

2018-04-06 Thread Tom St Denis
Signed-off-by: Tom St Denis --- src/lib/wave_status.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/lib/wave_status.c b/src/lib/wave_status.c index 92ce624c07a9..e2081bcd2377 100644 --- a/src/lib/wave_status.c +++ b/src/lib/wave_status.c @@ -101,7 +10

[PATCH] drm/amd/amdgpu: Add SQ_WAVE_TTMP registers for gfx8 debugfs

2018-04-06 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index b0e591eaa71a..8a53869b7937 100644 --- a/drivers/gpu/drm/amd/amdgpu

Re: [PATCH 1/2] drm/amdgpu/gmc: always steal the first 32MB of vram for fw hand-over

2018-04-06 Thread Harry Wentland
On 2018-04-06 09:44 AM, Andrey Grodzovsky wrote: > > > On 04/06/2018 09:34 AM, Michel Dänzer wrote: >> On 2018-04-06 02:39 PM, Andrey Grodzovsky wrote: Am 06.04.2018 um 13:23 schrieb Andrey Grodzovsky: > Me and Alex talked to a BIOS guys yesterday exactly about that, a > dynamic way

Add SQ_WAVE_TTMPx support for gfx9

2018-04-06 Thread Tom St Denis
Patches attached for both umr/kernel. Tested on my Raven1. I'll circle back to adding gfx8 after lunch. Tom >From e8171c0abbb2806d644065f5e212a7d8b35ff7f8 Mon Sep 17 00:00:00 2001 From: Tom St Denis Date: Fri, 6 Apr 2018 10:34:47 -0400 Subject: [PATCH] drm/amd/amdgpu: Add SQ_WAVE_TTMP register

Re: [PATCH 1/2] drm/amdgpu/gmc: always steal the first 32MB of vram for fw hand-over

2018-04-06 Thread Andrey Grodzovsky
On 04/06/2018 09:34 AM, Michel Dänzer wrote: On 2018-04-06 02:39 PM, Andrey Grodzovsky wrote: Am 06.04.2018 um 13:23 schrieb Andrey Grodzovsky: Me and Alex talked to a BIOS guys yesterday exactly about that, a dynamic way to query this info from BIOS, he just told us to reserve 32M to cover 4

Re: [PATCH 1/2] drm/amdgpu/gmc: always steal the first 32MB of vram for fw hand-over

2018-04-06 Thread Michel Dänzer
On 2018-04-06 02:39 PM, Andrey Grodzovsky wrote: >> Am 06.04.2018 um 13:23 schrieb Andrey Grodzovsky: >>> >>> Me and Alex talked to a BIOS guys yesterday exactly about that, a >>> dynamic way to query this info from BIOS, he just told us to reserve >>> 32M to cover 4K display. How about reading DC

Re: [PATCH 1/2] drm/amdgpu/gmc: always steal the first 32MB of vram for fw hand-over

2018-04-06 Thread Andrey Grodzovsky
At least the second patch somehow addresses the memory waste concern, the reservation will be very transient, during late init the BO will get freed. Andrey On 04/06/2018 08:26 AM, Christian König wrote: I feared that you would say that :( In this case the patches are Acked-by: Christian Kö

Re: [PATCH 1/2] drm/amdgpu/gmc: always steal the first 32MB of vram for fw hand-over

2018-04-06 Thread Christian König
I feared that you would say that :( In this case the patches are Acked-by: Christian König . Thanks, Christian. Am 06.04.2018 um 13:23 schrieb Andrey Grodzovsky: Me and Alex talked to a BIOS guys yesterday exactly about that, a dynamic way to query this info from BIOS, he just told us to r

Re: [PATCH 1/2] drm/amdgpu/gmc: always steal the first 32MB of vram for fw hand-over

2018-04-06 Thread Andrey Grodzovsky
Me and Alex talked to a BIOS guys yesterday exactly about that, a dynamic way to query this info from BIOS, he just told us to reserve 32M to cover 4K display. Andrey On 04/06/2018 04:30 AM, Christian König wrote: I wonder if there's no way to determine which part of VRAM is being scanned ou

Re: [PATCH 1/2] drm/amdgpu/gmc: always steal the first 32MB of vram for fw hand-over

2018-04-06 Thread Christian König
Am 06.04.2018 um 09:50 schrieb Michel Dänzer: On 2018-04-05 09:27 PM, Alex Deucher wrote: On Thu, Apr 5, 2018 at 2:26 PM, Andrey Grodzovsky wrote: From: Alex Deucher The vbios uses memory from the start of vram for the pre-OS framebuffer. Reserve this at driver load time to prevent the drive

Re: [PATCH 1/2] drm/amdgpu/gmc: always steal the first 32MB of vram for fw hand-over

2018-04-06 Thread Michel Dänzer
On 2018-04-05 09:27 PM, Alex Deucher wrote: > On Thu, Apr 5, 2018 at 2:26 PM, Andrey Grodzovsky > wrote: >> From: Alex Deucher >> >> The vbios uses memory from the start of vram for the pre-OS >> framebuffer. Reserve this at driver load time to prevent >> the driver from using it for other things