[PATCH v6 5/5] drm/amdgpu: Create version number for coredumps

2023-09-10 Thread André Almeida
. Signed-off-by: André Almeida Reviewed-by: Shashank Sharma --- v6: no change --- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c b/drivers/gpu/drm/amd

[PATCH v6 4/5] drm/amdgpu: Move coredump code to amdgpu_reset file

2023-09-10 Thread André Almeida
Giving that we use codedump just for device resets, move it's functions and structs to a more semantic file, the amdgpu_reset.{c, h}. Signed-off-by: André Almeida Reviewed-by: Shashank Sharma --- v6: no change v5: no change --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 9 --- drivers/gpu

[PATCH v6 2/5] drm/amdgpu: Rework coredump to use memory dynamically

2023-09-10 Thread André Almeida
Instead of storing coredump information inside amdgpu_device struct, move if to a proper separated struct and allocate it dynamically. This will make it easier to further expand the logged information. Signed-off-by: André Almeida Reviewed-by: Shashank Sharma --- v6: no change v5: no change v4

[PATCH v6 0/5] drm/amdgpu: Rework coredump memory allocation

2023-09-10 Thread André Almeida
1-andrealm...@igalia.com/ - Drop "Mark contexts guilty for causing soft recoveries" patch - Use GFP_NOWAIT for devcoredump allocatio André Almeida (5): drm/amdgpu: Allocate coredump memory in a nonblocking way drm/amdgpu: Rework coredump to use memory dynamically drm/amdgpu: Encapsulate a

[PATCH v6 1/5] drm/amdgpu: Allocate coredump memory in a nonblocking way

2023-09-10 Thread André Almeida
During a GPU reset, a normal memory reclaim could block to reclaim memory. Giving that coredump is a best effort mechanism, it shouldn't disturb the reset path. Change its memory allocation flag to a nonblocking one. Signed-off-by: André Almeida Reviewed-by: Christian König --- v5: no change

[PATCH v6 3/5] drm/amdgpu: Encapsulate all device reset info

2023-09-10 Thread André Almeida
To better organize struct amdgpu_device, keep all reset information related fields together in a separated struct. Signed-off-by: André Almeida Reviewed-by: Shashank Sharma --- v6: no changes v5: new patch, as required by Shashank Sharma --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 34

Re: [PATCH v3 0/2] Merge all debug module parameters

2023-09-11 Thread André Almeida
Christian, Alex, I think this series is ready to be picked as well. Em 31/08/2023 12:29, André Almeida escreveu: As suggested by Christian at [0], this patchset merges all debug modules parameters and creates a new one for disabling soft recovery: Maybe we can overload the amdgpu_gpu_recovery

[PATCH v4 2/2] drm/amdgpu: Create an option to disable soft recovery

2023-09-11 Thread André Almeida
Create a module option to disable soft recoveries on amdgpu, making every recovery go through the device reset path. This option makes easier to force device resets for testing and debugging purposes. Signed-off-by: André Almeida Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu

[PATCH v4 0/2] Merge all debug module parameters

2023-09-11 Thread André Almeida
lore.kernel.org/lkml/20230824162505.173399-1-andrealm...@igalia.com/ André Almeida (2): drm/amdgpu: Merge debug module parameters drm/amdgpu: Create an option to disable soft recovery drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu

[PATCH v4 1/2] drm/amdgpu: Merge debug module parameters

2023-09-11 Thread André Almeida
Merge all developer debug options available as separated module parameters in one, making it obvious that are for developers. Drop the obsolete module options in favor of the new ones. Signed-off-by: André Almeida Reviewed-by: Christian König --- v3: - move from include/amd_shared.h to amdgpu

Re: [PATCH v4 0/2] Merge all debug module parameters

2023-09-11 Thread André Almeida
Em 11/09/2023 14:21, Hamza Mahfooz escreveu: On 9/11/23 13:12, André Almeida wrote: As suggested by Christian at [0], this patchset merges all debug modules parameters and creates a new one for disabling soft recovery: Maybe we can overload the amdgpu_gpu_recovery module option

[PATCH 0/2] drm/amdgpu: Merge all debug module parameters

2023-08-24 Thread André Almeida
ug option. This way it should be pretty obvious that this > isn't meant to be used by someone who doesn't know how to use it. [0] https://lore.kernel.org/dri-devel/55f69184-1aa2-55d6-4a10-1560d75c7...@amd.com/ André Almeida (2): drm/amdgpu: Merge debug module parameters drm/amdgpu: Crea

