Re: [PATCH v1 4/6] dma-buf: Acquire wait-wound context on attachment

2022-07-14 Thread Christian König
Am 15.07.22 um 02:52 schrieb Dmitry Osipenko: Intel i915 GPU driver uses wait-wound mutex to lock multiple GEMs on the attachment to the i915 dma-buf. In order to let all drivers utilize shared wait-wound context during attachment in a general way, make dma-buf core to acquire the ww context inte

Re: [PATCH] drm/ttm: fix missing NULL check in ttm_device_swapout

2022-07-14 Thread Christian König
Am 14.07.22 um 23:58 schrieb Felix Kuehling: Backport of Christian's patch 81b0d0e4f811 to amd-staging-drm-next. This branch may be nearly obsolete, but this patch may still be worth applying as it can serve as a template for backports to some release branches. It fixes intermittent kernel oopses

Re: [PATCH] drm/amdkfd: Remove Align VRAM allocations to 1MB on APU ASIC

2022-07-14 Thread Kuehling, Felix
[AMD Official Use Only - General] As a compromise we are considering a change that restores the old allocation behaviour, keeping the more conservative estimate only for the available-memory API. Regards, Felix From: Guo, Shikai Sent: Thursday, July 14, 2022

RE: [PATCH] drm/amdkfd: Remove Align VRAM allocations to 1MB on APU ASIC

2022-07-14 Thread Guo, Shikai
[AMD Official Use Only - General] Thanks Felix comment, I will further debug this issue. -Original Message- From: Guo, Shikai Sent: Friday, July 15, 2022 11:21 AM To: Kuehling, Felix ; amd-gfx@lists.freedesktop.org Cc: Phillips, Daniel ; Ji, Ruili ; Liu, Aaron Subject: RE: [PATCH] drm/

RE: [PATCH] drm/amdkfd: Remove Align VRAM allocations to 1MB on APU ASIC

2022-07-14 Thread Guo, Shikai
[AMD Official Use Only - General] This Felix comment, I will further debug this issue. -Original Message- From: Kuehling, Felix Sent: Wednesday, July 13, 2022 10:17 PM To: Guo, Shikai ; amd-gfx@lists.freedesktop.org Cc: Phillips, Daniel ; Ji, Ruili ; Liu, Aaron Subject: Re: [PATCH] dr

Re: [PATCH 01/12] drm/amdgpu: Write masked value to control register

