Re: BUG: KASAN: null-ptr-deref in drm_sched_job_cleanup+0x96/0x290 [gpu_sched]

2023-04-19 Thread Mikhail Gavrilov
Christian? ❯ /usr/src/kernels/6.3.0-0.rc7.56.fc39.x86_64/scripts/faddr2line /lib/debug/lib/modules/6.3.0-0.rc7.56.fc39.x86_64/kernel/drivers/gpu/drm/scheduler/gpu-sched.ko.debug drm_sched_job_cleanup+0x9a drm_sched_job_cleanup+0x9a/0x130: drm_sched_job_cleanup at /usr/src/debug/kernel-6.3-rc7/linu

Re: [PATCH 2/2] drm/amdgpu: Fix integer overflow in amdgpu_cs_pass1

2023-04-19 Thread kernel test robot
use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/hackyzh002/drm-amdgpu-Fix-integer-overflow-in-amdgpu_cs_pass1/20230419-125344 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-

Re: BUG: KASAN: null-ptr-deref in drm_sched_job_cleanup+0x96/0x290 [gpu_sched]

2023-04-19 Thread Christian König
Am 19.04.23 um 09:00 schrieb Mikhail Gavrilov: Christian? I'm already looking into this, but can't figure out why we run into problems here. What happens is that a CS is aborted without sending the job to the scheduler and in this case the cleanup function doesn't seem to work. Christian.

[linux-next:master] BUILD REGRESSION 67d5d9f013d6c3829383c08162939cabff14fccc

2023-04-19 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 67d5d9f013d6c3829383c08162939cabff14fccc Add linux-next specific files for 20230418 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202304102354.q4voxgte-...@intel.com Error/Warni

Re: [PATCH 2/2] drm/amdgpu: Fix integer overflow in amdgpu_cs_pass1

2023-04-19 Thread Christian König
Am 19.04.23 um 06:51 schrieb hackyzh002: The type of size is unsigned int, if size is 0x4000, there will be an integer overflow, size will be zero after size *= sizeof(uint32_t), will cause uninitialized memory to be referenced later. Signed-off-by: hackyzh002 --- drivers/gpu/drm/amd/amdg

Re: [PATCH 1/2] drm/radeon: Fix integer overflow in radeon_cs_parser_init

2023-04-19 Thread Christian König
Am 19.04.23 um 06:24 schrieb hackyzh002: The type of size is unsigned, if size is 0x4000, there will be an integer overflow, size will be zero after size *= sizeof(uint32_t), will cause uninitialized memory to be referenced later Well good catch, but this is actually harmless. Userspace ca

Re: [PATCH V2 2/2] drm/amdgpu: Fix integer overflow in amdgpu_cs_pass1

2023-04-19 Thread Christian König
Am 19.04.23 um 10:27 schrieb hackyzh002: The type of size is unsigned int, if size is 0x4000, there will be an integer overflow, size will be zero after size *= sizeof(uint32_t), will cause uninitialized memory to be referenced later. Signed-off-by: hackyzh002 --- drivers/gpu/drm/amd/amdg

Re: [PATCH v4 1/6] mm/gup: remove unused vmas parameter from get_user_pages()

2023-04-19 Thread Christian König
Am 18.04.23 um 17:49 schrieb Lorenzo Stoakes: No invocation of get_user_pages() uses the vmas parameter, so remove it. The GUP API is confusing and caveated. Recent changes have done much to improve that, however there is more we can do. Exporting vmas is a prime target as the caller has to be e

Re: [PATCH v2 1/2] drm/radeon: Fix integer overflow in radeon_cs_parser_init

2023-04-19 Thread Christian König
Am 19.04.23 um 10:57 schrieb hackyzh002: The type of size is unsigned, if size is 0x4000, there will be an integer overflow, size will be zero after size *= sizeof(uint32_t), will cause uninitialized memory to be referenced later Signed-off-by: hackyzh002 --- drivers/gpu/drm/radeon/radeon

[PATCH] drm/amd/amdgpu: Fix spaces in array indexing and indentations in amdgpu_kms.c

2023-04-19 Thread Srinivasan Shanmugam
Fix the following errors reported by checkpatch: ERROR: space prohibited before open square bracket '[' +#define TA_FW_NAME(type) [TA_FW_TYPE_PSP_##type] = #type ERROR: code indent should use tabs where possible +query_fw.fw_type = AMDGPU_INFO_FW_GFX_RLCV;$ Cc: Christian König Cc: Alex

[PATCH] drm/amdgpu: Drop pcie_bif ras check from fatal error handler

2023-04-19 Thread Candice Li
Some ASICs support fatal error event but do not support pcie_bif ras. Signed-off-by: Candice Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c ind

