RE: [PATCH] drm/amdgpu: detect buffer overflow and avoid unnecessary dereference

2018-05-29 Thread Quan, Evan
> Maybe this should be a WARN_ON and then we clamp the range? > According to the spec, it should store all indirect_start_offsets into the array. And the current array should be enough. So, if overflow occurred, it should be a bug case and BUG_ON seems more proper. Regards, Evan > -Original

Re: [PATCH] drm/amdgpu: To get gds, gws and oa from adev->gds

2018-05-29 Thread zhoucm1
Shared BOs have the check to prevent per-vm-bo creation: struct dma_buf *amdgpu_gem_prime_export(struct drm_device *dev,     struct drm_gem_object *gobj,     int flags) {     struct amdgpu_bo *bo =

RE: [PATCH] drm/amdgpu: To get gds, gws and oa from adev->gds

2018-05-29 Thread Deng, Emily
Yes, I think we should add this rule to tell user mode driver, just like they will pass bo_list if they share bo with others. Best Wishes, Emily Deng > -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of zhoucm1 > Sent: Wednesday, May 30,

Re: [PATCH] drm/amdgpu: To get gds, gws and oa from adev->gds

2018-05-29 Thread zhoucm1
Yes, but how to make sure there is bo list if all BOs are per-vm-bo? Maybe we say we should give this rule to UMD, but who can make sure it? we can imagine a situation when UMD forgot this rule, they create gds bo with per-vm-bo, there is no bo list for CS, then our kernel give a kernel gds as

RE: [PATCH] drm/amdgpu: To get gds, gws and oa from adev->gds

2018-05-29 Thread Deng, Emily
Hi David, For the use case that the user mode creates the gds, gws, and oa buffer object itself, it need to pass bo_list to kernel driver, and we need to get those objects from bo_list. Best Wishes, Emily Deng > -Original Message- > From: Zhou, David(ChunMing) > Sent: Tuesday, May

RE: [PATCH 1/2] drm/amdgpu: fix 'ISO C90 forbids mixed declarations'

2018-05-29 Thread Deng, Emily
Reviewed-by: Emily Deng > -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Chunming Zhou > Sent: Wednesday, May 30, 2018 11:15 AM > To: dri-de...@lists.freedesktop.org; amd-gfx@lists.freedesktop.org > Cc: Deng, Emily ; Zhou, David(ChunMing)

[PATCH 2/2] drm/amdgpu: gds bo must not be per-vm-bo

2018-05-29 Thread Chunming Zhou
In per-vm-bo case, there could be no bo list. But gds bo created from user space must be passed to bo list. So adding a check to prevent creat per-vm gds bo. Change-Id: Idfa58c40447df0db2883413f9f7ccf56b47579f5 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7

[PATCH 1/2] drm/amdgpu: fix 'ISO C90 forbids mixed declarations'

2018-05-29 Thread Chunming Zhou
Change-Id: I412f5783e2839c53841e6ab665f939236bdc5bf1 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index

[pull] amdgpu drm-fixes-4.17

2018-05-29 Thread Alex Deucher
Hi Dave, One last fix for 4.17. Fix a suspend regression in DC. The following changes since commit 72777fe79768ec30ac2163d26de68a89edc9849f: Merge branch 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-fixes (2018-05-11 10:37:17 +1000) are available in the git

Re: [PATCH] drm/amd/pp: Connect display_clock_voltage_request to a function pointer

2018-05-29 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx on behalf of mikita.lip...@amd.com Sent: Tuesday, May 29, 2018 5:51 PM To: Zhu, Rex; Deucher, Alexander; amd-gfx@lists.freedesktop.org Cc: Lipski, Mikita; Wu, Hersen; Wentland, Harry Subject: [PATCH] drm/amd/pp: Connect

Re: [PATCH] drm/amdgpu: detect buffer overflow and avoid unnecessary dereference

2018-05-29 Thread Alex Deucher
On Tue, May 29, 2018 at 6:17 AM, Evan Quan wrote: > Change-Id: Id7dcf60acf524f290460d2ffe3f1f5f46354 > Signed-off-by: Evan Quan Please include a patch description as well. One comment below. > --- > drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +-- > 1 file changed, 9

Re: [PATCH] drm/amd/display: Fix wrong latency assignment for VEGA clock levels

2018-05-29 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx on behalf of Harry Wentland Sent: Tuesday, May 29, 2018 10:03 AM To: amd-gfx@lists.freedesktop.org Cc: Wentland, Harry Subject: [PATCH] drm/amd/display: Fix wrong latency assignment for VEGA clock levels Also drop

Re: [PATCH] drm/amd/pp: Add cases for getting phys and disp clks for SMU10

2018-05-29 Thread Deucher, Alexander
Acked-by: Alex Deucher From: amd-gfx on behalf of mikita.lip...@amd.com Sent: Monday, May 28, 2018 11:36:17 AM To: Zhu, Rex; Deucher, Alexander; amd-gfx@lists.freedesktop.org Cc: Lipski, Mikita; Wu, Hersen; Wentland, Harry Subject: [PATCH] drm/amd/pp: Add

[PATCH] drm/amd/display: Fix wrong latency assignment for VEGA clock levels

2018-05-29 Thread Harry Wentland
Also drop wrong 10kHz comment Fixes: drm/amd/display: Implement dm_pp_get_clock_levels_by_type_with_latency Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH v3] drm/amd/display: Fix BUG_ON during CRTC atomic check update

