[PATCH v2] drm/amdgpu: Fix VRAM BO evicition issue on resume

2022-11-15 Thread Arunpravin Paneer Selvam
This patch fixes the VRAM BO eviction issue during resume when playing the steam game cuphead. During psp resume, it requests a VRAM buffer of size 10240 KiB for the trusted memory region, as part of this memory allocation we are trying to evict few user buffers from VRAM to SYSTEM domain, the evi

Re: [pull] amdgpu, amdkfd, radeon drm-next-6.2

2022-11-15 Thread Dave Airlie
arm32 build fails /home/airlied/devel/kernel/dim/src/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c: In function ‘disable_dangling_plane’: /home/airlied/devel/kernel/dim/src/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:1134:46: error: ‘const struct timing_generator_funcs’ has no member n

RE: [PATCH v2 1/4] drm/amdgpu/mst: Stop ignoring error codes and deadlocking

2022-11-15 Thread Lin, Wayne
[Public] All the patch set looks good to me. Feel free to add: Reviewed-by: Wayne Lin Again, thank you Lyude for helping on this!!! Regards, Wayne > -Original Message- > From: Lyude Paul > Sent: Tuesday, November 15, 2022 6:18 AM > To: amd-gfx@lists.freedesktop.org > Cc: Wentland, Harr

RE: [PATCH 1/2] drm/amdgpu/mst: Stop ignoring error codes and deadlocking

2022-11-15 Thread Lin, Wayne
[Public] > -Original Message- > From: Lyude Paul > Sent: Tuesday, November 15, 2022 5:55 AM > To: Lin, Wayne ; amd-gfx@lists.freedesktop.org > Cc: Wentland, Harry ; sta...@vger.kernel.org; > Li, Sun peng (Leo) ; Siqueira, Rodrigo > ; Deucher, Alexander > ; Koenig, Christian > ; Pan, Xin

Re: [bug report] drm/amdkfd: Fix the warning of array-index-out-of-bounds

2022-11-15 Thread Ma, Jun
Hi Dan, Thanks for catching this. I'll check it and post a fix patch. Regards, Ma Jun On 11/15/2022 9:00 PM, Dan Carpenter wrote: > [ Ugh... My email messed up and I have to Resend all my emails for the > past two weeks. -dan ] > > Hello Ma Jun, > > The patch c0cc999f3c32: "drm/amdkfd: Fix

[linux-next:master] BUILD REGRESSION 3c1f24109dfc4fb1a3730ed237e50183c6bb26b3

2022-11-15 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 3c1f24109dfc4fb1a3730ed237e50183c6bb26b3 Add linux-next specific files for 20221115 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202211041320.coq8eelj-...@intel.com https

[PATCH] drm/amd/display: add FB_DAMAGE_CLIPS support

2022-11-15 Thread Hamza Mahfooz
Currently, userspace doesn't have a way to communicate selective updates to displays. So, enable support for FB_DAMAGE_CLIPS for DCN ASICs newer than DCN301, convert DRM damage clips to dc dirty rectangles and fill them into dirty_rects in fill_dc_dirty_rects(). Signed-off-by: Hamza Mahfooz ---

RE: [PATCH] drm/amd/display: Align dcn314_smu logging with other DCNs

2022-11-15 Thread Rizvi, Saaem
[Public] Reviewed-by: Saaem Rizvi From: Limonciello, Mario Sent: Tuesday, November 15, 2022 1:02 PM To: Li, Roman; amd-gfx@lists.freedesktop.org; Deucher, Alexander

Re: [PATCH 2/4] drm/amdgpu: fix userptr HMM range handling v2

2022-11-15 Thread Felix Kuehling
On 2022-11-15 08:38, Christian König wrote: The basic problem here is that it's not allowed to page fault while holding the reservation lock. So it can happen that multiple processes try to validate an userptr at the same time. Work around that by putting the HMM range object into the mutex pro

RE: [PATCH] drm/amd/display: Align dcn314_smu logging with other DCNs