RE: [PATCH] drm/amdgpu: Drop pcie_bif ras check from fatal error handler

2023-04-19 Thread Zhang, Hawking
[AMD Official Use Only - General] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of Candice Li Sent: Wednesday, April 19, 2023 17:40 To: amd-gfx@lists.freedesktop.org Cc: Li, Candice Subject: [PATCH] drm/amdgpu: Drop pcie_bif ras check from fata

Re: [PATCH 2/2] drm/amdgpu: Fix integer overflow in amdgpu_cs_pass1

2023-04-19 Thread kernel test robot
use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/hackyzh002/drm-amdgpu-Fix-integer-overflow-in-amdgpu_cs_pass1/20230419-125344 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-

Re: [PATCH] drm/amd/amdgpu: Fix spaces in array indexing and indentations in amdgpu_kms.c

2023-04-19 Thread Christian König
Am 19.04.23 um 11:34 schrieb Srinivasan Shanmugam: Fix the following errors reported by checkpatch: ERROR: space prohibited before open square bracket '[' +#define TA_FW_NAME(type) [TA_FW_TYPE_PSP_##type] = #type ERROR: code indent should use tabs where possible +query_fw.fw_type = AMDG

[PATCH] drm/amd/amdgpu: Fix style errors in amdgpu_drv.c & amdgpu_device.c

2023-04-19 Thread Srinivasan Shanmugam
Fix following checkpatch style errors in amdgpu_drv.c & amdgpu_device.c ERROR: exactly one space required after that #ifdef ERROR: spaces required around that '+=' (ctx:WxV) ERROR: space required before the open brace '{' ERROR: spaces required around that '||' (ctx:VxE) ERROR: space prohibited be

Re: [PATCH] drm/amd/amdgpu: Fix style errors in amdgpu_drv.c & amdgpu_device.c

2023-04-19 Thread Christian König
Am 19.04.23 um 13:42 schrieb Srinivasan Shanmugam: Fix following checkpatch style errors in amdgpu_drv.c & amdgpu_device.c ERROR: exactly one space required after that #ifdef ERROR: spaces required around that '+=' (ctx:WxV) ERROR: space required before the open brace '{' ERROR: spaces required

[PATCH v4] drm/amd/display: Add logging when DP link training Channel EQ is Successful

2023-04-19 Thread Srinivasan Shanmugam
Log when Channel Equalization is successful. Cc: Aurabindo Pillai Cc: Fangzhi Zuo Signed-off-by: Srinivasan Shanmugam --- v2: - For consistency of the printed messages, either drop or keep %s for both the lines - it is dropped (Aurabindo) - For 128b/132b, moved the statements after EQ i

[PATCH] drm/amd/display: Remove unused variables in dcn21_hwseq.c

2023-04-19 Thread Srinivasan Shanmugam
Fix the below compiler warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:229:11: warning: unused variable ‘otg_inst’ [-Wunused-variable] 229 | uint32_t otg_inst = pipe_ctx->stream_res.tg->inst; | ^~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_

Re: [PATCH V3 1/2] drm/radeon: Fix integer overflow in radeon_cs_parser_init

2023-04-19 Thread Christian König
Am 19.04.23 um 14:20 schrieb hackyzh002: The type of size is unsigned, if size is 0x4000, there will be an integer overflow, size will be zero after size *= sizeof(uint32_t), will cause uninitialized memory to be referenced later Signed-off-by: hackyzh002 Reviewed-by: Christian König for

RE: [PATCH] drm/amd/display: Remove unused variables in dcn21_hwseq.c

2023-04-19 Thread Sun, Yongqiang
[AMD Official Use Only - General] Reviewed-by: Yongqiang Sun -Original Message- From: SHANMUGAM, SRINIVASAN Sent: Wednesday, April 19, 2023 8:13 AM To: Pillai, Aurabindo ; Zuo, Jerry ; Sun, Yongqiang Cc: amd-gfx@lists.freedesktop.org; SHANMUGAM, SRINIVASAN Subject: [PATCH] drm/amd/

Re: BUG: KASAN: null-ptr-deref in drm_sched_job_cleanup+0x96/0x290 [gpu_sched]

2023-04-19 Thread Mikhail Gavrilov
On Wed, Apr 19, 2023 at 1:12 PM Christian König wrote: > > I'm already looking into this, but can't figure out why we run into > problems here. > > What happens is that a CS is aborted without sending the job to the > scheduler and in this case the cleanup function doesn't seem to work. > > Christ

Re: BUG: KASAN: null-ptr-deref in drm_sched_job_cleanup+0x96/0x290 [gpu_sched]