2022-07-14 Thread André Almeida
Às 13:44 de 14/07/22, Maíra Canal escreveu: > On the dce_v6_0 and dce_v8_0 hpd tear down callback, the tmp variable > should be written into the control register instead of 0. > > Fixes: b00861b9 ("drm/amd/amdgpu: port of DCE v6 to new headers (v3)") > Fixes: 2285b91c ("drm/amdgpu/dce8: simplify h

Re: Linux 5.19-rc6

2022-07-14 Thread Russell Currey
Hi Linus, On Wed, 2022-07-13 at 14:32 -0700, Linus Torvalds wrote: > On Wed, Jul 13, 2022 at 2:01 PM Alex Deucher > wrote: > > > > If you want to apply Guenter's patch original patch: > > https://patchwork.freedesktop.org/patch/490184/ > > That's fine with me. > > Honestly, by this time I feel

Re: [PATCH v2 05/29] drm/nouveau: Don't register backlight when another backlight should be used

2022-07-14 Thread Lyude Paul
Reviewed-by: Lyude Paul You also have permission to push this to drm-misc-whatever On Tue, 2022-07-12 at 21:38 +0200, Hans de Goede wrote: > Before this commit when we want userspace to use the acpi_video backlight > device we register both the GPU's native backlight device and acpi_video's > fi

[pull] amdgpu, amdkfd, radeon drm-next-5.20

2022-07-14 Thread Alex Deucher
Hi Dave, Daniel, A few more new things for 5.20. The following changes since commit c5da61cf5bab30059f22ea368702c445ee87171a: drm/amdgpu/display: add missing FP_START/END checks dcn32_clk_mgr.c (2022-06-30 19:35:21 -0400) are available in the Git repository at: https://gitlab.freedesktop.

[PATCH] drm/amdgpu: align between libdrm and drm api

2022-07-14 Thread Ruijing Dong
define HW_IP_VCN_UNIFIED the same as HW_IP_VCN_ENC Signed-off-by: Ruijing Dong --- include/uapi/drm/amdgpu_drm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h index 18d3246d636e..fe33db8441bc 100644 --- a/include/uapi/drm/amdgpu

Re: [PATCH v2 00/29] drm/kms: Stop registering multiple /sys/class/backlight devs for a single display

2022-07-14 Thread Lyude Paul
I assume you're probably good on review for the non-nouveau stuff, but if you end up needing any help with that feel free to poke me! On Tue, 2022-07-12 at 21:38 +0200, Hans de Goede wrote: > Hi All, > > As mentioned in my RFC titled "drm/kms: control display brightness through > drm_connector pr

[PATCH] drm/ttm: fix missing NULL check in ttm_device_swapout

2022-07-14 Thread Felix Kuehling
Backport of Christian's patch 81b0d0e4f811 to amd-staging-drm-next. This branch may be nearly obsolete, but this patch may still be worth applying as it can serve as a template for backports to some release branches. It fixes intermittent kernel oopses when memory is severely overcommitted. Signed

Re: [PATCH] drm/amd/display: Add missing hard-float compile flags for PPC64 builds

2022-07-14 Thread Guenter Roeck
On 7/14/22 11:49, Melissa Wen wrote: O 07/13, Alex Deucher wrote: On Wed, Jul 13, 2022 at 7:09 PM Guenter Roeck wrote: On Wed, Jul 13, 2022 at 05:20:40PM -0400, Alex Deucher wrote: The problem is not the FPU operations, but the fact that soft-float and hard-float compiled code is linked tog

Re: [PATCH v2 27/29] ACPI: video: Drop Clevo/TUXEDO NL5xRU and NL5xNU acpi_backlight=native quirks

2022-07-14 Thread Hans de Goede
Hi, On 7/13/22 19:21, Limonciello, Mario wrote: > [Public] > > > >> -Original Message- >> From: Werner Sembach >> Sent: Wednesday, July 13, 2022 12:08 >> To: Hans de Goede ; Ben Skeggs >> ; Karol Herbst ; Lyude >> ; Daniel Dadap ; Maarten >> Lankhorst ; Maxime Ripard >> ; Thomas Zimmer

Re: [PATCH 09/10] drm/amdgpu: add gang submit backend

2022-07-14 Thread Luben Tuikov
Inlined: On 2022-07-14 06:39, Christian König wrote: > Allows submitting jobs as gang which needs to run on multiple > engines at the same time. > > Basic idea is that we have a global gang submit fence representing when the > gang leader is finally pushed to run on the hardware last. > > Jobs s

Re: [PATCH 01/12] drm/amdgpu: Write masked value to control register

2022-07-14 Thread André Almeida
Às 16:14 de 14/07/22, Alex Deucher escreveu: > On Thu, Jul 14, 2022 at 3:05 PM André Almeida wrote: >> >> Hi Maíra, >> >> Thank you for your patch, >> >> Às 13:44 de 14/07/22, Maíra Canal escreveu: >>> On the dce_v6_0 and dce_v8_0 hpd tear down callback, the tmp variable >>> should be written into

[PATCH v2 2/2] Documentation/gpu: Add GFXOFF section

2022-07-14 Thread André Almeida
Add a GFXOFF section at "GPU Power Controls" file, explaining what it is and how userspace can interact with it. Signed-off-by: André Almeida --- Changes from v1: file created Documentation/gpu/amdgpu/thermal.rst | 41 1 file changed, 41 insertions(+) diff --git a/

[PATCH v2 1/2] drm/amd/debugfs: Expose GFXOFF state to userspace

2022-07-14 Thread André Almeida
GFXOFF has two different "state" values: one to define if the GPU is allowed/disallowed to enter GFXOFF, usually called state; and another one to define if currently GFXOFF is being used, usually called status. Even when GFXOFF is allowed, GPU firmware can decide to not used it accordingly to the G

Re: [PATCH 01/12] drm/amdgpu: Write masked value to control register

2022-07-14 Thread Alex Deucher
On Thu, Jul 14, 2022 at 3:05 PM André Almeida wrote: > > Hi Maíra, > > Thank you for your patch, > > Às 13:44 de 14/07/22, Maíra Canal escreveu: > > On the dce_v6_0 and dce_v8_0 hpd tear down callback, the tmp variable > > should be written into the control register instead of 0. > > > > Why? I do

Re: [PATCH 10/10] drm/amdgpu: add gang submit frontend v2

2022-07-14 Thread Andrey Grodzovsky
Acked-by: Andrey Grodzovsky Andrey On 2022-07-14 06:39, Christian König wrote: Allows submitting jobs as gang which needs to run on multiple engines at the same time. All members of the gang get the same implicit, explicit and VM dependencies. So no gang member will start running until everyt

Re: [PATCH 02/10] drm/amdgpu: Protect the amdgpu_bo_list list with a mutex v2

2022-07-14 Thread Luben Tuikov
Tested-by: Luben Tuikov This passes all IGT amd_cs_nop tests. Regards, Luben On 2022-07-14 06:38, Christian König wrote: > From: Luben Tuikov > > Protect the struct amdgpu_bo_list with a mutex. This is used during command > submission in order to avoid buffer object corruption as recorded in

Re: [PATCH 01/12] drm/amdgpu: Write masked value to control register

2022-07-14 Thread André Almeida
Hi Maíra, Thank you for your patch, Às 13:44 de 14/07/22, Maíra Canal escreveu: > On the dce_v6_0 and dce_v8_0 hpd tear down callback, the tmp variable > should be written into the control register instead of 0. > Why? I do see that tmp was unused before your patch, but why should we write it i

Re: Linux 5.19-rc6

2022-07-14 Thread Guenter Roeck
On 7/14/22 09:48, Linus Torvalds wrote: On Thu, Jul 14, 2022 at 12:23 AM Geert Uytterhoeven wrote: Oh, it's not just this one. The lists of build regressions between v5.18 and v5.19-rc1 [1] resp. v5.19-rc6 [2] look surprisingly similar :-( [1] https://lore.kernel.org/all/20220606082201.279214

Re: [PATCH] drm/amd/display: Enable building new display engine with KCOV enabled

2022-07-14 Thread Guenter Roeck
On 7/14/22 09:29, Alex Deucher wrote: Applied. Thanks! On Wed, Jul 13, 2022 at 4:03 PM Harry Wentland wrote: On 2022-07-12 18:42, Guenter Roeck wrote: The new display engine uses floating point math, which is not supported by KCOV. Commit 9d1d02ff3678 ("drm/amd/display: Don't build DCN1 whe

Re: Linux 5.19-rc6

2022-07-14 Thread Linus Torvalds
On Thu, Jul 14, 2022 at 10:24 AM Guenter Roeck wrote: > > We can't use virt_to_phys() and phys_to_virt() because they are defined for > the underlying architecture. Would uml_to_phys() and uml_to_virt() be > acceptable ? If so, I'll submit a patch. Sure, that would be good, and make th uml helper

Re: [PATCH] drm/amd/display: Add missing hard-float compile flags for PPC64 builds

2022-07-14 Thread Melissa Wen
O 07/13, Alex Deucher wrote: > On Wed, Jul 13, 2022 at 7:09 PM Guenter Roeck wrote: > > > > On Wed, Jul 13, 2022 at 05:20:40PM -0400, Alex Deucher wrote: > > > > > > > > The problem is not the FPU operations, but the fact that soft-float > > > > and hard-float compiled code is linked together. The

Re: [PATCH v2 00/29] drm/kms: Stop registering multiple /sys/class/backlight devs for a single display

2022-07-14 Thread Rafael J. Wysocki
On Tue, Jul 12, 2022 at 9:39 PM Hans de Goede wrote: > > Hi All, > > As mentioned in my RFC titled "drm/kms: control display brightness through > drm_connector properties": > https://lore.kernel.org/dri-devel/0d188965-d809-81b5-74ce-7d30c49fe...@redhat.com/ > > The first step towards this is to de

Re: [PATCH 07/10] drm/amdgpu: move setting the job resources

2022-07-14 Thread Andrey Grodzovsky
Reviewed-by: Andrey Grodzovsky Andrey On 2022-07-14 06:38, Christian König wrote: Move setting the job resources into amdgpu_job.c Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 21 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 17 ++

Re: [PATCH 01/10] drm/sched: move calling drm_sched_entity_select_rq

2022-07-14 Thread Andrey Grodzovsky
Found the new use case from the 5/10 of reordering CS ioctl. Reviewed-by: Andrey Grodzovsky Andrey On 2022-07-14 12:26, Christian König wrote: We need this for limiting codecs like AV1 to the first instance for VCN3. Essentially the idea is that we first initialize the job with entity, id e

Re: Linux 5.19-rc6

2022-07-14 Thread Alex Deucher
On Wed, Jul 13, 2022 at 5:32 PM Linus Torvalds wrote: > > On Wed, Jul 13, 2022 at 2:01 PM Alex Deucher wrote: > > > > If you want to apply Guenter's patch original patch: > > https://patchwork.freedesktop.org/patch/490184/ > > That's fine with me. > > Honestly, by this time I feel that it's too l

Re: Linux 5.19-rc6

2022-07-14 Thread Linus Torvalds
On Thu, Jul 14, 2022 at 12:23 AM Geert Uytterhoeven wrote: > > Oh, it's not just this one. The lists of build regressions between v5.18 > and v5.19-rc1 [1] resp. v5.19-rc6 [2] look surprisingly similar :-( > > [1] https://lore.kernel.org/all/20220606082201.2792145-1-ge...@linux-m68k.org > [2] http

Re: [PATCH] drm/amd/debugfs: Expose GFXOFF state to userspace

2022-07-14 Thread Alex Deucher
On Thu, Jul 14, 2022 at 12:45 PM André Almeida wrote: > > > > Às 13:42 de 14/07/22, Alex Deucher escreveu: > > On Wed, Jul 13, 2022 at 11:15 AM André Almeida > > wrote: > >> > >> GFXOFF has two different "state" values: one to define if the GPU is > >> allowed/disallowed to enter GFXOFF, usually

[PATCH 12/12] drm/amd/display: Rewrite CalculateWriteBackDISPCLK function

2022-07-14 Thread Maíra Canal
Based on the dml30_CalculateWriteBackDISPCLK, it separates the DISPCLK calculations on three variables, making no functional changes, in order to make it more readable and better express that three values are being compared on dml_max. Signed-off-by: Maíra Canal --- .../drm/amd/display/dc/dml/di

[PATCH 11/12] drm/amd/display: Remove duplicated CalculateWriteBackDISPCLK

2022-07-14 Thread Maíra Canal
The functions dml30_CalculateWriteBackDISPCLK and dml31_CalculateWriteBackDISPCLK are identical. Therefor, to avoid code duplication, dml31_CalculateWriteBackDISPCLK is removed and replaced by dml30_CalculateWriteBackDISPCLK. Signed-off-by: Maíra Canal --- .../dc/dml/dcn31/display_mode_vba_31.c

[PATCH 10/12] drm/amd/display: Remove parameters from dml30_CalculateWriteBackDISPCLK

2022-07-14 Thread Maíra Canal
The parameters WritebackPixelFormat and WritebackVRatio are removed as they are not used on the function dml30_CalculateWriteBackDISPCLK. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c| 2 -- .../gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c

[PATCH 09/12] drm/amd/display: Remove unused MaxUsedBW variable

2022-07-14 Thread Maíra Canal
Remove the variable MaxUsedBW from the function DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation. As a side-effect, the variables MaxPerPlaneVActiveWRBandwidth and WRBandwidth are also removed. This was pointed by clang with the following warning: drivers/gpu/drm/

[PATCH 08/12] drm/amd/display: Remove unused variables from dcn10_stream_encoder

2022-07-14 Thread Maíra Canal
The variable regval from the function enc1_update_generic_info_packet and the variables dynamic_range_rgb and dynamic_range_ycbcr from the function enc1_stream_encoder_dp_set_stream_attribute are not currently used. This was pointed by clang with the following warnings: drivers/gpu/drm/amd/amdgpu

[PATCH 07/12] drm/amd/display: Remove unused value0 variable

2022-07-14 Thread Maíra Canal
Remove the variable value0 from the function dcn10_link_encoder_update_mst_stream_allocation_table. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_link_encoder.c:1223:11: warning: variable 'value0' set but not used [-Wunused-but-set-vari

[PATCH 06/12] drm/amd/display: Remove unused variables from dml_rq_dlg_get_dlg_params

2022-07-14 Thread Maíra Canal
Remove the variables dispclk_delay_subtotal and dppclk_delay_subtotal from the function dml_rq_dlg_get_dlg_params. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/display_rq_dlg_calc_31.c:920:15: warning: variable 'dispclk_delay_subtotal' s

[PATCH 05/12] drm/amd/display: Remove unused NumberOfStates variable

2022-07-14 Thread Maíra Canal
Remove the unused unsigned int NumberOfStates from the file, which was declared but never hooked up. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_32.c:33:27: warning: unused variable 'NumberOfStates' [-Wunused-const-vari

Re: [PATCH] drm/amd/debugfs: Expose GFXOFF state to userspace

2022-07-14 Thread André Almeida
Às 13:42 de 14/07/22, Alex Deucher escreveu: > On Wed, Jul 13, 2022 at 11:15 AM André Almeida wrote: >> >> GFXOFF has two different "state" values: one to define if the GPU is >> allowed/disallowed to enter GFXOFF, usually called state; and another >> one to define if currently GFXOFF is being

[PATCH 04/12] drm/amd/display: Remove unused dml32_CalculatedoublePipeDPPCLKAndSCLThroughput function

2022-07-14 Thread Maíra Canal
Remove dml32_CalculatedoublePipeDPPCLKAndSCLThroughput function, which is not used in the codebase. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:393:6: warning: no previous prototype for function 'dml32_Calcul

[PATCH 03/12] drm/amd/display: Remove unused clk_src variable

2022-07-14 Thread Maíra Canal
Remove the variable clk_src from the function dcn3_get_pix_clk_dividers. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:1279:25: warning: variable 'clk_src' set but not used [-Wunused-but-set-variable] struct dce110_c

[PATCH 02/12] drm/amd/display: Change get_pipe_idx function scope

2022-07-14 Thread Maíra Canal
Turn previously global function into a static function as it is not used outside the file. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 2 +- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) di

[PATCH 01/12] drm/amdgpu: Write masked value to control register

2022-07-14 Thread Maíra Canal
On the dce_v6_0 and dce_v8_0 hpd tear down callback, the tmp variable should be written into the control register instead of 0. Fixes: b00861b9 ("drm/amd/amdgpu: port of DCE v6 to new headers (v3)") Fixes: 2285b91c ("drm/amdgpu/dce8: simplify hpd code") Signed-off-by: Maíra Canal --- drivers/gpu

Re: [PATCH] drm/amd/debugfs: Expose GFXOFF state to userspace

2022-07-14 Thread Alex Deucher
On Wed, Jul 13, 2022 at 11:15 AM André Almeida wrote: > > GFXOFF has two different "state" values: one to define if the GPU is > allowed/disallowed to enter GFXOFF, usually called state; and another > one to define if currently GFXOFF is being used, usually called status. > Even when GFXOFF is all

Re: [PATCH] drm/amd/display: Remove unnecessary NULL check in commit_planes_for_stream()

2022-07-14 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Jul 13, 2022 at 7:34 AM Dan Carpenter wrote: > > Smatch complains that: > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3369 > commit_planes_for_stream() > warn: variable dereferenced before check 'stream' (see line 3114) > > The 'stream' pointer ca

Re: [PATCH] drm/amdgpu: Clarify asics naming in Kconfig options

2022-07-14 Thread Alex Deucher
Applied. Thanks! On Thu, Jul 14, 2022 at 9:50 AM André Almeida wrote: > > Clarify which architecture those asics acronyms refers to. > > Signed-off-by: André Almeida > --- > drivers/gpu/drm/amd/amdgpu/Kconfig | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers

Re: [PATCH][next] drm/amd/display: Fix spelling mistake "supporing" -> "supporting"

2022-07-14 Thread Alex Deucher
Applied. Thanks! Alex On Thu, Jul 14, 2022 at 6:34 AM Colin Ian King wrote: > > There is a spelling mistake in a dml_print message. Fix it. > > Signed-off-by: Colin Ian King > --- > .../gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c| 2 +- > 1 file changed, 1 insertion(+), 1 del

Re: [PATCH] drm/amd/display: Enable building new display engine with KCOV enabled

2022-07-14 Thread Alex Deucher
Applied. Thanks! On Wed, Jul 13, 2022 at 4:03 PM Harry Wentland wrote: > > On 2022-07-12 18:42, Guenter Roeck wrote: > > The new display engine uses floating point math, which is not supported > > by KCOV. Commit 9d1d02ff3678 ("drm/amd/display: Don't build DCN1 when kcov > > is enabled") tried t

Re: [PATCH 01/10] drm/sched: move calling drm_sched_entity_select_rq

2022-07-14 Thread Christian König
We need this for limiting codecs like AV1 to the first instance for VCN3. Essentially the idea is that we first initialize the job with entity, id etc... and before we submit it we select a new rq for the entity. In the meantime the VCN3 inline parse will have modified the available rqs for th

[PATCH] mm: move page zone helpers from mm.h to mmzone.h

2022-07-14 Thread Alex Sierra
[WHY] It makes more sense to have these helpers in zone specific header file, rather than the generic mm.h Signed-off-by: Alex Sierra --- include/linux/memremap.h | 2 +- include/linux/mm.h | 78 --- include/linux/mmzone.h | 80 +++

Re: [PATCH -next] drm/amdgpu: double free error and freeing uninitialized null pointer

2022-07-14 Thread André Almeida
Às 12:06 de 14/07/22, Sebin Sebastian escreveu: > On Tue, Jul 12, 2022 at 12:14:27PM -0300, André Almeida wrote: >> Hi Sebin, >> >> Às 10:29 de 10/07/22, Sebin Sebastian escreveu: >>> Fix two coverity warning's double free and and an uninitialized pointer >>> read. Both tmp and new are pointing at

Re: [PATCH 01/10] drm/sched: move calling drm_sched_entity_select_rq

2022-07-14 Thread Andrey Grodzovsky
Can you please remind me of the use case that requires this ? I browsed through related mails in the past but haven't found when is that needed. For amdgpu drm_sched_job_init and drm_sched_job_arm are called together and amdgpu is the only one who supports modifying entity priority on the fly as

Re: [PATCH 07/10] drm/amdgpu: move setting the job resources

2022-07-14 Thread Luben Tuikov
Reviewed-by: Luben Tuikov On 2022-07-14 06:38, Christian König wrote: > Move setting the job resources into amdgpu_job.c > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 21 ++--- > drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 17 +++

Re: [PATCH -next] drm/amdgpu: double free error and freeing uninitialized null pointer

2022-07-14 Thread Sebin Sebastian
On Tue, Jul 12, 2022 at 12:14:27PM -0300, André Almeida wrote: > Hi Sebin, > > Às 10:29 de 10/07/22, Sebin Sebastian escreveu: > > Fix two coverity warning's double free and and an uninitialized pointer > > read. Both tmp and new are pointing at same address and both are freed > > which leads to d

Re: [PATCH 02/10] drm/amdgpu: Protect the amdgpu_bo_list list with a mutex v2

2022-07-14 Thread Alex Deucher
On Thu, Jul 14, 2022 at 6:39 AM Christian König wrote: > > From: Luben Tuikov > > Protect the struct amdgpu_bo_list with a mutex. This is used during command > submission in order to avoid buffer object corruption as recorded in > the link below. > > v2 (chk): Keep the mutex looked for the whole

Re: [PATCH] Revert "drm/amdgpu: add drm buddy support to amdgpu"

2022-07-14 Thread Christian König
Am 14.07.22 um 15:33 schrieb Alex Deucher: On Thu, Jul 14, 2022 at 9:09 AM Christian König wrote: Hi Mauro, well the last time I checked drm-tip was clean. The revert is necessary because we had some problems with the commit which we couldn't fix in the 5.19 cycle. Would it be worth revertin

Re: Linux 5.19-rc6

2022-07-14 Thread Geert Uytterhoeven
Hi Günter, On Thu, Jul 14, 2022 at 3:20 PM Guenter Roeck wrote: > On 7/14/22 00:23, Geert Uytterhoeven wrote: > > On Wed, Jul 13, 2022 at 11:51 PM Linus Torvalds > > wrote: > >> On Wed, Jul 13, 2022 at 2:01 PM Alex Deucher wrote: > >>> If you want to apply Guenter's patch original patch: > >>>

Re: [PATCH 09/10] drm/amdgpu: add gang submit backend

2022-07-14 Thread Andrey Grodzovsky
On 2022-07-14 06:39, Christian König wrote: Allows submitting jobs as gang which needs to run on multiple engines at the same time. Basic idea is that we have a global gang submit fence representing when the gang leader is finally pushed to run on the hardware last. Jobs submitted as gang are

Re: [PATCH] Revert "drm/amdgpu: add drm buddy support to amdgpu"

2022-07-14 Thread Mauro Carvalho Chehab
On Thu, 14 Jul 2022 09:33:23 -0400 Alex Deucher wrote: > On Thu, Jul 14, 2022 at 9:09 AM Christian König > wrote: > > > > Hi Mauro, > > > > well the last time I checked drm-tip was clean. > > > > The revert is necessary because we had some problems with the commit > > which we couldn't fix in th

[PATCH] drm/amdgpu: Clarify asics naming in Kconfig options

2022-07-14 Thread André Almeida
Clarify which architecture those asics acronyms refers to. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/Kconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/Kconfig b/drivers/gpu/drm/amd/amdgpu/Kconfig index 74a8105fd2c0..777

Re: [PATCH] Revert "drm/amdgpu: add drm buddy support to amdgpu"

2022-07-14 Thread Alex Deucher
On Thu, Jul 14, 2022 at 9:09 AM Christian König wrote: > > Hi Mauro, > > well the last time I checked drm-tip was clean. > > The revert is necessary because we had some problems with the commit > which we couldn't fix in the 5.19 cycle. Would it be worth reverting the revert and applying the actu

Re: [PATCH] Revert "drm/amdgpu: add drm buddy support to amdgpu"

2022-07-14 Thread Christian König
Am 14.07.22 um 15:19 schrieb Mauro Carvalho Chehab: On Thu, 14 Jul 2022 15:08:48 +0200 Christian König wrote: Hi Mauro, well the last time I checked drm-tip was clean. The revert is necessary because we had some problems with the commit which we couldn't fix in the 5.19 cycle. I see. I don'

Re: [PATCH 2/2] drm/amdgpu: re-apply "move internal vram_mgr function into the C file""

2022-07-14 Thread Arunpravin Paneer Selvam
Hi Christian, I verified the patch. Reviewed-by: Arunpravin Paneer Selvam Thanks, Arun On 7/14/2022 6:53 PM, Christian König wrote: This re-applys commit 708d19d9f362766147cab79eccae60912c6d3068. The original problem this was reverted for was found and the correct fix will be merged to drm-

Re: [PATCH 1/2] drm/amdgpu: reapply "fix start calculation in amdgpu_vram_mgr_new""

2022-07-14 Thread Arunpravin Paneer Selvam
Hi Christian, I verified the patch. Reviewed-by: Arunpravin Paneer Selvam Regards, Arun On 7/14/2022 6:53 PM, Christian König wrote: This re-applys commit 5e3f1e7729ec7a99e145e9d8ed58963d86cdfb98. The original problem this was reverted for was found and the correct fix will be merged to drm

Re: Linux 5.19-rc6

2022-07-14 Thread Guenter Roeck
On 7/14/22 00:23, Geert Uytterhoeven wrote: Hi Linus, On Wed, Jul 13, 2022 at 11:51 PM Linus Torvalds wrote: On Wed, Jul 13, 2022 at 2:01 PM Alex Deucher wrote: If you want to apply Guenter's patch original patch: https://patchwork.freedesktop.org/patch/490184/ That's fine with me. Honestl

[PATCH 2/2] drm/amdgpu: re-apply "move internal vram_mgr function into the C file""

2022-07-14 Thread Christian König
This re-applys commit 708d19d9f362766147cab79eccae60912c6d3068. The original problem this was reverted for was found and the correct fix will be merged to drm-misc-next-fixes. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 29 drivers/gpu/

[PATCH 1/2] drm/amdgpu: reapply "fix start calculation in amdgpu_vram_mgr_new""

2022-07-14 Thread Christian König
This re-applys commit 5e3f1e7729ec7a99e145e9d8ed58963d86cdfb98. The original problem this was reverted for was found and the correct fix will be merged to drm-misc-next-fixes. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 22 +--- 1 file chang

Re: [PATCH] Revert "drm/amdgpu: add drm buddy support to amdgpu"

2022-07-14 Thread Mauro Carvalho Chehab
On Thu, 14 Jul 2022 15:08:48 +0200 Christian König wrote: > Hi Mauro, > > well the last time I checked drm-tip was clean. > > The revert is necessary because we had some problems with the commit > which we couldn't fix in the 5.19 cycle. I see. I don't have any issues with the patch itself, p

Re: [PATCH] Revert "drm/amdgpu: add drm buddy support to amdgpu"

2022-07-14 Thread Christian König
Hi Mauro, well the last time I checked drm-tip was clean. The revert is necessary because we had some problems with the commit which we couldn't fix in the 5.19 cycle. I will double check drm-tip once more. Regards, Christian. Am 14.07.22 um 14:54 schrieb Mauro Carvalho Chehab: On Fri, 8 J

Re: [PATCH] Revert "drm/amdgpu: add drm buddy support to amdgpu"

2022-07-14 Thread Mauro Carvalho Chehab
On Fri, 8 Jul 2022 03:21:24 -0700 Arunpravin Paneer Selvam wrote: > This reverts the following commits: > commit 708d19d9f362 ("drm/amdgpu: move internal vram_mgr function into the C > file") > commit 5e3f1e7729ec ("drm/amdgpu: fix start calculation in > amdgpu_vram_mgr_new") > commit c9cad937c

Re: Linux 5.19-rc6

2022-07-14 Thread Russell King (Oracle)
On Wed, Jul 13, 2022 at 01:42:15PM -0700, Linus Torvalds wrote: > On Wed, Jul 13, 2022 at 1:40 PM Guenter Roeck wrote: > > > > That patch is (and has been) in linux-next for a long time, > > as commit d2ca1fd2bc70, and with the following tags. > > > > Fixes: 7719a68b2fa4 ("ARM: 9192/1: amba:

Re: Linux 5.19-rc6

2022-07-14 Thread Russell King (Oracle)
On Wed, Jul 13, 2022 at 01:40:41PM -0700, Guenter Roeck wrote: > On 7/13/22 13:21, Linus Torvalds wrote: > > On Wed, Jul 13, 2022 at 12:49 PM Russell King (Oracle) > > wrote: > > > > > > There may be a patch that solves that, but it's never been submitted to > > > my patch system: > > > > > > ht

Re: Linux 5.19-rc6

2022-07-14 Thread Geert Uytterhoeven
Hi Linus, On Wed, Jul 13, 2022 at 11:51 PM Linus Torvalds wrote: > On Wed, Jul 13, 2022 at 2:01 PM Alex Deucher wrote: > > If you want to apply Guenter's patch original patch: > > https://patchwork.freedesktop.org/patch/490184/ > > That's fine with me. > > Honestly, by this time I feel that it's

Re: [PATCH v8 06/15] mm: remove the vma check in migrate_vma_setup()

2022-07-14 Thread Alistair Popple
David Hildenbrand writes: > On 07.07.22 21:03, Alex Sierra wrote: >> From: Alistair Popple >> >> migrate_vma_setup() checks that a valid vma is passed so that the page >> tables can be walked to find the pfns associated with a given address >> range. However in some cases the pfns are already

Re: [PATCH v8 07/15] mm/gup: migrate device coherent pages when pinning instead of failing

2022-07-14 Thread Alistair Popple
David Hildenbrand writes: > On 07.07.22 21:03, Alex Sierra wrote: >> From: Alistair Popple >> >> Currently any attempts to pin a device coherent page will fail. This is >> because device coherent pages need to be managed by a device driver, and >> pinning them would prevent a driver from migra

[PATCH][next] drm/amd/display: Fix spelling mistake "supporing" -> "supporting"

2022-07-14 Thread Colin Ian King
There is a spelling mistake in a dml_print message. Fix it. Signed-off-by: Colin Ian King --- .../gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c b/dr

[bug report] drm/amdgpu/mes: ring aggregatged doorbell when mes queue is unmapped

2022-07-14 Thread Dan Carpenter
Hello Le Ma, The patch 5fdbff096edb: "drm/amdgpu/mes: ring aggregatged doorbell when mes queue is unmapped" from Oct 30, 2020, leads to the following unpublished Smatch static checker warning: drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:8552 gfx_v10_0_ring_set_wptr_gfx() warn: duplica

Re: [PATCH 4/4] drm/amdgpu: drop runpm from amdgpu_device structure

2022-07-14 Thread Lazar, Lijo
On 7/14/2022 2:13 PM, Guchun Chen wrote: It's redundant, as now switching to rpm_mode to indicate runtime power management mode. Suggested-by: Lijo Lazar Signed-off-by: Guchun Chen Series is: Reviewed-by: Lijo Lazar Thanks, Lijo --- drivers/gpu/drm/amd/amdgpu/amdgpu.h |

[PATCH 09/10] drm/amdgpu: add gang submit backend

2022-07-14 Thread Christian König
Allows submitting jobs as gang which needs to run on multiple engines at the same time. Basic idea is that we have a global gang submit fence representing when the gang leader is finally pushed to run on the hardware last. Jobs submitted as gang are never re-submitted in case of a GPU reset since

[PATCH 10/10] drm/amdgpu: add gang submit frontend v2

2022-07-14 Thread Christian König
Allows submitting jobs as gang which needs to run on multiple engines at the same time. All members of the gang get the same implicit, explicit and VM dependencies. So no gang member will start running until everything else is ready. The last job is considered the gang leader (usually a submissio

[PATCH 07/10] drm/amdgpu: move setting the job resources

2022-07-14 Thread Christian König
Move setting the job resources into amdgpu_job.c Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 21 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 17 + drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 2 ++ 3 files changed, 21 insertions(

[PATCH 08/10] drm/amdgpu: revert "fix limiting AV1 to the first instance on VCN3"

2022-07-14 Thread Christian König
This reverts commit 250195ff744f260c169f5427422b6f39c58cb883. The job should now be initialized when we reach the parser functions. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/dri

[PATCH 06/10] drm/amdgpu: remove SRIOV and MCBP dependencies from the CS

2022-07-14 Thread Christian König
We should not have any different CS constrains based on the execution environment. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdg

[PATCH 05/10] drm/amdgpu: cleanup and reorder amdgpu_cs.c

2022-07-14 Thread Christian König
Sort the functions in the order they are called and cleanup the coding style and function names to represent the data they process. Check the size of the IB chunk, initialize resulting entity and scheduler job much earlier as well. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/a

[PATCH 04/10] drm/amdgpu: use DMA_RESV_USAGE_BOOKKEEP

2022-07-14 Thread Christian König
Use DMA_RESV_USAGE_BOOKKEEP for VM page table updates and KFD preemption fence. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dri

[PATCH 02/10] drm/amdgpu: Protect the amdgpu_bo_list list with a mutex v2

2022-07-14 Thread Christian König
From: Luben Tuikov Protect the struct amdgpu_bo_list with a mutex. This is used during command submission in order to avoid buffer object corruption as recorded in the link below. v2 (chk): Keep the mutex looked for the whole CS to avoid using the list from multiple CS threads at the s

[PATCH 03/10] drm/amdgpu: revert "partial revert "remove ctx->lock" v2"

2022-07-14 Thread Christian König
This reverts commit 94f4c4965e5513ba624488f4b601d6b385635aec. We found that the bo_list is missing a protection for its list entries. Since that is fixed now this workaround can be removed again. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 21 ++-

Gang submit v2

2022-07-14 Thread Christian König
Hi guys, secound round for this patch set. I've fixed the minor comments and bugs Andrey and Yogesh came up with and rebased everything. The base is not the current amd-staging-drm-next branch, but rather Alex rebased version since this depends on the dma-resv usage rework. So don't bother trying

[PATCH 01/10] drm/sched: move calling drm_sched_entity_select_rq

2022-07-14 Thread Christian König
We already discussed that the call to drm_sched_entity_select_rq() needs to move to drm_sched_job_arm() to be able to set a new scheduler list between _init() and _arm(). This was just not applied for some reason. Signed-off-by: Christian König CC: Andrey Grodzovsky CC: dri-de...@lists.freedeskt

[PATCH] drm/amdgpu: Fix for drm buddy memory corruption

2022-07-14 Thread Arunpravin Paneer Selvam
User reported gpu page fault when running graphics applications and in some cases garbaged graphics are observed as soon as X starts. This patch fixes all the issues. Fixed the typecast issue for fpfn and lpfn variables, thus preventing the overflow problem which resolves the memory corruption. S

RE: [PATCH] drm/amd/display: make retrieve_dmi_info() static

2022-07-14 Thread Quan, Evan
[AMD Official Use Only - General] Reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: Wednesday, July 13, 2022 11:21 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; kernel test robot > > Subject: [PATCH] drm/amd/display: mak

RE: [PATCH 4/4] drm/amdgpu: drop runpm from amdgpu_device structure

2022-07-14 Thread Quan, Evan
[AMD Official Use Only - General] Series is reviewed-by: Evan Quan > -Original Message- > From: Chen, Guchun > Sent: Thursday, July 14, 2022 4:43 PM > To: amd-gfx@lists.freedesktop.org; Deucher, Alexander > ; Zhang, Hawking > ; Lazar, Lijo ; Quan, Evan > ; Feng, Kenneth > Cc: Chen, Guc

Re: [PATCH] Revert "drm/amdgpu: add drm buddy support to amdgpu"

2022-07-14 Thread Thomas Zimmermann
Hi Am 08.07.22 um 12:21 schrieb Arunpravin Paneer Selvam: This reverts the following commits: commit 708d19d9f362 ("drm/amdgpu: move internal vram_mgr function into the C file") commit 5e3f1e7729ec ("drm/amdgpu: fix start calculation in amdgpu_vram_mgr_new") commit c9cad937c0c5 ("drm/amdgpu: ad

Re: [PATCH 1/3] Revert "drm/amdgpu: move internal vram_mgr function into the C file"

2022-07-14 Thread Thomas Zimmermann
Hi Am 08.07.22 um 11:30 schrieb Arunpravin Paneer Selvam: This reverts commit 708d19d9f362766147cab79eccae60912c6d3068. This commit is only present in drm-misc-next. Should the revert be cherry-picked into drm-misc-next-fixes? Best regards Thomas This is part of a revert of the following

[PATCH 4/4] drm/amdgpu: drop runpm from amdgpu_device structure

2022-07-14 Thread Guchun Chen
It's redundant, as now switching to rpm_mode to indicate runtime power management mode. Suggested-by: Lijo Lazar Signed-off-by: Guchun Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 23 +

[PATCH 3/4] drm/amdgpu: drop runtime pm disablement quirk on several sienna cichlid cards

2022-07-14 Thread Guchun Chen
This quirk is not needed any more as it's fixed by bypassing SMU FW reloading in runtime resume. Signed-off-by: Guchun Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd

[PATCH 2/4] drm/amdgpu: skip SMU FW reloading in runpm BACO case

2022-07-14 Thread Guchun Chen
SMU is always alive, so it's fine to skip SMU FW reloading when runpm resumed from BACO, this can avoid some race issues when resuming SMU. Suggested-by: Evan Quan Signed-off-by: Guchun Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/d

[PATCH 1/4] drm/amdgpu: introduce runtime pm mode

2022-07-14 Thread Guchun Chen
It can benefit code consistency in future. Suggested-by: Lijo Lazar Signed-off-by: Guchun Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 9 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

  1   2   >