[PATCH] drm/amdgpu: fix Coverity explicit null dereferenced warnings

2024-07-24 Thread Tim Huang
This is to address the Coverity explicit null dereferenced warnings by NULL returns from amdgpu_mes_ctx_get_offs* but without follow-up Checks. Meanwhile refactor the code to keep only one *_get_gpu/cpu_addr. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 2 +- drivers/

[PATCH] amdgpu: allow setting contiguous on non-kernel bos for placement

2024-07-24 Thread Dave Airlie
From: Dave Airlie This is a partial revert of drm/amdgpu: Modify the contiguous flags behaviour. This broke VCN AV1 decoding on radv video on GFX11. On VCN4 only the first VCN block has AV1 decode support, so the kernel has a hacky heurisitic to work out from the submitted IB if it's AV1. YOU C

Re: [PATCH] amdgpu: allow setting contiguous on non-kernel bos for placement

2024-07-24 Thread Christian König
Am 24.07.24 um 09:02 schrieb Dave Airlie: From: Dave Airlie This is a partial revert of drm/amdgpu: Modify the contiguous flags behaviour. This broke VCN AV1 decoding on radv video on GFX11. On VCN4 only the first VCN block has AV1 decode support, so the kernel has a hacky heurisitic to work

Re: [PATCH] drm/amdgpu: fix Coverity explicit null dereferenced warnings

2024-07-24 Thread Christian König
Am 24.07.24 um 09:06 schrieb Tim Huang: This is to address the Coverity explicit null dereferenced warnings by NULL returns from amdgpu_mes_ctx_get_offs* but without follow-up Checks. Meanwhile refactor the code to keep only one *_get_gpu/cpu_addr. Well nice that you are looking into that, but

[PATCH] drm/amdgpu: fix contiguous handling for IB parsing

2024-07-24 Thread Christian König
Otherwise we won't get correct access to the IB. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index ec

RE: [PATCH] drm/amdgpu: fix Coverity explicit null dereferenced warnings

2024-07-24 Thread Huang, Tim
[Public] Hi Christian, > -Original Message- > From: Christian König > Sent: Wednesday, July 24, 2024 3:35 PM > To: Huang, Tim ; amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > > Subject: Re: [PATCH] drm/amdgpu: fix Coverity explicit null dereferenced > warni

Re: [PATCH v2 0/3] drm: backlight quirk infrastructure and lower minimum for Framework AMD 13

2024-07-24 Thread Jani Nikula
On Thu, 18 Jul 2024, Hans de Goede wrote: > Hi Thomas, > > On 6/24/24 6:15 PM, Thomas Weißschuh wrote: >> Hi Hans! >> >> thanks for your feedback! >> >> On 2024-06-24 11:11:40+, Hans de Goede wrote: >>> On 6/23/24 10:51 AM, Thomas Weißschuh wrote: The value of "min_input_signal" returne

RE: [PATCH 00/34] GC per queue reset

2024-07-24 Thread Zhu, Jiadong
[AMD Official Use Only - AMD Internal Distribution Only] > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: Friday, July 19, 2024 9:40 PM > To: Friedrich Vock > Cc: Deucher, Alexander ; amd- > g...@lists.freedesktop.org > Subject: Re: [PATCH 00/34] GC per queue rese

Re: [PATCH v7 1/2] drm/buddy: Add start address support to trim function

2024-07-24 Thread Matthew Auld
On 24/07/2024 02:35, Marek Olšák wrote: The reason is that our DCC requires 768K alignment in some cases. I haven't read this patch series, but one way to do that is to align to 256K, overallocate by 512K, and then not use either 0, 256K, or 512K at the beginning to get to 768K alignment. Ah,

Re: [PATCH v7 1/2] drm/buddy: Add start address support to trim function

2024-07-24 Thread Matthew Auld
On 23/07/2024 14:25, Arunpravin Paneer Selvam wrote: - Add a new start parameter in trim function to specify exact address from where to start the trimming. This would help us in situations like if drivers would like to do address alignment for specific requirements. - Add a new flag DR

[PATCH] drm/amd/pm: Ignore throttle events on SMUv13.0.6

