Re: [PATCH] drm/amdgpu: disable UVD/VCE for some polaris 12 variants

2018-11-26 Thread Christian König
Am 26.11.18 um 03:38 schrieb Zhang, Jerry(Junwei): On 11/24/18 3:32 AM, Deucher, Alexander wrote: Is this required?  Are the harvesting fuses incorrect?  If the blocks are harvested, we should bail out of the blocks properly during init.  Also, please make this more explicit if we still need

Re: [PATCH] drm/amdgpu: add the checking to avoid NULL pointer dereference

2018-11-26 Thread Christian König
Am 26.11.18 um 02:59 schrieb Sharma, Deepak: 在 2018/11/24 2:10, Koenig, Christian 写道: Am 23.11.18 um 15:10 schrieb Zhou, David(ChunMing): 在 2018/11/23 21:30, Koenig, Christian 写道: Am 23.11.18 um 14:27 schrieb Zhou, David(ChunMing): 在 2018/11/22 19:25, Christian König 写道: Am 22.11.18 um

RE: [PATCH] drm/amdgpu: add the checking to avoid NULL pointer dereference

2018-11-26 Thread Zhou, David(ChunMing)
> -Original Message- > From: Christian König > Sent: Monday, November 26, 2018 5:23 PM > To: Sharma, Deepak ; Zhou, David(ChunMing) > ; Koenig, Christian ; > amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH] drm/amdgpu: add the checking to avoid NULL pointer > dereference > > Am

Re: [PATCH] drm/amdgpu: add the checking to avoid NULL pointer dereference

2018-11-26 Thread Deepak Sharma
On 11/26/18 1:57 AM, Zhou, David(ChunMing) wrote: > > >> -Original Message- >> From: Christian König >> Sent: Monday, November 26, 2018 5:23 PM >> To: Sharma, Deepak ; Zhou, David(ChunMing) >> ; Koenig, Christian ; >> amd-gfx@lists.freedesktop.org >> Subject: Re: [PATCH] drm/amdgpu:

Re: [PATCH] drm/amdgpu: disable UVD/VCE for some polaris 12 variants

2018-11-26 Thread Zhang, Jerry(Junwei)
On 11/26/18 5:28 PM, Christian König wrote: Am 26.11.18 um 03:38 schrieb Zhang, Jerry(Junwei): On 11/24/18 3:32 AM, Deucher, Alexander wrote: Is this required? Are the harvesting fuses incorrect?  If the blocks are harvested, we should bail out of the blocks properly during init.  Also,

Re: [PATCH] drm/amdgpu: add the checking to avoid NULL pointer dereference

2018-11-26 Thread zhoucm1
Yeah, you need another drm patch as well when you apply my patch. Attached. -David On 2018年11月27日 08:40, Sharma, Deepak wrote: On 11/26/18 1:57 AM, Zhou, David(ChunMing) wrote: -Original Message- From: Christian König Sent: Monday, November 26, 2018 5:23 PM To: Sharma, Deepak ;

RE: [PATCH] drm/amd/display: limit high pixel clock modes on ST/CZ

2018-11-26 Thread S, Shirish
Thanks Alex, found that patch. My patch is no more required. Regards, Shirish S From: Deucher, Alexander Sent: Monday, November 26, 2018 7:46 PM To: S, Shirish ; Li, Sun peng (Leo) ; Wentland, Harry Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amd/display: limit high pixel

[PATCH 1/3] Revert "drm/amd/powerplay: Enable/Disable NBPSTATE on On/OFF of UVD"

2018-11-26 Thread Guttula, Suresh
From: Shirish S This reverts commit dbd8299c32f6f413f6cfe322fe0308f3cfc577e8. Reason for revert: This patch sends msg PPSMC_MSG_DisableLowMemoryPstate(0x002e) in wrong of sequence to SMU which is before PPSMC_MSG_UVDPowerON (0x0008). This leads to SMU failing to service the request as it is

