RE: [PATCH 2/2] drm/amdgpu: enable DPM_FLAG_MAY_SKIP_RESUME and DPM_FLAG_SMART_SUSPEND flags

2021-02-02 Thread Lazar, Lijo
[AMD Public Use] -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Tuesday, February 2, 2021 10:48 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH 2/2] drm/amdgpu: enable DPM_FLAG_MAY_SKIP_RESUME and DPM_FLAG_SMART_SUSPEND flags Once the devi

RE: [PATCH 2/2] drm/amdgpu: enable DPM_FLAG_MAY_SKIP_RESUME and DPM_FLAG_SMART_SUSPEND flags

2021-02-02 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only] Series is acked-by: Evan Quan -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Wednesday, February 3, 2021 1:18 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH 2/2] drm/amdgpu: enable DPM_F

RE: [PATCH] drm/amdgpu/smu12: fix power reporting on renoir

2021-02-02 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Evan Quan -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Wednesday, February 3, 2021 1:17 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH] drm/amdgpu/smu12: fix power reporti

[PATCH] drm/amdgpu/gmc9: fix mmhub client mapping for arcturus

2021-02-02 Thread Alex Deucher
The hw interface changed on arcturus so the old numbering scheme doesn't work. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 66 +-- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/

Re: [PATCH] drm/amdgpu/smu12: fix power reporting on renoir

2021-02-02 Thread Nirmoy
Acked-by: Nirmoy Das On 2/2/21 6:16 PM, Alex Deucher wrote: Align with Vangogh. Bug: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1467&data=04%7C01%7Cnirmoy.das%40amd.com%7C58ce04c3aa7c49734cd008d8c79e57d2%7C3dd8961fe4884e

[PATCH 2/2] drm/amdgpu: enable DPM_FLAG_MAY_SKIP_RESUME and DPM_FLAG_SMART_SUSPEND flags

2021-02-02 Thread Alex Deucher
Once the device has runtime suspended, we don't need to power it back up again for system suspend. Likewise for resume, we don't to power up the device again on resume only to power it back off again via runtime pm because it's still idle. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amd

[PATCH 1/2] drm/amdgpu: add a dev_pm_ops prepare callback (v2)

2021-02-02 Thread Alex Deucher
as per: https://www.kernel.org/doc/html/latest/driver-api/pm/devices.html The prepare callback is required to support the DPM_FLAG_SMART_SUSPEND driver flag. This allows runtime pm to auto complete when the system goes into suspend avoiding a wake up on suspend and on resume. Apply this for hybri

[PATCH] drm/amdgpu/smu12: fix power reporting on renoir

2021-02-02 Thread Alex Deucher
Align with Vangogh. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1467 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c b/drivers/gpu/drm/amd

Re: [PATCH] drm/amdgpu: Prevent shift wrapping in amdgpu_read_mask()