2018-05-29 Thread sunpeng.li
From: "Leo (Sunpeng) Li" For cases where the CRTC is inactive (DPMS off), where a modeset is not required, yet the CRTC is still in the atomic state, we should not attempt to update anything on it. Previously, we were relying on the modereset_required() helper to check the above condition.

Re: [PATCH] drm/amdgpu: To get gds, gws and oa from adev->gds

2018-05-29 Thread Christian König
Am 29.05.2018 um 11:17 schrieb Emily Deng: As now enabled per vm bo feature, the user mode driver won't supply the bo_list generally, for this case, the gdb_base, gds_size, gws_base, gws_size and oa_base, oa_size won't be set. Signed-off-by: Emily Deng Reviewed-by: Christian König ---

Re: [PATCH] drm/amdgpu: To get gds, gws and oa from adev->gds

2018-05-29 Thread zhoucm1
On 2018年05月29日 17:17, Emily Deng wrote: As now enabled per vm bo feature, the user mode driver won't supply the bo_list generally, for this case, the gdb_base, gds_size, gws_base, gws_size and oa_base, oa_size won't be set. Signed-off-by: Emily Deng ---

[PATCH] drm/amdgpu: detect buffer overflow and avoid unnecessary dereference

2018-05-29 Thread Evan Quan
Change-Id: Id7dcf60acf524f290460d2ffe3f1f5f46354 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index

Re: [PATCH] drm/amdgpu: typo fix for vega20 cg flags

2018-05-29 Thread Huang Rui
On Mon, May 28, 2018 at 09:24:35AM +0800, Evan Quan wrote: > Change-Id: If807cc3e9e9e10f8b132095c0a7b537be6285107 Add a description as we heads up. With that fixed, Reviewed-by: Huang Rui > Signed-off-by: Evan Quan > --- > drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- > 1 file changed, 1

Re: [PATCH 2/2] drm/amd/powerplay: bug fixs for getsmuclockinfo

2018-05-29 Thread Huang Rui
On Mon, May 28, 2018 at 09:11:04AM +0800, Evan Quan wrote: > The .syspll_id and .dfsdid are not initialzed correctly. And > le32_to_cpu transfer is needed on the output. > > Signed-off-by: Evan Quan > Reviewed-by: Huang Rui > Change-Id: I491e70b276554f38e1a296970892347474814e75 > --- >

Re: [PATCH 1/2] drm/amdgpu: correct SMU11 SYSPLL0 clock id values

2018-05-29 Thread Huang Rui
Looks good except a few comments. On Mon, May 28, 2018 at 09:11:03AM +0800, Evan Quan wrote: > Change-Id: I8dfafcce9e4ed6dabb7025a5a822d1135de6cb8a Evan, Rex, we'd better add a description for the commit, because community don't like the empty commit log for the patches. Actually, we got pinged

[PATCH] drm/amdgpu: To get gds, gws and oa from adev->gds

2018-05-29 Thread Emily Deng
As now enabled per vm bo feature, the user mode driver won't supply the bo_list generally, for this case, the gdb_base, gds_size, gws_base, gws_size and oa_base, oa_size won't be set. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 38 -- 1

Re: [PATCH] drm/amdgpu: To get gds, gws and oa from adev->gds.

2018-05-29 Thread Christian König
Am 29.05.2018 um 10:06 schrieb Emily Deng: As now enabled per vm bo feature, the user mode driver won't supply the bo_list generally, for this case, the gdb_base, gds_size, gws_base, gws_size and oa_base, oa_size won't be set. Good catch, a few minor notes below. Signed-off-by: Emily Deng

RE: [PATCH] drm/amdgpu: To get gds, gws and oa from adev->gds.

2018-05-29 Thread Deng, Emily
Thanks Christian, will modify the patch as you suggest. Best Wishes, Emily Deng > -Original Message- > From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] > Sent: Tuesday, May 29, 2018 5:01 PM > To: Deng, Emily ; amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH]

[PATCH] drm/amdgpu: To get gds, gws and oa from adev->gds.

2018-05-29 Thread Emily Deng
As now enabled per vm bo feature, the user mode driver won't supply the bo_list generally, for this case, the gdb_base, gds_size, gws_base, gws_size and oa_base, oa_size won't be set. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 44 -- 1

Re: [PATCH v2] drm/amd/display: Fix BUG_ON during CRTC atomic check update

2018-05-29 Thread Michel Dänzer
On 2018-05-28 08:00 PM, sunpeng...@amd.com wrote: > From: "Leo (Sunpeng) Li" > > For cases where the CRTC is inactive (DPMS off), where a modeset is not > required, yet the CRTC is still in the atomic state, we should not > attempt to update anything on it. > > Previously, we were relying on