[PATCH v3 3/3] drm/amd:Enable/Disable NBPSTATE on On/OFF of UVD

2018-11-26 Thread Guttula, Suresh
We observe black lines (underflow) on display when playing a 4K video with UVD. On Disabling Low memory P state this issue is not seen. In this patch,disabling low memory P state only when video size >= 4k. Multiple runs of power measurement shows no impact Signed-off-by: suresh guttula --- v2:

[PATCH v2 2/3] drm/amd/powerplay:add hwmgr callback to update nbpstate on Carrizo

2018-11-26 Thread Guttula, Suresh
Add hwmgr callback "update_nbdpm_pstate".This will use to access "cz_nbdpm_pstate_enable_disable" function to enable/disable low memory pstate. Signed-off-by: suresh guttula --- v2: commit message edited to explain more details drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c | 1 +

Re: [PATCH] drm/amd/display: limit high pixel clock modes on ST/CZ

2018-11-26 Thread Deucher, Alexander
I thought there was a patch to do this already that got sent out a few weeks ago. Basically limit ST/CZ to modes that do not require a retimer. Is an additional patch needed? Alex From: amd-gfx on behalf of S, Shirish Sent: Monday, November 26, 2018

[PATCH] drm/amdgpu: fix spelling mistake "Pramater" -> "Parameter"

2018-11-26 Thread Colin King
From: Colin Ian King There is a spelling mistake in the module description text and a comment too, fix them. Also line break overly long comment. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 5/7] drm/amdgpu: Call doorbell index init on device initialization

2018-11-26 Thread Deucher, Alexander
Ah, ok. no problem. Alex From: amd-gfx on behalf of Zeng, Oak Sent: Monday, November 26, 2018 10:31:04 AM To: Alex Deucher Cc: amd-gfx@lists.freedesktop.org Subject: RE: [PATCH 5/7] drm/amdgpu: Call doorbell index init on device initialization Yes, that

RE: [PATCH 5/7] drm/amdgpu: Call doorbell index init on device initialization

2018-11-26 Thread Zeng, Oak
Yes, that was my first version. But during debug, I found amdgpu_device_doorbell_init uses adev->doorbell_index.max_assignment which is initialized in *_doorbell_index_init. So I have to call *_doorbell_index_init before amdgpu_device_doorbell_init. *_set_ip_blocks() is too late. In a later

Re: [PATCH 5/7] drm/amdgpu: Call doorbell index init on device initialization

2018-11-26 Thread Deucher, Alexander
Maybe it would be better to add this as a callback to struct amdgpu_asic_funcs to avoid adding asic specific code to amdgpu_device.c Alex From: amd-gfx on behalf of Deucher, Alexander Sent: Monday, November 26, 2018 10:59:02 AM To: Zeng, Oak; Alex Deucher

RE: [PATCH 5/7] drm/amdgpu: Call doorbell index init on device initialization

2018-11-26 Thread Zeng, Oak
That is good idea. Will do it. thanks, Oak From: Deucher, Alexander Sent: Monday, November 26, 2018 11:02 AM To: Zeng, Oak ; Alex Deucher Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 5/7] drm/amdgpu: Call doorbell index init on device initialization Maybe it would be better to add

Re: [PATCH] drm/amd/display: Remove duplicate header

2018-11-26 Thread Alex Deucher
On Fri, Nov 23, 2018 at 2:43 AM Brajeswar Ghosh wrote: > > Remove dce/dce_mem_input.h which is included more than once > > Signed-off-by: Brajeswar Ghosh Applied. thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git

Re: [PATCH] drm/amdgpu: fix spelling mistake "Pramater" -> "Parameter"

2018-11-26 Thread Alex Deucher
On Mon, Nov 26, 2018 at 10:02 AM Colin King wrote: > > From: Colin Ian King > > There is a spelling mistake in the module description text and > a comment too, fix them. Also line break overly long comment. > > Signed-off-by: Colin Ian King Applied. thanks! Alex > --- >