[PATCH 1/2] drm/amdgpu: Merge debug module parameters

2023-08-24 Thread André Almeida
Merge all developer debug options available as separated module parameters in one, making it obvious that are for developers. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 24 drivers/gpu/drm/amd/include/amd_shared.h | 9 + 2 files

[PATCH 2/2] drm/amdgpu: Create an option to disable soft recovery

2023-08-24 Thread André Almeida
Create a module option to disable soft recoveries on amdgpu, making every recovery go through the device reset path. This option makes easier to force device resets for testing and debugging purposes. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu

[PATCH v2 0/2] Merge all debug module parameters

2023-08-30 Thread André Almeida
ev-> vars v1: https://lore.kernel.org/lkml/20230824162505.173399-1-andrealm...@igalia.com/ André Almeida (2): drm/amdgpu: Merge debug module parameters drm/amdgpu: Create an option to disable soft recovery drivers/gpu/drm/amd/amdgpu/amdgpu.h | 5 +++ drivers/gpu/drm/amd/amdgpu/amd

[PATCH v2 2/2] drm/amdgpu: Create an option to disable soft recovery

2023-08-30 Thread André Almeida
Create a module option to disable soft recoveries on amdgpu, making every recovery go through the device reset path. This option makes easier to force device resets for testing and debugging purposes. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu

[PATCH v2 1/2] drm/amdgpu: Merge debug module parameters

2023-08-30 Thread André Almeida
Merge all developer debug options available as separated module parameters in one, making it obvious that are for developers. Drop the obsolete module options in favor of the new ones. Signed-off-by: André Almeida --- v2: - drop old module params - use BIT() macros - replace global var

[PATCH v3 0/2] Merge all debug module parameters

2023-08-31 Thread André Almeida
.c v2: https://lore.kernel.org/lkml/20230830220808.421935-1-andrealm...@igalia.com/ - drop old module params - use BIT() macros - replace global var with adev-> vars v1: https://lore.kernel.org/lkml/20230824162505.173399-1-andrealm...@igalia.com/ André Almeida (2): drm/amdgpu: Merge debug module paramete

[PATCH v3 1/2] drm/amdgpu: Merge debug module parameters

2023-08-31 Thread André Almeida
Merge all developer debug options available as separated module parameters in one, making it obvious that are for developers. Drop the obsolete module options in favor of the new ones. Signed-off-by: André Almeida Reviewed-by: Christian König --- v3: - move from include/amd_shared.h to amdgpu

[PATCH v3 2/2] drm/amdgpu: Create an option to disable soft recovery

2023-08-31 Thread André Almeida
Create a module option to disable soft recoveries on amdgpu, making every recovery go through the device reset path. This option makes easier to force device resets for testing and debugging purposes. Signed-off-by: André Almeida Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu

Re: [PATCH v6 6/6] drm/doc: Define KMS atomic state set

2023-10-16 Thread André Almeida
Hi Pekka, On 10/16/23 14:18, Pekka Paalanen wrote: On Mon, 16 Oct 2023 12:52:32 +0200 André Almeida wrote: Hi Michel, On 8/17/23 12:37, Michel Dänzer wrote: On 8/15/23 20:57, André Almeida wrote: From: Pekka Paalanen Specify how the atomic state is maintained between userspace

Re: [PATCH v6 6/6] drm/doc: Define KMS atomic state set

2023-10-16 Thread André Almeida
On 10/16/23 16:52, Pekka Paalanen wrote: On Mon, 16 Oct 2023 15:42:16 +0200 André Almeida wrote: Hi Pekka, On 10/16/23 14:18, Pekka Paalanen wrote: On Mon, 16 Oct 2023 12:52:32 +0200 André Almeida wrote: Hi Michel, On 8/17/23 12:37, Michel Dänzer wrote: On 8/15/23 20:57, André

[PATCH v7 5/6] drm/doc: Define KMS atomic state set

2023-10-17 Thread André Almeida
From: Pekka Paalanen Specify how the atomic state is maintained between userspace and kernel, plus the special case for async flips. Signed-off-by: Pekka Paalanen Signed-off-by: André Almeida --- v7: - add a note that drivers can make exceptions for ad-hoc prop changes - add a note about