2024-07-24 Thread Lijo Lazar
Spurious events are seen, temporarily ignore the events altogether. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/

Re: [PATCH] drm/scheduler: Fix drm_sched_entity_set_priority()

2024-07-24 Thread Christian König
Am 24.07.24 um 10:16 schrieb Tvrtko Ursulin: [SNIP] Absolutely. Absolutely good and absolutely me, or absolutely you? :) You, I don't even have time to finish all the stuff I already started :/ These are the TODO points and their opens: - Adjust amdgpu_ctx_set_entity_

Re: [PATCH v7 1/2] drm/buddy: Add start address support to trim function

2024-07-24 Thread Christian König
Am 24.07.24 um 11:37 schrieb Matthew Auld: On 24/07/2024 02:35, Marek Olšák wrote: The reason is that our DCC requires 768K alignment in some cases. I haven't read this patch series, but one way to do that is to align to 256K, overallocate by 512K, and then not use either 0, 256K, or 512K at t

[PATCH v1 0/3] vcn ip dump patches for vcn v3_0

2024-07-24 Thread Sunil Khatri
*** BLURB HERE *** Sunil Khatri (3): drm/amdgpu: add vcn ip dump ptr in vcn global struct drm/amdgpu: add vcn_v3_0 ip dump support drm/amdgpu: add print support for vcn_v3_0 ip dump drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 3 + drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 177 +

[PATCH v1 3/3] drm/amdgpu: add print support for vcn_v3_0 ip dump

2024-07-24 Thread Sunil Khatri
Add support for logging the registers in devcoredump buffer for vcn_v3_0. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 28 ++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm

[PATCH v1 1/3] drm/amdgpu: add vcn ip dump ptr in vcn global struct

2024-07-24 Thread Sunil Khatri
Add pointer to the vcn ip dump in the vcn global structure to be accessible for all vcn version via global adev. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h b/drivers/gpu/d

[PATCH v1 2/3] drm/amdgpu: add vcn_v3_0 ip dump support

2024-07-24 Thread Sunil Khatri
Add support of vcn ip dump in the devcoredump for vcn_v3_0. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 149 +- 1 file changed, 148 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/v

Re: CVE-2024-39471: drm/amdgpu: add error handle to avoid out-of-bounds

2024-07-24 Thread Siddh Raman Pant
(Mail V2: Send to correct mailing list and CCing relevant people.) On Tue, 25 Jun 2024 16:29:04 +0200, Greg Kroah-Hartman wrote: > In the Linux kernel, the following vulnerability has been resolved: > > drm/amdgpu: add error handle to avoid out-of-bounds > > if the sdma_v4_0_irq_id_to_seq return

Re: [PATCH 1/2] drm/amdgpu: properly handle vbios fake edid sizing

2024-07-24 Thread Thomas Weißschuh
On 2024-07-23 20:30:08+, Deucher, Alexander wrote: > > -Original Message- > > From: Thomas Weißschuh > > Sent: Tuesday, July 23, 2024 1:58 PM > > To: Deucher, Alexander > > Cc: amd-gfx@lists.freedesktop.org > > Subject: Re: [PATCH 1/2] drm/amdgpu: properly handle vbios fake edid sizin

Re: [PATCH] drm/scheduler: Fix drm_sched_entity_set_priority()

2024-07-24 Thread Tvrtko Ursulin
On 22/07/2024 16:13, Christian König wrote: Am 22.07.24 um 16:43 schrieb Tvrtko Ursulin: On 22/07/2024 15:06, Christian König wrote: Am 22.07.24 um 15:52 schrieb Tvrtko Ursulin: On 19/07/2024 16:18, Christian König wrote: Am 19.07.24 um 15:02 schrieb Christian König: Am 19.07.24 um 11:4

Re: [PATCH 2/2 V2] drm/radeon: properly handle vbios fake edid sizing

2024-07-24 Thread Thomas Weißschuh
On 2024-07-23 16:51:21+, Alex Deucher wrote: > The comment in the vbios structure says: > // = 128 means EDID length is 128 bytes, otherwise the EDID length = > ucFakeEDIDLength*128 > > This fake edid struct has not been used in a long time, so I'm > not sure if there were actually any boards