2022-11-15 Thread Limonciello, Mario
[Public] > -Original Message- > From: Li, Roman > Sent: Tuesday, November 15, 2022 11:52 > To: Limonciello, Mario ; amd- > g...@lists.freedesktop.org; Deucher, Alexander > ; Wentland, Harry > ; Rizvi, Saaem > Subject: RE: [PATCH] drm/amd/display: Align dcn314_smu logging with other > D

RE: [PATCH] drm/amd/display: Align dcn314_smu logging with other DCNs

2022-11-15 Thread Li, Roman
Hi Mario, Thanks for your comments. I replied inline. > -Original Message- > From: Limonciello, Mario > Sent: Monday, November 14, 2022 4:16 PM > To: Li, Roman ; amd-gfx@lists.freedesktop.org; > Deucher, Alexander ; Wentland, Harry > ; Rizvi, Saaem > Cc: Li, Roman > Subject: RE: [PATC

Re: [PATCH 2/4] drm/amdgpu: fix userptr HMM range handling v2

2022-11-15 Thread Christian König
FYI Am 15.11.22 um 14:38 schrieb Christian König: The basic problem here is that it's not allowed to page fault while holding the reservation lock. So it can happen that multiple processes try to validate an userptr at the same time. Work around that by putting the HMM range object into the mu

Re: [PATCH 2/4] drm/amdgpu: fix userptr HMM range handling

2022-11-15 Thread Felix Kuehling
Am 2022-11-15 um 08:37 schrieb Christian König: Am 10.11.22 um 22:55 schrieb Felix Kuehling: Am 2022-11-10 um 08:00 schrieb Christian König: The basic problem here is that it's not allowed to page fault while holding the reservation lock. So it can happen that multiple processes try to valida

RE: [PATCH] drm/amd/pm: Fix output of pp_od_clk_voltage

2022-11-15 Thread Jonatas Esteves
> > [AMD Official Use Only - General] > > > > > -Original Message- > > From: amd-gfx On Behalf Of > > Jonatas Esteves > > Sent: Tuesday, November 15, 2022 7:13 AM > > To: amd-gfx@lists.freedesktop.org > > Cc: Jonatas Esteves > > Subject: [PATCH] drm/amd/pm: Fix output of pp_od_clk_voltage

Re: [PATCH] amdgpu/pm: prevent array underflow in vega20_odn_edit_dpm_table()

2022-11-15 Thread Alex Deucher
Applied. Thanks! Alex On Tue, Nov 15, 2022 at 7:57 AM Dan Carpenter wrote: > > In the PP_OD_EDIT_VDDC_CURVE case the "input_index" variable is capped at > 2 but not checked for negative values so it results in an out of bounds > read. This value comes from the user via sysfs. > > Fixes: d5bf26

Re: [PATCH] [next] drm/amdgpu: Replace one-elements array with flex-array members

2022-11-15 Thread Alex Deucher
Applied. Thanks. Alex On Sun, Nov 13, 2022 at 2:44 AM Paulo Miguel Almeida wrote: > > One-element arrays are deprecated, and we are replacing them with > flexible array members instead. So, replace one-element array with > flexible-array member in structs ATOM_I2C_VOLTAGE_OBJECT_V3, > ATOM_ASIC

Re: [PATCH] drm/amdgpu: use the last IB as gang leader v2

2022-11-15 Thread Christian König
I wanted to push this directly to drm-misc-fixes. But going to add one in case someone tries to backport the gang submit changes. Regards, Christian. Am 15.11.22 um 15:10 schrieb Alex Deucher: Would be good to add a Fixes tag. Alex On Tue, Nov 15, 2022 at 9:09 AM Alex Deucher wrote: Revi

Re: [PATCH] drm/amdgpu: use the last IB as gang leader v2

2022-11-15 Thread Alex Deucher
Would be good to add a Fixes tag. Alex On Tue, Nov 15, 2022 at 9:09 AM Alex Deucher wrote: > > Reviewed-by: Alex Deucher > > On Tue, Nov 15, 2022 at 4:44 AM Christian König > wrote: > > > > Am 15.11.22 um 10:42 schrieb Christian König: > > > It turned out that not the last IB specified is the

Re: [PATCH] drm/amdgpu: use the last IB as gang leader v2

2022-11-15 Thread Alex Deucher
Reviewed-by: Alex Deucher On Tue, Nov 15, 2022 at 4:44 AM Christian König wrote: > > Am 15.11.22 um 10:42 schrieb Christian König: > > It turned out that not the last IB specified is the gang leader, > > but instead the last job allocated. > > > > This is a bit unfortunate and not very intuitive

[bug report] drm/amdkfd: Fix the warning of array-index-out-of-bounds

2022-11-15 Thread Dan Carpenter
[ Ugh... My email messed up and I have to Resend all my emails for the past two weeks. -dan ] Hello Ma Jun, The patch c0cc999f3c32: "drm/amdkfd: Fix the warning of array-index-out-of-bounds" from Nov 2, 2022, leads to the following Smatch static checker warning: drivers/gpu/drm/amd/am

[PATCH] amdgpu/pm: prevent array underflow in vega20_odn_edit_dpm_table()

2022-11-15 Thread Dan Carpenter
In the PP_OD_EDIT_VDDC_CURVE case the "input_index" variable is capped at 2 but not checked for negative values so it results in an out of bounds read. This value comes from the user via sysfs. Fixes: d5bf26539494 ("drm/amd/powerplay: added vega20 overdrive support V3") Signed-off-by: Dan Carpent

Re: [PATCH] drm/amdgpu: use the last IB as gang leader v2

2022-11-15 Thread Timur Kristóf
I can confirm this patch solves an issue with gang submit. It removes the necessity to sort IBs by IP type in user space. Now only the IP type of the last IB matters, as was intended. Tested-by: Timur Kristóf Acked-by: Timur Kristóf On Tue, 2022-11-15 at 10:43 +0100, Christian König wrote: > Am

[PATCH 4/4] drm/amdgpu: cleanup amdgpu_hmm_range_get_pages

2022-11-15 Thread Christian König
Remove unused parameters and cleanup dead code. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c | 14 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.h | 7 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |

[PATCH 3/4] drm/amdgpu: rename the files for HMM handling

2022-11-15 Thread Christian König
Clean that up a bit, no functional change. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 7 ++

[PATCH 2/4] drm/amdgpu: fix userptr HMM range handling v2

2022-11-15 Thread Christian König
The basic problem here is that it's not allowed to page fault while holding the reservation lock. So it can happen that multiple processes try to validate an userptr at the same time. Work around that by putting the HMM range object into the mutex protected bo list for now. v2: make sure range i

[PATCH 1/4] drm/amdgpu: always register an MMU notifier for userptr

2022-11-15 Thread Christian König
Since switching to HMM we always need that because we no longer grab references to the pages. Signed-off-by: Christian König Reviewed-by: Alex Deucher Acked-by: Felix Kuehling CC: sta...@vger.kernel.org --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 +++- 1 file changed, 3 insertions(+),

Re: [PATCH 2/4] drm/amdgpu: fix userptr HMM range handling

2022-11-15 Thread Christian König
Am 10.11.22 um 22:55 schrieb Felix Kuehling: Am 2022-11-10 um 08:00 schrieb Christian König: The basic problem here is that it's not allowed to page fault while holding the reservation lock. So it can happen that multiple processes try to validate an userptr at the same time. Work around that

RE: [PATCH] drm/amdgpu: disable BACO support on more cards

2022-11-15 Thread Chen, Guchun
Yes, Alex, I am trying to get the root cause for this. Regards, Guchun -Original Message- From: Alex Deucher Sent: Friday, November 11, 2022 11:38 PM To: Chen, Guchun Cc: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Zhang, Hawking ; Lazar, Lijo ; Quan, Evan Subject: Re: [PATC

Re: [PATCH] drm/amdgpu: use the last IB as gang leader v2

2022-11-15 Thread Christian König
Am 15.11.22 um 10:42 schrieb Christian König: It turned out that not the last IB specified is the gang leader, but instead the last job allocated. This is a bit unfortunate and not very intuitive for the CS interface, so try to fix this. Alex could you take a look at this? I would really like

[PATCH] drm/amdgpu: use the last IB as gang leader v2

2022-11-15 Thread Christian König
It turned out that not the last IB specified is the gang leader, but instead the last job allocated. This is a bit unfortunate and not very intuitive for the CS interface, so try to fix this. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 23 ---