Re: [PATCH 5/5] drm/amdgpu: Refactor GPU reset for XGMI hive case.

2018-11-26 Thread Grodzovsky, Andrey
Actually, after looking again at drm_sched_job_timedout from which the amdgpu_device_gpu_recover will be called I see that we already disconnect all the pending scheduler fences from the HW fence, including the guilty job. I also see that in drm_sched_job_timedout job_list_lock is released

Re: [PATCH 5/5] drm/amdgpu: Refactor GPU reset for XGMI hive case.

2018-11-26 Thread Christian König
What I mean is - should we get rid of dma_fence_add/remove_callback logic in drm_sched_job_timedout and do it for each driver in between scheduler deactivation  and activation back ? Yes, exactly. That's the reason why I already have a revert for the patch and remove the dance from

amdgpu-drm-next branch compile error

2018-11-26 Thread Zeng, Oak
Hello all, When I pull the latest code, I have this compilation error. Anything I can do to fix it? /home/ozeng/git/compute/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c: In function 'amdgpu_dpm_enable_uvd': /home/ozeng/git/compute/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c:1968:21: error:

[PATCH 7/8] drm/amdgpu: Use asic specific doorbell index instead of macro definition

2018-11-26 Thread Oak Zeng
Change-Id: I84475efcfb482c474fccb133010abb5df5f4 Signed-off-by: Oak Zeng Suggested-by: Felix Kuehling Suggested-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 27 --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-

[PATCH 3/8] drm/amdgpu: Vega10 doorbell index initialization

2018-11-26 Thread Oak Zeng
v2: Use enum definition instead of hardcoded value Change-Id: Ib72058337f0aa53adfc6c6aae5341a7cd665111a Signed-off-by: Oak Zeng Suggested-by: Felix Kuehling Suggested-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + drivers/gpu/drm/amd/amdgpu/soc15.h | 1 +

[PATCH 5/8] drm/amdgpu: Doorbell layout for vega20 and future asic

2018-11-26 Thread Oak Zeng
v2: Use enum definition instead of hardcoded value Change-Id: I04d22fb717ac50483c0835f160a2e860e344f358 Signed-off-by: Oak Zeng Suggested-by: Felix Kuehling Suggested-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 50

[PATCH 4/8] drm/amdgpu: Doorbell index initialization for ASICs before vega10

2018-11-26 Thread Oak Zeng
v2: Use enum definition instead of hardcoded number Change-Id: Id64eb98f5b1c24b51eb2fd5a083086fc3515813d Signed-off-by: Oak Zeng Suggested-by: Felix Kuehling Suggested-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/cik.c | 1 + drivers/gpu/drm/amd/amdgpu/cik.h | 1 +

[PATCH 8/8] drm/amdgpu: Moved doorbell structures to seperate file

2018-11-26 Thread Oak Zeng
Move doorbell structures, enum definitions and helper functions from amdgpu.h to amdgpu_doorbell.h. No functional change Change-Id: I09f7b84869b6d3c688b7a2506ff78d62b3de23f5 Signed-off-by: Oak Zeng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 227 +---

[PATCH 6/8] drm/amdgpu: Call doorbell index init on device initialization

2018-11-26 Thread Oak Zeng
Also call functioin amdgpu_device_doorbell_init after amdgpu_device_ip_early_init because the former depends on the later to set up asic-specific init_doorbell_index function Change-Id: I2f004bbbe2565035460686f4fc16e86b77a2a9b5 Signed-off-by: Oak Zeng Suggested-by: Felix Kuehling Suggested-by:

[PATCH 2/8] drm/amdgpu: Add asic func interface to init doorbell index

2018-11-26 Thread Oak Zeng
Change-Id: I7e8a9c9dfd4f3bd0902679a1771c1a043ece2674 Signed-off-by: Oak Zeng --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index b7ee4ef..719da32 100644 ---