2023-04-19 Thread Christian König
Am 19.04.23 um 15:13 schrieb Mikhail Gavrilov: On Wed, Apr 19, 2023 at 1:12 PM Christian König wrote: I'm already looking into this, but can't figure out why we run into problems here. What happens is that a CS is aborted without sending the job to the scheduler and in this case the cleanup fu

[PATCH] drm/amd/amdgpu: Fix style issues in amdgpu_discovery.c

2023-04-19 Thread Srinivasan Shanmugam
Fix following checkpatch errors in amdgpu_discovery.c ERROR: space required after that ',' (ctx:VxV) ERROR: space required before the open parenthesis '(' ERROR: code indent should use tabs where possible Cc: Christian König Cc: Alex Deucher Cc: Mario Limonciello Signed-off-by: Srinivasan Shan

RE: [PATCH 6.1.y] drm/amdgpu/vcn: Disable indirect SRAM on Vangogh broken BIOSes

2023-04-19 Thread Deucher, Alexander
[Public] > -Original Message- > From: Guilherme G. Piccoli > Sent: Tuesday, April 18, 2023 6:15 PM > To: sta...@vger.kernel.org > Cc: gre...@linuxfoundation.org; sas...@kernel.org; amd- > g...@lists.freedesktop.org; Deucher, Alexander > ; Zhu, James ; Liu, > Leo ; ker...@gpiccoli.net; ker

[PATCH V2 2/2] drm/amdgpu: Fix integer overflow in amdgpu_cs_pass1

2023-04-19 Thread hackyzh002
The type of size is unsigned int, if size is 0x4000, there will be an integer overflow, size will be zero after size *= sizeof(uint32_t), will cause uninitialized memory to be referenced later. Signed-off-by: hackyzh002 --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- 1 file changed, 2 i

[PATCH v3 2/2] drm/amdgpu: Fix integer overflow in amdgpu_cs_pass1

2023-04-19 Thread hackyzh002
The type of size is unsigned int, if size is 0x4000, there will be an integer overflow, size will be zero after size *= sizeof(uint32_t), will cause uninitialized memory to be referenced later. Signed-off-by: hackyzh002 --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- 1 file changed, 1 ins

[PATCH v2 1/2] drm/radeon: Fix integer overflow in radeon_cs_parser_init

2023-04-19 Thread hackyzh002
The type of size is unsigned, if size is 0x4000, there will be an integer overflow, size will be zero after size *= sizeof(uint32_t), will cause uninitialized memory to be referenced later Signed-off-by: hackyzh002 --- drivers/gpu/drm/radeon/radeon_cs.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH 1/2] drm/radeon: Fix integer overflow in radeon_cs_parser_init

2023-04-19 Thread hackyzh002
The type of size is unsigned, if size is 0x4000, there will be an integer overflow, size will be zero after size *= sizeof(uint32_t), will cause uninitialized memory to be referenced later Signed-off-by: hackyzh002 --- drivers/gpu/drm/radeon/radeon_cs.c | 4 ++-- 1 file changed, 2 insertions

Re: 2023 X.Org Foundation Membership deadline for voting in the election

2023-04-19 Thread Harald Koenig
On Apr 17, Laurent Pinchart wrote: > I don't know if I'm the only one affected by this issue, but I've just > received today two months of e-mails from x.org, including all the > reminders aboud membership renewal and election nomination period. This > isn't the first time this happens, and the la

[PATCH V3 1/2] drm/radeon: Fix integer overflow in radeon_cs_parser_init