[PATCH -next] drm/amd/display: use swap() in sort()

2024-07-24 Thread Jiapeng Chong
Use existing swap() function rather than duplicating its implementation. ./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.c:17:29-30: WARNING opportunity for swap(). Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9573 Signed-off-by: Jiapeng

Re: [PATCH 1/2 V2] drm/amdgpu: properly handle vbios fake edid sizing

2024-07-24 Thread Thomas Weißschuh
On 2024-07-23 16:51:20+, Alex Deucher wrote: > The comment in the vbios structure says: > // = 128 means EDID length is 128 bytes, otherwise the EDID length = > ucFakeEDIDLength*128 > > This fake edid struct has not been used in a long time, so I'm > not sure if there were actually any boards

Re: [PATCH] drm/amdgpu: fix contiguous handling for IB parsing

2024-07-24 Thread Alex Deucher
On Wed, Jul 24, 2024 at 4:00 AM Christian König wrote: > > Otherwise we won't get correct access to the IB. > > Signed-off-by: Christian König Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3501 Fixes: e362b7c8f8c7 ("drm/amdgpu: Modify the contiguous flags behaviour") Reviewed-by: Alex

[PATCH][next] drm/amd/display: Fix spelling mistake "tolarance" -> "tolerance"

2024-07-24 Thread Colin Ian King
There is a spelling mistake in a dml2_printf message. Fix it. Signed-off-by: Colin Ian King --- .../display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_d

Re: [PATCH v2] drm/amdkfd: Change kfd/svm page fault drain handling

2024-07-24 Thread Chen, Xiaogang
On 7/23/2024 4:02 PM, Philip Yang wrote: On 2024-07-19 18:17, Xiaogang.Chen wrote: From: Xiaogang Chen When app unmap vm ranges(munmap) kfd/svm starts drain pending page fault and not handle any incoming pages fault of this process until a deferred work item got executed by default system wq

Re: [PATCH v7 1/2] drm/buddy: Add start address support to trim function

2024-07-24 Thread Jani Nikula
On Tue, 23 Jul 2024, Arunpravin Paneer Selvam wrote: > - Add a new start parameter in trim function to specify exact > address from where to start the trimming. This would help us > in situations like if drivers would like to do address alignment > for specific requirements. > > - Add a new

[PATCH] drm/amd/display: Reapply 2fde4fdddc1f