[PATCH v7 2/6] drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP

2023-10-17 Thread André Almeida
-by: Simon Ser Reviewed-by: André Almeida Reviewed-by: Alex Deucher Signed-off-by: André Almeida --- drivers/gpu/drm/drm_ioctl.c | 5 + include/uapi/drm/drm.h | 10 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm

[PATCH v7 4/6] drm: Refuse to async flip with atomic prop changes

2023-10-17 Thread André Almeida
-by: André Almeida --- v7: drop the mode_id exception for prop changes --- drivers/gpu/drm/drm_atomic_uapi.c | 47 +++-- drivers/gpu/drm/drm_crtc_internal.h | 2 +- drivers/gpu/drm/drm_mode_object.c | 2 +- 3 files changed, 46 insertions(+), 5 deletions(-) diff --git

[PATCH v7 3/6] drm: introduce drm_mode_config.atomic_async_page_flip_not_supported

2023-10-17 Thread André Almeida
missing atomic support for async flips. New drivers should not set this flag, instead they should support atomic async flips (if they support async flips at all). IOW, we don't want more drivers with async flip support for legacy but not atomic. Signed-off-by: Simon Ser Reviewed-by: André Almeida

[PATCH v7 0/6] drm: Add support for atomic async page-flip

2023-10-17 Thread André Almeida
the KMS atomic state set v3: https://lore.kernel.org/dri-devel/20220929184307.258331-1-cont...@emersion.fr/ André Almeida (1): drm: Refuse to async flip with atomic prop changes Pekka Paalanen (1): drm/doc: Define KMS atomic state set Simon Ser (4): drm: allow DRM_MODE_PAGE_FLIP_ASYNC

[PATCH v7 6/6] amd/display: indicate support for atomic async page-flips on DC

2023-10-17 Thread André Almeida
Almeida Reviewed-by: Alex Deucher Signed-off-by: André Almeida --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 9d5742923aed

[PATCH v7 1/6] drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits

2023-10-17 Thread André Almeida
to something else. For instance, Xorg falls back to a blit. Another option is to wait as close to the next vblank as possible before performing the page-flip to reduce latency. Signed-off-by: Simon Ser Reviewed-by: Alex Deucher Co-developed-by: André Almeida Signed-off-by: André Almeida

[PATCH v8 3/6] drm: introduce drm_mode_config.atomic_async_page_flip_not_supported

2023-10-24 Thread André Almeida
missing atomic support for async flips. New drivers should not set this flag, instead they should support atomic async flips (if they support async flips at all). IOW, we don't want more drivers with async flip support for legacy but not atomic. Signed-off-by: Simon Ser Reviewed-by: André Almeida

[PATCH v8 4/6] drm: Refuse to async flip with atomic prop changes

2023-10-24 Thread André Almeida
Signed-off-by: André Almeida --- v8: add a check for plane type, we can only flip primary planes v7: drop the mode_id exception for prop changes --- --- drivers/gpu/drm/drm_atomic_uapi.c | 54 +++-- drivers/gpu/drm/drm_crtc_internal.h | 2 +- drivers/gpu/drm

[PATCH v8 5/6] drm/doc: Define KMS atomic state set

2023-10-24 Thread André Almeida
From: Pekka Paalanen Specify how the atomic state is maintained between userspace and kernel, plus the special case for async flips. Signed-off-by: Pekka Paalanen Signed-off-by: André Almeida --- v8: - no changes v7: - add a note that drivers can make exceptions for ad-hoc prop changes - add

[PATCH v8 1/6] drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits

2023-10-24 Thread André Almeida
to something else. For instance, Xorg falls back to a blit. Another option is to wait as close to the next vblank as possible before performing the page-flip to reduce latency. Signed-off-by: Simon Ser Reviewed-by: Alex Deucher Co-developed-by: André Almeida Signed-off-by: André Almeida

[PATCH v8 2/6] drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP

2023-10-24 Thread André Almeida
-by: Simon Ser Reviewed-by: André Almeida Reviewed-by: Alex Deucher Signed-off-by: André Almeida --- drivers/gpu/drm/drm_ioctl.c | 5 + include/uapi/drm/drm.h | 10 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm

[PATCH v8 6/6] amd/display: indicate support for atomic async page-flips on DC