2021-02-02 Thread Alex Deucher
On Tue, Feb 2, 2021 at 12:57 AM Dan Carpenter wrote: > > If the user passes a "level" value which is higher than 31 then that > leads to shift wrapping. The undefined behavior will lead to a > syzkaller stack dump. > > Fixes: 5632708f4452 ("drm/amd/powerplay: add dpm force multiple levels on > c

Re: [PATCH] drm/amdgpu: Fix a false positive when pin non-VRAM memory

2021-02-02 Thread Felix Kuehling
Am 2021-02-02 um 11:17 a.m. schrieb Alex Deucher: > On Fri, Jan 29, 2021 at 8:00 PM xinhui pan wrote: >> Flag TTM_PL_FLAG_CONTIGUOUS is only valid for VRAM domain. So fix the >> false positive by checking memory type too. >> >> Suggested-by: Felix Kuehling >> Acked-by: Christian König >> Signed-

Re: [PATCH] amd/display: remove unneeded variable: "pattern"

2021-02-02 Thread Alex Deucher
On Tue, Feb 2, 2021 at 8:31 AM Bernard Zhao wrote: > > Remove unneeded variable: "pattern". > > Signed-off-by: Bernard Zhao Applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/d

Re: [PATCH] drm/amdgpu: Fix a false positive when pin non-VRAM memory

2021-02-02 Thread Alex Deucher
On Fri, Jan 29, 2021 at 8:00 PM xinhui pan wrote: > > Flag TTM_PL_FLAG_CONTIGUOUS is only valid for VRAM domain. So fix the > false positive by checking memory type too. > > Suggested-by: Felix Kuehling > Acked-by: Christian König > Signed-off-by: xinhui pan @Kuehling, Felix I presume this fix

[PATCH 1/5] drm/amdgpu: add asic callback for querying video codec info (v3)

2021-02-02 Thread Alex Deucher
This will be used by a new INFO ioctl query to fetch the decode and encode capabilities from the kernel driver rather than hardcoding them in mesa. This gives us more fine grained control of capabilities using information that is only availabl in the kernel (e.g., platform limitations or bandwidth

[PATCH 3/5] drm/amdgpu: add INFO ioctl support for querying video caps (v4)

2021-02-02 Thread Alex Deucher
We currently hardcode these in mesa, but querying them from the kernel makes more sense since there may be board specific limitations that the kernel driver is better suited to determining. Userpace patches that use this interface: https://gitlab.freedesktop.org/leoliu/drm/-/commits/info_video_cap

[PATCH 4/5] drm/amdgpu: bump driver version for new video codec INFO ioctl query

2021-02-02 Thread Alex Deucher
So mesa can check when to query the kernel vs use hardcoded codec bandwidth data. Reviewed-by: Leo Liu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers

[PATCH 2/5] drm/amdgpu: add video decode/encode cap tables and asic callbacks (v3)

2021-02-02 Thread Alex Deucher
For each asic family. Will be used to populate tables for the new INFO ioctl query. v2: add max_pixels_per_frame to handle the portrait case v3: fix copy paste typos Reviewed-by: Leo Liu (v1) Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/cik.c | 75 ++ drivers/gpu/drm/

[PATCH 5/5] drm/amdgpu/codec: drop the internal codec index

2021-02-02 Thread Alex Deucher
And just use the ioctl index. They are the same. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 9 - drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 16 - drivers/gpu/drm/amd/amdgpu/cik.c| 12 --- drivers/gpu/drm/amd/amdgpu/nv.c | 36 +++

[PATCH 2/4] drm/amdgpu: enable only one high prio compute queue

2021-02-02 Thread Nirmoy Das
For high priority compute to work properly we need to enable wave limiting on gfx pipe. Wave limiting is done through writing into mmSPI_WCL_PIPE_PERCENT_GFX register. Enable only one high priority compute queue to avoid race condition between multiple high priority compute queues writing that regi

[PATCH 3/4] drm/amdgpu: add wave limit functionality for gfx8,9

2021-02-02 Thread Nirmoy Das
Wave limiting can be use to load balance high priority compute jobs along with gfx jobs. When enabled, this will reserve ~75% of waves for compute jobs. We do not need this from gfx10 onwards because >=gfx10 has asynchronous compute tunneling to replace wave limit requirement. Signed-off-by: Nirm

[PATCH 4/4] drm/amdgpu: enable gfx wave limiting for high priority compute jobs

2021-02-02 Thread Nirmoy Das
Enable gfx wave limiting for gfx jobs before pushing high priority compute jobs so that high priority compute jobs gets more resources to finish early. v2: use ring priority instead of job priority. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Reviewed-by: Alex Deucher --- drivers/g

[PATCH 1/4] drm/amdgpu: cleanup struct amdgpu_ring

2021-02-02 Thread Nirmoy Das
This patch consist of below related changes: 1 Rename ring->priority to ring->hw_prio. 2 Assign correct hardware ring priority. 3 Remove ring->priority_mutex as ring priority remains unchanged after initialization. 4 Remove unused ring->num_jobs. v3: remove ring->num_jobs. v2: remove ring->prio

Re: [PATCH 0/3] Experimental freesync video mode optimization

2021-02-02 Thread Daniel Vetter
On Fri, Jan 22, 2021 at 10:16:45AM -0500, Alex Deucher wrote: > On Fri, Jan 22, 2021 at 4:43 AM Daniel Vetter wrote: > > > > On Fri, Jan 22, 2021 at 10:32:48AM +0200, Pekka Paalanen wrote: > > > On Tue, 19 Jan 2021 10:50:26 -0500 > > > Aurabindo Pillai wrote: > > > > > > > Changes in V5 > > > > =

Re: [PATCH v4 01/14] drm/ttm: Remap all page faults to per process dummy page.

2021-02-02 Thread Daniel Vetter
On Wed, Jan 27, 2021 at 09:29:41AM -0500, Andrey Grodzovsky wrote: > Hey Daniel, just a ping. Was on vacations last week. > Andrey > > On 1/25/21 10:28 AM, Andrey Grodzovsky wrote: > > > > On 1/19/21 8:56 AM, Daniel Vetter wrote: > > > On Mon, Jan 18, 2021 at 04:01:10PM -0500, Andrey Grodzovsky

[PATCH] drm/amdgpu: convert sysfs sprintf/snprintf family to sysfs_emit

2021-02-02 Thread Jiapeng Chong
Fix the following coccicheck warning: ./drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:220:8-16: WARNING: use scnprintf or sprintf. ./drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:249:8-16: WARNING: use scnprintf or sprintf. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/amd/am

[PATCH] amd/display: remove unneeded variable: "pattern"

2021-02-02 Thread Bernard Zhao
Remove unneeded variable: "pattern". Signed-off-by: Bernard Zhao --- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index

Re: [PATCH] drm/amd/pm: Disable GFXOFF when GFX DPM or PG disabled

2021-02-02 Thread Huang Rui
On Tue, Feb 02, 2021 at 08:04:43PM +0800, Su, Jinzhou (Joe) wrote: > Check GFX DPM and PG bit before enable GFXOFF on Vangogh > smu post init. > > Signed-off-by: Jinzhou Su Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 14 ++ > 1 file changed, 1

[PATCH] drm/amd/pm: Disable GFXOFF when GFX DPM or PG disabled

2021-02-02 Thread Jinzhou Su
Check GFX DPM and PG bit before enable GFXOFF on Vangogh smu post init. Signed-off-by: Jinzhou Su --- drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/g

Re: [PATCH 1/4] drm/amdgpu: cleanup struct amdgpu_ring

2021-02-02 Thread Nirmoy
On 2/1/21 10:34 PM, Alex Deucher wrote: On Mon, Feb 1, 2021 at 11:13 AM Christian König wrote: Am 01.02.21 um 16:51 schrieb Nirmoy Das: This patch consist of below related changes: 1 Rename ring->priority to ring->hw_prio. 2 Assign correct hardware ring priority. 3 Remove ring->priority_mute

Re: [PATCH 3/4] drm/amdgpu: add INFO ioctl support for querying video caps (v3)

2021-02-02 Thread Christian König
Am 01.02.21 um 17:56 schrieb Alex Deucher: We currently hardcode these in mesa, but querying them from the kernel makes more sense since there may be board specific limitations that the kernel driver is better suited to determining. Userpace patches that use this interface: https://gitlab.freede

Re: [PATCH 2/4] drm/amdgpu: add video decode/encode cap tables and asic callbacks (v2)

2021-02-02 Thread Christian König
Am 01.02.21 um 17:56 schrieb Alex Deucher: For each asic family. Will be used to populate tables for the new INFO ioctl query. v2: add max_pixels_per_frame to handle the portrait case Reviewed-by: Leo Liu (v1) Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/cik.c | 75 +++