[PATCH] nbio_v7_4: Add pointer check

2022-11-11 Thread Denis Arefev
Return value of a function 'amdgpu_ras_find_obj' is dereferenced at nbio_v7_4.c:325 without checking for null Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev --- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 3 +++ 1 file changed, 3 insertions(+) diff

Re: [RFC] Approaches to deal with a struct with multiple fake flexible arrays members

2022-11-11 Thread Paulo Miguel Almeida
On Thu, Nov 10, 2022 at 11:39:02PM -0600, Gustavo A. R. Silva wrote: > On Wed, Nov 09, 2022 at 10:20:34PM -0500, Alex Deucher wrote: > > On Wed, Nov 9, 2022 at 8:31 PM Paulo Miguel Almeida > > wrote: > > > > > > On Wed, Nov 09, 2022 at 06:45:57PM -0600, Gustavo A. R. Silva wrote: > > > > On Wed, N

[PATCH] amdgpu_dm_2027: Add pointer check

2022-11-11 Thread Denis Arefev
Return value of a function 'dc_create_state' is dereferenced at amdgpu_dm.c:2027 without checking for null Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Denis Arefev --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- 1 file changed, 3 insertions(+

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

2022-11-11 Thread Guchun Chen
Otherwise, some unexpected PCIE AER errors will be observed in runtime suspend/resume cycle. Signed-off-by: Guchun Chen --- drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/d

RE: [PATCH] nbio_v7_4: Add pointer check

2022-11-11 Thread Zhang, Hawking
[AMD Official Use Only - General] Hey, The patch does the right thing from coding principal perspective, but it is really redundant check in RAS context. The function is a hardware interrupt handler which is only triggered for specific RAS event. When software receives the interrupt, the point

RE: [PATCH] drm/amdgpu: Remove programming GCMC_VM_FB_LOCATION* on gfxhub_v3_0_3 in VF

2022-11-11 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Yifan Zha Sent: Friday, November 11, 2022 15:31 To: amd-gfx@lists.freedesktop.org; Deucher, Alexander ; Zhang, Hawking Cc: Chen, Horace ; Chang, HaiJun ; Zha, YiFan(Even) Subject:

Re: [PATCH] drm/amdgpu: Fix memory leak in amdgpu_cs_pass1

2022-11-11 Thread Christian König
Am 10.11.22 um 15:33 schrieb Dong Chenchen: When p->gang_size equals 0, amdgpu_cs_pass1() will return directly without freeing chunk_array, which will cause a memory leak issue, this patch fixes it. Fixes: 4624459c84d7 ("drm/amdgpu: add gang submit frontend v6") Signed-off-by: Dong Chenchen G

[PATCH] drm/amd/display: remove set but unused variable 'state'

2022-11-11 Thread Jiapeng Chong
The variable state is not effectively used in the function, so delete it. drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_resource.c:1613:24: warning: variable ‘state’ set but not used. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3027#c0 Reported-by: Abaci Robot Signed-off-by: Jia

Re: [PATCH] amdgpu_dm_2027: Add pointer check

2022-11-11 Thread Harry Wentland
The commit title should user the drm/amd/display prefix. It might also be good to be more specific, like: drm/amd/display: Check dc_resource_state_construct succeeded On 11/11/22 02:14, Denis Arefev wrote: > Return value of a function 'dc_create_state' is > dereferenced at amdgpu_dm.c:2027 without

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

2022-11-11 Thread Alex Deucher
On Fri, Nov 11, 2022 at 3:57 AM Guchun Chen wrote: > > Otherwise, some unexpected PCIE AER errors will be observed > in runtime suspend/resume cycle. > > Signed-off-by: Guchun Chen Please make sure we try and root cause this. I would hate to have to leave this in place for a long time. Acked-by

[linux-next:master] BUILD REGRESSION f8f60f322f0640c8edda2942ca5f84b7a27c417a

2022-11-11 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: f8f60f322f0640c8edda2942ca5f84b7a27c417a Add linux-next specific files for 2022 Error/Warning reports: https://lore.kernel.org/linux-mm/202210261404.b6ulzg7h-...@intel.com https

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

2022-11-11 Thread Alex Deucher
Hi Dave, Daniel, More new stuff for 6.2. The following changes since commit a143bc517bf31c4575191efbaac216a11ec016e0: Merge branch '00.06-gr-ampere' of https://gitlab.freedesktop.org/skeggsb/nouveau into drm-next (2022-11-09 11:18:56 +1000) are available in the Git repository at: https:/

[PATCH] drm/amdgpu: there is no vbios fb on devices with no display hw (v2)

2022-11-11 Thread Alex Deucher
If we enable virtual display functionality on parts with no display hardware we can end up trying to check for and reserve the vbios FB area on devices where it doesn't exist. Check if display hardware is actually present on the hardware before trying to reserve the memory. v2: move the check into

[PATCH 1/7] drm: mark drm.debug-on-dyndbg as BROKEN for now

2022-11-11 Thread Jim Cromie
drm.debug-on-dyndbg has a regression, due to a chicken-egg initialization problem: 1- modprobe i915 i915 needs drm.ko, which is loaded 1st 2- "modprobe drm drm.debug=0x1ff" (virtual/implied) drm.debug is set post-initialization, from boot-args etc 3- `modprobe i915` finishes W/O drm.debug

[PATCH 0/7] DYNAMIC_DEBUG fixups for rc

2022-11-11 Thread Jim Cromie
hi Jason, Greg, DRM-folk, drm.debug-on-dyndbg has a regression due to a chicken-&-egg problem; drm.debug is applied to enable dyndbg callsites before the dependent modules' callsites are available to be enabled. My "fixes" are unready, so lets just mark it BROKEN for now. Meanwhile, heres some o

[PATCH 4/7] test-dyndbg: show that DEBUG enables prdbgs at compiletime

2022-11-11 Thread Jim Cromie
Dyndbg is required to enable prdbgs at compile-time if DEBUG is defined. Show this works; add the defn to test_dynamic_debug.c, and manually inspect/verify its effect at module load: [ 15.292810] dyndbg: module:test_dynamic_debug attached 4 classes [ 15.293189] dyndbg: 32 debug prints in mod

[PATCH 2/7] drm_print: fixup improve stale comment

2022-11-11 Thread Jim Cromie
Cited commit uses stale macro name, fix this. And improve the explanation. When DRM_USE_DYNAMIC_DEBUG=y, DECLARE_DYNDBG_CLASSMAP() does the mapping of DRM_UT_* onto BITs in drm.debug. While this is still using the drm_debug_category enum to do the mapping, its doing so somewhat indirectly, with

[PATCH 3/7] test-dyndbg: fixup CLASSMAP usage error

2022-11-11 Thread Jim Cromie
more careful reading of test output reveals: lib/test_dynamic_debug.c:103 [test_dynamic_debug]do_cats =pmf "doing categories\n" lib/test_dynamic_debug.c:105 [test_dynamic_debug]do_cats =p "LOW msg\n" class:MID lib/test_dynamic_debug.c:106 [test_dynamic_debug]do_cats =p "MID msg\n" class:HI lib/t

[PATCH 5/7] dyndbg: fix readback value on LEVEL_NAMES interfaces

2022-11-11 Thread Jim Cromie
Since sysfs knobs should generally read-back what was just written (unless theres a good reason to do otherwise), this result (using test_dynamic_debug.ko) is suboptimal: echo L3 > p_level_names cat p_level_names 4 Fix this with a -1 offset in LEVEL_NAMES readback. NOTE: Calling this a BU

[PATCH 6/7] dyndbg: clone DECLARE_DYNDBG_CLASSMAP to REFERENCE_DYNDBG_CLASSMAP

2022-11-11 Thread Jim Cromie
DECLARE_DYNDBG_CLASSMAPs job is to allow modules to declare the debug classes/categories they want dyndbg to >control. Its args name the class-names, and the sysfs interface style (usually a class-bitmap). A separate module_param_cb wires the sysfs node to the classmap. In DRM, multiple modules d

[PATCH 7/7] dyndbg: replace classmap list with a vector

2022-11-11 Thread Jim Cromie
Classmaps are stored/linked in a section/array, but are each added to the module's ddebug_table.maps list-head. This is unnecessary; even when ddebug_attach_classmap() is handling the builtin section (with classmaps for multiple builtin modules), its contents are ordered, so a module's possibly mu