2023-10-24 Thread André Almeida
Almeida Reviewed-by: Alex Deucher Signed-off-by: André Almeida --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index dec6e43e7198

[PATCH v8 0/6] drm: Add support for atomic async page-flip

2023-10-24 Thread André Almeida
/20220929184307.258331-1-cont...@emersion.fr/ André Almeida (1): drm: Refuse to async flip with atomic prop changes Pekka Paalanen (1): drm/doc: Define KMS atomic state set Simon Ser (4): drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP drm: introduce

[PATCH v8] drm/doc: Document DRM device reset expectations

2023-09-29 Thread André Almeida
Create a section that specifies how to deal with DRM device resets for kernel and userspace drivers. Acked-by: Pekka Paalanen Acked-by: Sebastian Wick Signed-off-by: André Almeida --- v8 changes: - Add acked-by tags v7: https://lore.kernel.org/dri-devel/20230818200642.276735-1-andrealm

Re: [PATCH v6 6/6] drm/doc: Define KMS atomic state set

2023-10-16 Thread André Almeida
Hi Michel, On 8/17/23 12:37, Michel Dänzer wrote: On 8/15/23 20:57, André Almeida wrote: From: Pekka Paalanen Specify how the atomic state is maintained between userspace and kernel, plus the special case for async flips. Signed-off-by: Pekka Paalanen Signed-off-by: André Almeida

Re: [PATCH v4 2/4] drm/amdgpu: Rework coredump to use memory dynamically

2023-08-17 Thread André Almeida
Em 17/08/2023 12:26, Shashank Sharma escreveu: On 17/08/2023 17:17, André Almeida wrote: Em 17/08/2023 12:04, Shashank Sharma escreveu: On 17/08/2023 15:45, André Almeida wrote: Hi Shashank, Em 17/08/2023 03:41, Shashank Sharma escreveu: Hello Andre, On 15/08/2023 21:50, André

Re: [PATCH v4 2/4] drm/amdgpu: Rework coredump to use memory dynamically

2023-08-17 Thread André Almeida
Em 17/08/2023 12:04, Shashank Sharma escreveu: On 17/08/2023 15:45, André Almeida wrote: Hi Shashank, Em 17/08/2023 03:41, Shashank Sharma escreveu: Hello Andre, On 15/08/2023 21:50, André Almeida wrote: Instead of storing coredump information inside amdgpu_device struct, move

[PATCH v5 2/5] drm/amdgpu: Rework coredump to use memory dynamically

2023-08-17 Thread André Almeida
Instead of storing coredump information inside amdgpu_device struct, move if to a proper separated struct and allocate it dynamically. This will make it easier to further expand the logged information. Signed-off-by: André Almeida --- v5: no change v4: change kmalloc to kzalloc --- drivers/gpu

[PATCH v5 3/5] drm/amdgpu: Encapsulate all device reset info

2023-08-17 Thread André Almeida
To better organize struct amdgpu_device, keep all reset information related fields together in a separated struct. Signed-off-by: André Almeida --- v5: new patch, as requested by Shashank Sharma --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 34 + drivers/gpu/drm/amd

[PATCH v5 4/5] drm/amdgpu: Move coredump code to amdgpu_reset file

2023-08-17 Thread André Almeida
Giving that we use codedump just for device resets, move it's functions and structs to a more semantic file, the amdgpu_reset.{c, h}. Signed-off-by: André Almeida --- v5: no change --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 9 --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 78

[PATCH v5 5/5] drm/amdgpu: Create version number for coredumps

2023-08-17 Thread André Almeida
. Signed-off-by: André Almeida --- v5: new patch drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c index

[PATCH v5 1/5] drm/amdgpu: Allocate coredump memory in a nonblocking way

2023-08-17 Thread André Almeida
During a GPU reset, a normal memory reclaim could block to reclaim memory. Giving that coredump is a best effort mechanism, it shouldn't disturb the reset path. Change its memory allocation flag to a nonblocking one. Signed-off-by: André Almeida Reviewed-by: Christian König --- v5: no change

[PATCH v5 0/5] drm/amdgpu: Rework coredump memory allocation

2023-08-17 Thread André Almeida
evcoredump allocatio André Almeida (5): drm/amdgpu: Allocate coredump memory in a nonblocking way drm/amdgpu: Rework coredump to use memory dynamically drm/amdgpu: Encapsulate all device reset info drm/amdgpu: Move coredump code to amdgpu_reset file drm/amdgpu: Create version number for