RE: [PATCH 4/7] drm/amdgpu: Doorbell index initialization for ASICs before vega10

2018-11-26 Thread Zeng, Oak
Ok, I can change it legacy_doorbell_index_init(). I will keep this function in vi.c. The reason I don't want to put it in cik.c is cik.c is only compiled optionally. Another thing I want to know is, my understanding is si doesn't use doorbell, does it? thanks, Oak -Original Message-

Re: [PATCH 4/7] drm/amdgpu: Doorbell index initialization for ASICs before vega10

2018-11-26 Thread Deucher, Alexander
Correct. SI does not use doorbells. Alex From: amd-gfx on behalf of Zeng, Oak Sent: Monday, November 26, 2018 12:20:10 PM To: Alex Deucher Cc: amd-gfx@lists.freedesktop.org Subject: RE: [PATCH 4/7] drm/amdgpu: Doorbell index initialization for ASICs before

Re: [PATCH] pci: fix incorrect value returned from pcie_get_speed_cap

2018-11-26 Thread Bjorn Helgaas
On Tue, Oct 30, 2018 at 12:36:08PM -0400, Mikulas Patocka wrote: > The macros PCI_EXP_LNKCAP_SLS_*GB are values, not bit masks. We must mask > the register and compare it against them. > > This patch fixes errors "amdgpu: [powerplay] failed to send message 261 > ret is 0" errors when PCIe-v3 card

Re: [PATCH] pci: fix incorrect value returned from pcie_get_speed_cap

2018-11-26 Thread Bjorn Helgaas
On Mon, Nov 19, 2018 at 06:47:04PM -0600, Bjorn Helgaas wrote: > On Tue, Oct 30, 2018 at 12:36:08PM -0400, Mikulas Patocka wrote: > > The macros PCI_EXP_LNKCAP_SLS_*GB are values, not bit masks. We must mask > > the register and compare it against them. > > > > This patch fixes errors "amdgpu:

[PATCH 3/8] drm/amdgpu: Vega10 doorbell index initialization

2018-11-26 Thread Oak Zeng
v2: Use enum definition instead of hardcoded value v3: Remove unused enum definition Change-Id: Ib72058337f0aa53adfc6c6aae5341a7cd665111a Signed-off-by: Oak Zeng Suggested-by: Felix Kuehling Suggested-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 14 --

Re: [PATCH v7 3/5] drm: Document variable refresh properties

2018-11-26 Thread Wentland, Harry
On 2018-11-12 12:05 p.m., Kazlauskas, Nicholas wrote: > On 11/12/18 11:12 AM, Wentland, Harry wrote: >> On 2018-11-08 9:43 a.m., Nicholas Kazlauskas wrote: >>> These include the drm_connector 'vrr_capable' and the drm_crtc >>> 'vrr_enabled' properties. >>> >>> Signed-off-by: Nicholas Kazlauskas

Re: [PATCH RFC 2/5] cgroup: Add mechanism to register vendor specific DRM devices

2018-11-26 Thread Kasiviswanathan, Harish
Thanks Tejun,Eric and Christian for your replies. We want GPUs resource management to work seamlessly with containers and container orchestration. With the Intel / bpf based approach this is not possible. From your response we gather the following. GPU resources need to be abstracted. We

[PATCH 2/2] drm/amdgpu: Avoid endless loop in GPUVM fragment processing

2018-11-26 Thread Kuehling, Felix
Don't bounce back to the root level for fragment processing, because huge pages are not supported at that level. This is unlikely to happen with the default VM size on Vega, but can be exposed by limiting the VM size with the amdgpu.vm_size module parameter. Signed-off-by: Felix Kuehling ---

[PATCH 1/2] drm/amdgpu: Cast to uint64_t before left shift

2018-11-26 Thread Kuehling, Felix
Avoid potential integer overflows with left shift in huge-page mapping code by casting the operand to uin64_t first. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git