2023-04-19 Thread hackyzh002
The type of size is unsigned, if size is 0x4000, there will be an integer overflow, size will be zero after size *= sizeof(uint32_t), will cause uninitialized memory to be referenced later Signed-off-by: hackyzh002 --- drivers/gpu/drm/radeon/radeon_cs.c | 3 ++- 1 file changed, 2 insertions(

[PATCH 2/2] drm/amdgpu: Fix integer overflow in amdgpu_cs_pass1

2023-04-19 Thread hackyzh002
The type of size is unsigned int, if size is 0x4000, there will be an integer overflow, size will be zero after size *= sizeof(uint32_t), will cause uninitialized memory to be referenced later. Signed-off-by: hackyzh002 --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++-- 1 file changed, 2 i

[PATCH 6.1.y] drm/amdgpu/vcn: Disable indirect SRAM on Vangogh broken BIOSes

2023-04-19 Thread Guilherme G. Piccoli
commit 542a56e8eb4467ae654eefab31ff194569db39cd upstream. The VCN firmware loading path enables the indirect SRAM mode if it's advertised as supported. We might have some cases of FW issues that prevents this mode to working properly though, ending-up in a failed probe. An example below, observed

2023 X.Org Foundation Membership deadline extended

2023-04-19 Thread Ricardo Garcia
Several people reported getting multiple membership and election emails recently for the first time when we flushed the queue of messages which had been unfortunately held in moderation in the eve...@lists.x.org mailing list queue. Thanks Luc, Laurent and Harald for getting in touch! Thanks to oth

Re: [PATCH] drm/amd/amdgpu: Fix style issues in amdgpu_discovery.c

2023-04-19 Thread Alex Deucher
On Wed, Apr 19, 2023 at 9:15 AM Srinivasan Shanmugam wrote: > > Fix following checkpatch errors in amdgpu_discovery.c > > ERROR: space required after that ',' (ctx:VxV) > ERROR: space required before the open parenthesis '(' > ERROR: code indent should use tabs where possible > > Cc: Christian Kön

Re: [PATCH V3 1/2] drm/radeon: Fix integer overflow in radeon_cs_parser_init

2023-04-19 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Apr 19, 2023 at 8:24 AM Christian König wrote: > > Am 19.04.23 um 14:20 schrieb hackyzh002: > > The type of size is unsigned, if size is 0x4000, there will be an > > integer overflow, size will be zero after size *= sizeof(uint32_t), > > will cause uninitialize

Re: [PATCH 6.1.y] drm/amdgpu/vcn: Disable indirect SRAM on Vangogh broken BIOSes

2023-04-19 Thread Guilherme G. Piccoli
On 19/04/2023 10:16, Deucher, Alexander wrote: > [...] >> This is quite strange for me, we have 2 commit hashes pointing to the >> *same* commit, and each one is present..in a different release !!?! >> Since I've marked this patch as fixing 82132ecc5432 originally, 6.1.y stable >> misses it, since

RE: [PATCH 6.1.y] drm/amdgpu/vcn: Disable indirect SRAM on Vangogh broken BIOSes

2023-04-19 Thread Deucher, Alexander
[Public] > -Original Message- > From: Guilherme G. Piccoli > Sent: Wednesday, April 19, 2023 10:15 AM > To: Deucher, Alexander > Cc: sta...@vger.kernel.org; gre...@linuxfoundation.org; > sas...@kernel.org; amd-gfx@lists.freedesktop.org; Zhu, James > ; Liu, Leo ; ker...@gpiccoli.net; > ke

Re: [PATCH 09/13] drm/amdgpu: add get_gfx_shadow_info callback for gfx11

2023-04-19 Thread Alex Deucher
Ping? On Thu, Mar 30, 2023 at 3:18 PM Alex Deucher wrote: > > Used to get the size and alignment requirements for > the gfx shadow buffer for preemption. > > v2: use FW version check to determine whether to > return a valid size here > return an error if not supported (Alex) > v3: drop GD

Re: [PATCH 10/13] drm/amdgpu: add support for new GFX shadow size query

2023-04-19 Thread Alex Deucher
Ping? On Thu, Mar 30, 2023 at 3:18 PM Alex Deucher wrote: > > Use the new callback to fetch the data. Return an error if > not supported. UMDs should use this query to check whether > shadow buffers are supported and if so what size they > should be. > > v2: return an error rather than a zerod

Re: [PATCH 11/13] drm/amdgpu: bump driver version number for CP GFX shadow

2023-04-19 Thread Alex Deucher
Ping? On Thu, Mar 30, 2023 at 3:18 PM Alex Deucher wrote: > > So UMDs can determine whether the kernel supports this. > > Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21986 > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- > 1 file ch

[PATCH] drm/amd/display: remove unused variables otg_inst and cmd

2023-04-19 Thread Tom Rix
gcc reports drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c: In function ‘dcn21_set_backlight_level’: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_hwseq.c:229:18: error: unused variable ‘otg_inst’ [-Werror=unused-variable] 229 | uint32_t otg_inst = pipe_ctx->strea

[pull] amdgpu drm-fixes-6.3

2023-04-19 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 6.3. The following changes since commit 6a8f57ae2eb07ab39a6f0ccad60c760743051026: Linux 6.3-rc7 (2023-04-16 15:23:53 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-fixes-6.3-2023-04-19 for you to fetch

Re: [PATCH] drm/amdkfd: Fix some issues at userptr buffer validation process.

2023-04-19 Thread Chen, Xiaogang
On 4/18/2023 6:17 PM, Felix Kuehling wrote: On 2023-04-13 23:27, Chen, Xiaogang wrote: On 4/13/2023 3:08 PM, Felix Kuehling wrote: Am 2023-04-12 um 02:14 schrieb Xiaogang.Chen: From: Xiaogang Chen Notice userptr buffer restore process has following issues: 1: amdgpu_ttm_tt_get_user_pages