Re: [PATCH v4 2/4] drm/amdgpu: Rework coredump to use memory dynamically

2023-08-17 Thread André Almeida
Hi Shashank, Em 17/08/2023 03:41, Shashank Sharma escreveu: Hello Andre, On 15/08/2023 21:50, André Almeida wrote: Instead of storing coredump information inside amdgpu_device struct, move if to a proper separated struct and allocate it dynamically. This will make it easier to further expand

Re: [PATCH v6 6/6] drm/doc: Define KMS atomic state set

2023-08-21 Thread André Almeida
Hi Michel, Em 17/08/2023 07:37, Michel Dänzer escreveu: On 8/15/23 20:57, André Almeida wrote: From: Pekka Paalanen Specify how the atomic state is maintained between userspace and kernel, plus the special case for async flips. Signed-off-by: Pekka Paalanen Signed-off-by: André Almeida

Re: [PATCH v7] drm/doc: Document DRM device reset expectations

2023-08-23 Thread André Almeida
Hi Rodrigo, Em 23/08/2023 14:31, Rodrigo Vivi escreveu: On Fri, Aug 18, 2023 at 05:06:42PM -0300, André Almeida wrote: Create a section that specifies how to deal with DRM device resets for kernel and userspace drivers. Signed-off-by: André Almeida --- v7 changes: - s/application

[PATCH v7] drm/doc: Document DRM device reset expectations

2023-08-18 Thread André Almeida
Create a section that specifies how to deal with DRM device resets for kernel and userspace drivers. Signed-off-by: André Almeida --- v7 changes: - s/application/graphical API contex/ in the robustness part (Michel) - Grammar fixes (Randy) v6: https://lore.kernel.org/lkml

[PATCH v6 0/6] drm: Add support for atomic async page-flip

2023-08-15 Thread André Almeida
://lore.kernel.org/dri-devel/20220929184307.258331-1-cont...@emersion.fr/ André Almeida (1): drm: Refuse to async flip with atomic prop changes Pekka Paalanen (1): drm/doc: Define KMS atomic state set Simon Ser (4): drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits drm: introduce

[PATCH v6 6/6] drm/doc: Define KMS atomic state set

2023-08-15 Thread André Almeida
From: Pekka Paalanen Specify how the atomic state is maintained between userspace and kernel, plus the special case for async flips. Signed-off-by: Pekka Paalanen Signed-off-by: André Almeida --- v5: Add note that not every redundant attribute will result in no-op v4: total rework by Pekka

[PATCH v6 4/6] amd/display: indicate support for atomic async page-flips on DC

2023-08-15 Thread André Almeida
Almeida Reviewed-by: Alex Deucher Signed-off-by: André Almeida --- v5: no changes v4: no changes --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH v6 5/6] drm: Refuse to async flip with atomic prop changes

2023-08-15 Thread André Almeida
-by: André Almeida --- v5: no changes v4: new patch --- drivers/gpu/drm/drm_atomic_helper.c | 5 +++ drivers/gpu/drm/drm_atomic_uapi.c | 52 +++-- drivers/gpu/drm/drm_crtc_internal.h | 2 +- drivers/gpu/drm/drm_mode_object.c | 2 +- 4 files changed, 56 insertions(+), 5

[PATCH v6 1/6] drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits

2023-08-15 Thread André Almeida
to something else. For instance, Xorg falls back to a blit. Another option is to wait as close to the next vblank as possible before performing the page-flip to reduce latency. Signed-off-by: Simon Ser Reviewed-by: Alex Deucher Co-developed-by: André Almeida Signed-off-by: André Almeida --- v5

[PATCH v6 2/6] drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP

2023-08-15 Thread André Almeida
-by: Simon Ser Reviewed-by: André Almeida Reviewed-by: Alex Deucher Signed-off-by: André Almeida --- v5: no changes v4: no changes --- drivers/gpu/drm/drm_ioctl.c | 5 + include/uapi/drm/drm.h | 10 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH v6 3/6] drm: introduce drm_mode_config.atomic_async_page_flip_not_supported

2023-08-15 Thread André Almeida
missing atomic support for async flips. New drivers should not set this flag, instead they should support atomic async flips (if they support async flips at all). IOW, we don't want more drivers with async flip support for legacy but not atomic. Signed-off-by: Simon Ser Reviewed-by: André Almeida