2024-07-24 Thread Nathan Chancellor
get higher clock than required rather than lower */ if (divider < DFS_DIVIDER_RANGE_2_START) { --- base-commit: bd4bea5ab2bda37ddb092a978218c4d9b46927e6 change-id: 20240724-amdgpu-dml2-fix-float-enum-warning-again-647a33789138 Best regards, -- Nathan Chancellor

Re: [PATCH v2 0/3] drm: backlight quirk infrastructure and lower minimum for Framework AMD 13

2024-07-24 Thread Alex Deucher
On Wed, Jul 24, 2024 at 4:58 AM Jani Nikula wrote: > > On Thu, 18 Jul 2024, Hans de Goede wrote: > > Hi Thomas, > > > > On 6/24/24 6:15 PM, Thomas Weißschuh wrote: > >> Hi Hans! > >> > >> thanks for your feedback! > >> > >> On 2024-06-24 11:11:40+, Hans de Goede wrote: > >>> On 6/23/24 10:51

Re: [PATCH v1 2/3] drm/amdgpu: add vcn_v3_0 ip dump support

2024-07-24 Thread Alex Deucher
On Wed, Jul 24, 2024 at 7:33 AM Sunil Khatri wrote: > > Add support of vcn ip dump in the devcoredump > for vcn_v3_0. > > Signed-off-by: Sunil Khatri > --- > drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 149 +- > 1 file changed, 148 insertions(+), 1 deletion(-) > > diff --git

Re: [PATCH v1 2/3] drm/amdgpu: add vcn_v3_0 ip dump support

2024-07-24 Thread Khatri, Sunil
On 7/24/2024 9:33 PM, Alex Deucher wrote: On Wed, Jul 24, 2024 at 7:33 AM Sunil Khatri wrote: Add support of vcn ip dump in the devcoredump for vcn_v3_0. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 149 +- 1 file changed, 148 insertions

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

2024-07-24 Thread Alex Deucher
Applied. Thanks! On Wed, Jul 24, 2024 at 9:50 AM Colin Ian King wrote: > > There is a spelling mistake in a dml2_printf message. Fix it. > > Signed-off-by: Colin Ian King > --- > .../display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletio

Re: [PATCH] drm/amd/display: Reapply 2fde4fdddc1f

2024-07-24 Thread Alex Deucher
*= 1.0 + margin; > > - divider = (unsigned int)(DFS_DIVIDER_RANGE_SCALE_FACTOR * > (vco_freq_khz / clock_khz)); > + divider = (unsigned int)((int)DFS_DIVIDER_RANGE_SCALE_FACTOR * > (vco_freq_khz / clock_khz)); > > /* we want to floor here to get higher clock than

Re: [PATCH -next] drm/amd/display: use swap() in sort()

2024-07-24 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Jul 24, 2024 at 3:38 AM Jiapeng Chong wrote: > > Use existing swap() function rather than duplicating its implementation. > > ./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.c:17:29-30: > WARNING opportunity for swap(). > > Reported-by: Abac

Re: 6.10/bisected/regression - Since commit e356d321d024 in the kernel log appears the message "MES failed to respond to msg=MISC (WAIT_REG_MEM)" which were never seen before

2024-07-24 Thread Mikhail Gavrilov
On Tue, Jul 23, 2024 at 2:34 AM Alex Deucher wrote: > Do either of these patches help? > https://patchwork.freedesktop.org/patch/605437/ Unfortunately, this patch didn't help. Please see the attached kernel log. > https://patchwork.freedesktop.org/patch/605201/ For which kernel is this patch int

[PATCH v2 3/4] drm/amdgpu: add vcn_v3_0 ip dump support

2024-07-24 Thread Sunil Khatri
Add support of vcn ip dump in the devcoredump for vcn_v3_0. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 149 +- 1 file changed, 148 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/v

[PATCH v2 1/4] drm/amdgpu: add vcn ip dump ptr in vcn global struct

2024-07-24 Thread Sunil Khatri
Add pointer to the vcn ip dump in the vcn global structure to be accessible for all vcn version via global adev. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h b/drivers/gpu/d

[PATCH v2 2/4] drm/amdgpu: add macro to calculate offset with instance

2024-07-24 Thread Sunil Khatri
Add macro definition which calculate offset of the register with index override. This is useful in case when there is an array of registers which is common for all instances. To read registers in that case it is easy to define registers once and the index value is manually passed to calculate prop

[PATCH v2 4/4] drm/amdgpu: add print support for vcn_v3_0 ip dump

2024-07-24 Thread Sunil Khatri
Add support for logging the registers in devcoredump buffer for vcn_v3_0. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 28 ++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm

[PATCH] drm/amdkfd: allow users to target recommended SDMA engines

2024-07-24 Thread Jonathan Kim
Certain GPUs have better copy performance over xGMI on specific SDMA engines depending on the source and destination GPU. Allow users to create SDMA queues on these recommended engines. Close to 2x overall performance has been observed with this optimization. v2: remove unnecessary crat updates an

Re: [PATCH v2] drm/amdkfd: Change kfd/svm page fault drain handling

2024-07-24 Thread Philip Yang
On 2024-07-24 09:58, Chen, Xiaogang wrote: On 7/23/2024 4:02 PM, Philip Yang wrote: On 2024-07-19 18:17, Xiaogang.Chen wrote: From: Xiaogang Chen When

Re: [PATCH] drm/amdkfd: allow users to target recommended SDMA engines

2024-07-24 Thread Felix Kuehling
On 2024-07-24 13:56, Jonathan Kim wrote: Certain GPUs have better copy performance over xGMI on specific SDMA engines depending on the source and destination GPU. Allow users to create SDMA queues on these recommended engines. Close to 2x overall performance has been observed with this optimiza

[PATCH] drm/amdgpu: Add error parameter to amdgpu_fence_driver_force_completion

2024-07-24 Thread vitaly.prosyak
From: Vitaly Prosyak In the case of a queue reset, we need the ability to customize the error code from -ECANCELED to -ENODATA for scenarios where the queue reset is successful. It was decided to use -ECANCELED for GPU reset cases and -ENODATA for queue reset cases. This change introduces an erro

[PATCH] drm/sched: Add error code parameter to drm_sched_start

2024-07-24 Thread vitaly.prosyak
From: Vitaly Prosyak The current implementation of drm_sched_start uses a hardcoded -ECANCELED to dispose of a job when the parent/hw fence is NULL. This results in drm_sched_job_done being called with -ECANCELED for each job with a NULL parent in the pending list, making it difficult to disti

[PATCH] drm/amdgpu: increase mes log buffer size for gfx12

2024-07-24 Thread Michael Chen
MES firmware requires larger log buffer for gfx12. Allocate proper buffer respectively for gfx11 and gfx12. Signed-off-by: Michael Chen --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 6 +++--- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c

Re: [PATCH] drm/sched: Add error code parameter to drm_sched_start

2024-07-24 Thread Alex Deucher
On Wed, Jul 24, 2024 at 2:43 PM wrote: > > From: Vitaly Prosyak > > The current implementation of drm_sched_start uses a hardcoded -ECANCELED to > dispose of a job when > the parent/hw fence is NULL. This results in drm_sched_job_done being called > with -ECANCELED for > each job with a NULL pa

Re: [PATCH v2] drm/amdkfd: Change kfd/svm page fault drain handling

2024-07-24 Thread Felix Kuehling
On 2024-07-19 18:17, Xiaogang.Chen wrote: From: Xiaogang Chen When app unmap vm ranges(munmap) kfd/svm starts drain pending page fault and not handle any incoming pages fault of this process until a deferred work item got executed by default system wq. The time period of "not handle page faul

Re: [PATCH 1/2] drm/amdkfd: support per-queue reset on gfx9

2024-07-24 Thread Felix Kuehling
On 2024-07-18 13:56, Jonathan Kim wrote: Support per-queue reset for GFX9. The recommendation is for the driver to target reset the HW queue via a SPI MMIO register write. Since this requires pipe and HW queue info and MEC FW is limited to doorbell reports of hung queues after an unmap failur

Re: [PATCH 1/2] drm/amdkfd: support per-queue reset on gfx9

2024-07-24 Thread Alex Deucher
On Wed, Jul 24, 2024 at 4:34 PM Felix Kuehling wrote: > > > On 2024-07-18 13:56, Jonathan Kim wrote: > > Support per-queue reset for GFX9. The recommendation is for the driver > > to target reset the HW queue via a SPI MMIO register write. > > > > Since this requires pipe and HW queue info and ME

Re: [PATCH] drm/scheduler: remove full_recover from drm_sched_start

2024-07-24 Thread Matthew Brost
On Mon, Jul 22, 2024 at 10:38:16AM +0200, Christian König wrote: > This was basically just another one of amdgpus hacks. The parameter > allowed to restart the scheduler without turning fence signaling on > again. > > That this is absolutely not a good idea should be obvious by now since > the fen

Re: [PATCH] drm/amdgpu: fix contiguous handling for IB parsing

2024-07-24 Thread Dave Airlie
On Wed, 24 Jul 2024 at 23:32, Alex Deucher wrote: > > On Wed, Jul 24, 2024 at 4:00 AM Christian König > wrote: > > > > Otherwise we won't get correct access to the IB. > > > > Signed-off-by: Christian König > > Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3501 > Fixes: e362b7c8f8c7 ("

Re: [PATCH] drm/amdgpu: fix contiguous handling for IB parsing

2024-07-24 Thread Dave Airlie
On Thu, 25 Jul 2024 at 09:09, Dave Airlie wrote: > > On Wed, 24 Jul 2024 at 23:32, Alex Deucher wrote: > > > > On Wed, Jul 24, 2024 at 4:00 AM Christian König > > wrote: > > > > > > Otherwise we won't get correct access to the IB. > > > > > > Signed-off-by: Christian König > > > > Closes: https

[PATCH] drm/amd/display: Add null check for pipe_ctx->plane_state in dcn20_program_pipe

2024-07-24 Thread Srinivasan Shanmugam
This commit addresses a null pointer dereference issue in the `dcn20_program_pipe` function. The issue could occur when `pipe_ctx->plane_state` is null. The fix adds a check to ensure `pipe_ctx->plane_state` is not null before accessing. This prevents a null pointer dereference. Reported by smatc

[PATCH] drm/amd/display: Add null check for top_pipe_to_program in commit_planes_for_stream

2024-07-24 Thread Srinivasan Shanmugam
This commit addresses a null pointer dereference issue in the `commit_planes_for_stream` function at line 4140. The issue could occur when `top_pipe_to_program` is null. The fix adds a check to ensure `top_pipe_to_program` is not null before accessing its stream_res. This prevents a null pointer d

[PATCH 1/2] drm/sched: Add error code parameter to drm_sched_start

2024-07-24 Thread vitaly.prosyak
From: Vitaly Prosyak The current implementation of drm_sched_start uses a hardcoded -ECANCELED to dispose of a job when the parent/hw fence is NULL. This results in drm_sched_job_done being called with -ECANCELED for each job with a NULL parent in the pending list, making it difficult to disti

Re: [PATCH] drm/amdgpu: fix contiguous handling for IB parsing

2024-07-24 Thread Dave Airlie
On Wed, 24 Jul 2024 at 23:32, Alex Deucher wrote: > > On Wed, Jul 24, 2024 at 4:00 AM Christian König > wrote: > > > > Otherwise we won't get correct access to the IB. > > > > Signed-off-by: Christian König > > Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3501 > Fixes: e362b7c8f8c7 ("

RE: [PATCH v1 2/3] drm/amdgpu: add vcn_v3_0 ip dump support

2024-07-24 Thread Gopalakrishnan, Veerabadhran (Veera)
[AMD Official Use Only - AMD Internal Distribution Only] -Original Message- From: amd-gfx On Behalf Of Khatri, Sunil Sent: Wednesday, July 24, 2024 10:00 PM To: Alex Deucher ; Khatri, Sunil Cc: Deucher, Alexander ; Liu, Leo ; Koenig, Christian ; amd-gfx@lists.freedesktop.org Subject: Re

Re: [PATCH v1 2/3] drm/amdgpu: add vcn_v3_0 ip dump support

2024-07-24 Thread Khatri, Sunil
On 7/25/2024 10:58 AM, Gopalakrishnan, Veerabadhran (Veera) wrote: [AMD Official Use Only - AMD Internal Distribution Only] -Original Message- From: amd-gfx On Behalf Of Khatri, Sunil Sent: Wednesday, July 24, 2024 10:00 PM To: Alex Deucher ; Khatri, Sunil Cc: Deucher, Alexander ; Li

[PATCH v3 3/4] drm/amdgpu: add vcn_v3_0 ip dump support

2024-07-24 Thread Sunil Khatri
Add support of vcn ip dump in the devcoredump for vcn_v3_0. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 149 +- 1 file changed, 148 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/v

[PATCH v3 2/4] drm/amdgpu: add macro to calculate offset with instance

2024-07-24 Thread Sunil Khatri
Add macro definition which calculate offset of the register with index override. This is useful in case when there is an array of registers which is common for all instances. To read registers in that case it is easy to define registers once and the index value is manually passed to calculate prop

[PATCH v3 4/4] drm/amdgpu: add print support for vcn_v3_0 ip dump

2024-07-24 Thread Sunil Khatri
Add support for logging the registers in devcoredump buffer for vcn_v3_0. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 28 ++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm

[PATCH v3 1/4] drm/amdgpu: add vcn ip dump ptr in vcn global struct

2024-07-24 Thread Sunil Khatri
Add pointer to the vcn ip dump in the vcn global structure to be accessible for all vcn version via global adev. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h b/drivers/gpu/d

Re: [PATCH -next] drm/amd/display: use swap() in sort()

2024-07-24 Thread Christian König
Am 24.07.24 um 09:37 schrieb Jiapeng Chong: Use existing swap() function rather than duplicating its implementation. ./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.c:17:29-30: WARNING opportunity for swap(). Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.