[PATCH v4 0/4] drm/amdgpu: Rework coredump memory allocation

2023-08-15 Thread André Almeida
/dri-devel/20230711213501.526237-1-andrealm...@igalia.com/ - Drop "Mark contexts guilty for causing soft recoveries" patch - Use GFP_NOWAIT for devcoredump allocation André Almeida (4): drm/amdgpu: Allocate coredump memory in a nonblocking way drm/amdgpu: Rework coredump to use memo

[PATCH v4 1/4] drm/amdgpu: Allocate coredump memory in a nonblocking way

2023-08-15 Thread André Almeida
During a GPU reset, a normal memory reclaim could block to reclaim memory. Giving that coredump is a best effort mechanism, it shouldn't disturb the reset path. Change its memory allocation flag to a nonblocking one. Signed-off-by: André Almeida Reviewed-by: Christian König --- drivers/gpu/drm

[PATCH v4 2/4] drm/amdgpu: Rework coredump to use memory dynamically

2023-08-15 Thread André Almeida
Instead of storing coredump information inside amdgpu_device struct, move if to a proper separated struct and allocate it dynamically. This will make it easier to further expand the logged information. Signed-off-by: André Almeida --- v4: change kmalloc to kzalloc --- drivers/gpu/drm/amd/amdgpu

[PATCH v4 3/4] drm/amdgpu: Move coredump code to amdgpu_reset file

2023-08-15 Thread André Almeida
Giving that we use codedump just for device resets, move it's functions and structs to a more semantic file, the amdgpu_reset.{c, h}. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 9 --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 78

[PATCH v4 4/4] drm/amdgpu: Create version number for coredumps

2023-08-15 Thread André Almeida
. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c index 46c8d6ce349c

Re: [PATCH 1/2] drm/amdgpu: Merge debug module parameters

2023-08-25 Thread André Almeida
Em 25/08/2023 03:56, Christian König escreveu: > Am 24.08.23 um 18:25 schrieb André Almeida: >> Merge all developer debug options available as separated module >> parameters in one, making it obvious that are for developers. >> >> Signed-off-by: André Almeida >

Re: [PATCH 1/2] drm/amdgpu: Merge debug module parameters

2023-08-25 Thread André Almeida
Em 25/08/2023 09:29, Christian König escreveu: Am 25.08.23 um 14:24 schrieb André Almeida: Em 25/08/2023 03:56, Christian König escreveu: > Am 24.08.23 um 18:25 schrieb André Almeida: >> Merge all developer debug options available as separated module >> parameters in one, ma

[PATCH] drm/amd: Document device reset methods

2023-11-10 Thread André Almeida
Document what each amdgpu driver reset method does. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 20 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index a79d53bdbe13

[PATCH v2] drm/amd: Document device reset methods

2023-11-10 Thread André Almeida
Document what each amdgpu driver reset method does. Signed-off-by: André Almeida --- v2: Add more details and small correction (Alex) drivers/gpu/drm/amd/amdgpu/amdgpu.h | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b

[PATCH] drm/amdpgu/debugfs: Simplify some exit paths

2022-07-04 Thread André Almeida
To avoid code repetition, unify the function exit path when possible. No functional changes. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 107 1 file changed, 42 insertions(+), 65 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v2 1/1] drm/amd/pm: Implement get GFXOFF status for vangogh

2022-07-11 Thread André Almeida
Implement function to get current GFXOFF status for vangogh. Signed-off-by: André Almeida --- Changes from v1: - Squash commits in a single one .../gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 38 +++ 1 file changed, 38 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu

[PATCH 2/2] drm/amd/pm: Implement get GFXOFF status for vangogh

2022-07-11 Thread André Almeida
Implement function to get current GFXOFF status for vangogh. Signed-off-by: André Almeida --- .../gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 26 +++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/drivers/gpu/drm/amd/pm/swsmu

[PATCH 1/2] drm/amd/pm: Add GFXOFF registers for vangogh

2022-07-11 Thread André Almeida
Add register values to access GFXOFF data for vangogh GPU. Signed-off-by: André Almeida --- .../pm/swsmu/inc/pmfw_if/smu11_driver_if_vangogh.h | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu11_driver_if_vangogh.h b/drivers/gpu

[PATCH 0/2] drm/amd/pm: Add GFXOFF status for vangogh

2022-07-11 Thread André Almeida
the generation. André Almeida (2): drm/amd/pm: Add GFXOFF registers for vangogh drm/amd/pm: Implement get GFXOFF status for vangogh .../inc/pmfw_if/smu11_driver_if_vangogh.h | 12 + .../gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 26 +++ 2 files changed, 38 insertions

Re: [PATCH] drm/amd/display: remove duplicate dcn314 includes

2022-07-12 Thread André Almeida
Às 10:55 de 12/07/22, Alex Deucher escreveu: > Several headers were included twice. Fix that. > > Reported-by: kernel test robot > Signed-off-by: Alex Deucher > --- Reviewed-by: André Almeida In the future, for new files, it's a good practice to keep includes sorted.

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

2022-07-12 Thread André Almeida
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 double free. Freeing tmp in the condition after new is > assigned with new

Re: [PATCH 1/2] drm/amd/display: fix comment format

2022-07-12 Thread André Almeida
Hi Alex, Às 11:31 de 12/07/22, Alex Deucher escreveu: > This is not a compliant kerneldoc comment, so make it just > a regular comment. > > Reported-by: kernel test robot > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 2 +- > 1 file changed, 1

Re: [PATCH] drm/amd/pm: Prevent divide by zero

2022-07-12 Thread André Almeida
> Speed is user-configurable through a file. > I accidentally set it to zero, and the driver crashed. > > Signed-off-by: Yefim Barashkin > --- Reviewed-by: André Almeida Minor nit, I would write this commit message like this: Speed is user-configurable through a file.

Re: [PATCH] drm/amd/display: make some dc_dmub_srv functions static

2022-07-12 Thread André Almeida
Às 12:50 de 08/07/22, Alex Deucher escreveu: > Not used outside of dc_dmub_srv.c. > > Reported-by: kernel test robot > Signed-off-by: Alex Deucher Reviewed-by: André Almeida

Re: [PATCH] drm/amdgpu: Fix the incomplete product number

2022-07-20 Thread André Almeida
Às 05:26 de 20/07/22, Roy Sun escreveu: > The comments say that the product number is a 16-digit HEX string so the > buffer needs to be at least 17 characters to hold the NUL terminator. > Which comment? > Signed-off-by: Roy Sun > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- > 1 file

Re: [PATCH] drm/amdgpu: Fix the incomplete product number

2022-07-20 Thread André Almeida
Às 05:26 de 20/07/22, Roy Sun escreveu: > The comments say that the product number is a 16-digit HEX string so the > buffer needs to be at least 17 characters to hold the NUL terminator. > > Signed-off-by: Roy Sun > --- Reviewed-by: André Almeida ...but I would appreciate

Re: [PATCH 09/31] drm/amd/display: Create a file dedicated for CRTC

2022-07-20 Thread André Almeida
Hi Siqueira :) Às 15:16 de 15/07/22, Rodrigo Siqueira escreveu: > [Why] > The amdgpu_dm file contains most of the code that works as an interface > between DRM API and DC. As a result, this file becomes very large since > it comprises multiple abstractions such as CRTC manipulation. > > [How] >

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

2022-07-16 Thread André Almeida
Às 13:45 de 14/07/22, Maíra Canal escreveu: > 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. > >

Re: [PATCH 1/4] drm/amd/display: Drop dm_sw_gfx7_2d_thin_l_vp and dm_sw_gfx7_2d_thin_gl

2022-07-21 Thread André Almeida
Às 15:22 de 20/07/22, Maíra Canal escreveu: > As the enum dm_sw_gfx7_2d_thin_gl and dm_sw_gfx7_2d_thin_l_vp are not > used on the codebase, this commit drops those entries from enum > dm_swizzle_mode. > dm_sw_gfx7_2d_thin_gl and dm_sw_gfx7_2d_thin_l_vp are not enums, but rather enum items or

Re: [PATCH] drm/amd/pm: Add get_gfx_off_status interface

2022-07-21 Thread André Almeida
Hi Shikai, Could you change the commit message to drm/amd/pm: Add get_gfx_off_status interface for yellow carp Otherwise, we are going to have duplicated commit messages for each new architecture supporting get_gfx_off_status. Also, giving that this is the second version of your patch, the

Re: [PATCH 2/4] drm/amd/display: Remove duplicated CalculateWriteBackDISPCLK

2022-07-21 Thread André Almeida
Às 15:22 de 20/07/22, Maíra Canal escreveu: > The functions dml30_CalculateWriteBackDISPCLK and > dml31_CalculateWriteBackDISPCLK are identical. Therefor, to avoid > code duplication, dml31_CalculateWriteBackDISPCLK is removed and > replaced by dml30_CalculateWriteBackDISPCLK. > The message

Re: [PATCH 1/4] drm/amd: Add detailed GFXOFF stats to debugfs

2022-07-25 Thread André Almeida
nal Message----- >> From: amd-gfx On Behalf Of >> André Almeida >> Sent: Saturday, July 23, 2022 4:34 AM >> To: Deucher, Alexander ; Koenig, Christian >> ; Pan, Xinhui ; David >> Airlie ; Daniel Vetter ; Zhang, Hawking >> ; Zhou1, Tao ; Kuehling, >&

Re: [PATCH] drm/amdgpu: Fix the incomplete product number

2022-07-25 Thread André Almeida
ould only be 16 characters. Any > more,and something could be wrong. Cap it at 16 to be safe > > Signed-off-by: Roy Sun > --- Reviewed-by: André Almeida Next time, please make your subject as [PATCH v2] and add a changelog to make review easier.

Re: [PATCH 1/2] drm/amd/display: change variables type

2022-07-25 Thread André Almeida
Hi Magali, Às 15:15 de 25/07/22, Magali Lemes escreveu: > As "dcn3_15_soc" and "dcn3_16_soc" are of type "struct > _vcs_dpi_soc_bounding_box_st", change their types accordingly. > I can see that indeed this type change sense for those variables, but isn't a bit strange that the type was wrong

Re: [PATCH 1/4] drm/amd: Add detailed GFXOFF stats to debugfs

2022-07-25 Thread André Almeida
Às 10:04 de 25/07/22, André Almeida escreveu: > Às 07:27 de 25/07/22, Quan, Evan escreveu: >> [AMD Official Use Only - General] >> >> Using "uint64_t" instead of "uint32_t" for entry counter may be better. >> > > Indeed, it's a good idea. I'll

Re: [PATCH v2] drm/amd/pm: Add get_gfx_off_status interface for yellow carp

2022-07-26 Thread André Almeida
Às 03:29 de 26/07/22, shikai@amd.com escreveu: > From: Shikai Guo > > add get_gfx_off_status interface to yellow_carp_ppt_funcs structure. > > Signed-off-by: Shikai Guo > --- Reviewed-by: André Almeida

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 t

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

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

2022-07-14 Thread André Almeida
d. Expose the current status of GFXOFF through a new file, amdgpu_gfxoff_status. Signed-off-by: André Almeida --- Changes from v1: none drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 49 - 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu

[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(+)

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

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 >>&

[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

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

2022-07-13 Thread André Almeida
d. Expose the current status of GFXOFF through a new file, amdgpu_gfxoff_status. Signed-off-by: André Almeida --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 49 - 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/g

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

2022-07-14 Thread André Almeida
quot;drm/amdgpu/dce8: simplify hpd code") > Signed-off-by: Maíra Canal Series is Reviewed-by: André Almeida

[PATCH v2 1/4] drm/amd: Add detailed GFXOFF stats to debugfs

2022-07-26 Thread André Almeida
the last logging interval. Both features are designed to be keep the values persistent between suspends. Signed-off-by: André Almeida --- Changes from v1: make entrycount u64 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 168 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH v2 2/4] drm/amd/pm: Implement GFXOFF's entry count and residency for vangogh

2022-07-26 Thread André Almeida
Implement functions to get and set GFXOFF's entry count and residency for vangogh. Signed-off-by: André Almeida --- .../pm/swsmu/inc/pmfw_if/smu_v11_5_ppsmc.h| 5 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 5 +- .../gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 92

[PATCH v2 3/4] Documentation/gpu: Document GFXOFF's count and residency

2022-07-26 Thread André Almeida
Add documentation explaining those two new files. While here, add a note about the value type. Signed-off-by: André Almeida --- Documentation/gpu/amdgpu/thermal.rst | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Documentation/gpu/amdgpu/thermal.rst b

  1   2   3   >