Re: [PATCH] drm/sched: Consolidate drm_sched_job_timedout

2025-07-16 Thread Maíra Canal
then some appeared after unlock, however if the code would rely on the TDR handler restarting itself then it would fail to do that if the job arrived on the pending list after the check. Signed-off-by: Tvrtko Ursulin Reviewed-by: Maíra Canal Best Regards, - Maíra Cc: Christian König Cc

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-16 Thread Maíra Canal
Hi Tvrtko, On 16/07/25 11:46, Tvrtko Ursulin wrote: On 16/07/2025 15:30, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 10:49, Tvrtko Ursulin wrote: On 16/07/2025 14:31, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 05:51, Tvrtko Ursulin wrote: Currently the job free work item will lock sched

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-16 Thread Maíra Canal
Hi Tvrtko, On 16/07/25 10:49, Tvrtko Ursulin wrote: On 16/07/2025 14:31, Maíra Canal wrote: Hi Tvrtko, On 16/07/25 05:51, Tvrtko Ursulin wrote: Currently the job free work item will lock sched->job_list_lock first time to see if there are any jobs, free a single job, and then lock again

Re: [PATCH] drm/sched: Avoid double re-lock on the job free path

2025-07-16 Thread Maíra Canal
ian König Cc: Danilo Krummrich Cc: Maíra Canal Cc: Matthew Brost Cc: Philipp Stanner --- v2: * Improve commit text and kerneldoc. (Philipp) * Rename run free work helper. (Philipp) v3: * Rebase on top of Maira's changes. --- drivers/gpu/drm/scheduler/sched_mai

Re: [PATCH v2] drm/sched: Avoid double re-lock on the job free path

2025-07-12 Thread Maíra Canal
Hi Danilo, On 7/11/25 16:22, Danilo Krummrich wrote: On 7/11/25 9:08 PM, Maíra Canal wrote: Hi Tvrtko, On 11/07/25 12:09, Tvrtko Ursulin wrote: Currently the job free work item will lock sched->job_list_lock first time to see if there are any jobs, free a single job, and then lock again

Re: [PATCH v2] drm/sched: Avoid double re-lock on the job free path

2025-07-11 Thread Maíra Canal
Hi Tvrtko, On 11/07/25 12:09, Tvrtko Ursulin wrote: Currently the job free work item will lock sched->job_list_lock first time to see if there are any jobs, free a single job, and then lock again to decide whether to re-queue itself if there are more finished jobs. Since drm_sched_get_finished_

Re: [PATCH v5 11/16] drm/sched: Account entity GPU time

2025-07-04 Thread Maíra Canal
Hi Tvrtko, In general, LGTM, but I miss documentation for all the new structures and functions that you implemented. Best Regards, - Maíra On 23/06/25 09:27, Tvrtko Ursulin wrote: To implement fair scheduling we need a view into the GPU time consumed by entities. Problem we have is that jobs a

Re: [PATCH v5 08/16] drm/sched: Consolidate entity run queue management

2025-07-04 Thread Maíra Canal
Hi Tvrtko, On 23/06/25 09:27, Tvrtko Ursulin wrote: Move the code dealing with entities entering and exiting run queues to helpers to logically separate it from jobs entering and exiting entities. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Danilo Krummrich Cc: Matthew Brost Cc: P

Re: [PATCH v5 06/16] drm/sched: Consolidate drm_sched_rq_select_entity_rr

2025-07-04 Thread Maíra Canal
Hi Tvrtko, On 23/06/25 09:27, Tvrtko Ursulin wrote: Extract out two copies of the identical code to function epilogue to make it smaller and more readable. Signed-off-by: Tvrtko Ursulin Cc: Christian König Cc: Danilo Krummrich Cc: Matthew Brost Cc: Philipp Stanner --- drivers/gpu/drm/sch

Re: [PATCH v5 07/16] drm/sched: Implement RR via FIFO

2025-07-04 Thread Maíra Canal
Hi Tvrtko, On 23/06/25 09:27, Tvrtko Ursulin wrote: Round-robin being the non-default policy and unclear how much it is used, we can notice that it can be implemented using the FIFO data structures if we only invent a fake submit timestamp which is monotonically increasing inside drm_sched_rq in

Re: [PATCH v5 03/16] drm/sched: De-clutter drm_sched_init

2025-07-04 Thread Maíra Canal
Hi Tvrtko, On 23/06/25 09:27, Tvrtko Ursulin wrote: Move work queue allocation into a helper for a more streamlined function body. Signed-off-by: Tvrtko Ursulin Reviewed-by: Maíra Canal Best Regards, - Maíra Cc: Christian König Cc: Danilo Krummrich Cc: Matthew Brost Cc: Philipp

Re: [PATCH v5 04/16] drm/sched: Avoid double re-lock on the job free path

2025-07-04 Thread Maíra Canal
Hi Tvrtko, On 23/06/25 09:27, Tvrtko Ursulin wrote: Currently the job free work item will lock sched->job_list_lock first time to see if there are any jobs, free a single job, and then lock again to decide whether to re-queue itself if there are more finished jobs. Since drm_sched_get_finished_

Re: [PATCH V10 19/46] drm/tests: Add a few tests around drm_fixed.h

2025-06-17 Thread Maíra Canal
Hi Alex, On 17/06/25 01:17, Alex Hung wrote: From: Harry Wentland While working on the CTM implementation of VKMS I had to ascertain myself of a few assumptions. One of those is whether drm_fixed.h treats its numbers using signed-magnitude or twos-complement. It is twos-complement. In order t

Re: [PATCH V10 02/46] drm/vkms: Add kunit tests for VKMS LUT handling

2025-06-17 Thread Maíra Canal
Hi Alex, On 17/06/25 01:16, Alex Hung wrote: From: Harry Wentland Debugging LUT math is much easier when we can unit test it. Add kunit functionality to VKMS and add tests for - get_lut_index - lerp_u16 Reviewed-by: Louis Chauvet Signed-off-by: Alex Hung Signed-off-by: Harry Wentland C

Re: [PATCH v3] drm/sched: Use struct for drm_sched_init() params

2025-02-10 Thread Maíra Canal
r Reviewed-by: Christian Gmeiner # for Etnaviv Reviewed-by: Frank Binns # for Imagination Reviewed-by: Maíra Canal # for v3d Best Regards, - Maíra --- Changes in v3: - Various formatting requirements. Changes in v2: - Point out that the hang-limit is deprecated. (Christian) - Init

Re: [PATCH v2] drm/sched: Use struct for drm_sched_init() params

2025-01-29 Thread Maíra Canal
Hi Philipp, On 29/01/25 09:39, Philipp Stanner wrote: On Wed, 2025-01-29 at 07:53 -0300, Maíra Canal wrote: Hi Philipp, On 28/01/25 11:29, Philipp Stanner wrote: drm_sched_init() has a great many parameters and upcoming new functionality for the scheduler might add even more. Generally, the

Re: [PATCH v2] drm/sched: Use struct for drm_sched_init() params

2025-01-29 Thread Maíra Canal
Hi Philipp, On 28/01/25 11:29, Philipp Stanner wrote: drm_sched_init() has a great many parameters and upcoming new functionality for the scheduler might add even more. Generally, the great number of parameters reduces readability and has already caused one missnaming in: commit 6f1cacf4eba7 ("

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Maíra Canal
Hi Philipp, On 23/01/25 09:13, Philipp Stanner wrote: On Thu, 2025-01-23 at 08:10 -0300, Maíra Canal wrote: Hi Philipp, On 23/01/25 05:10, Philipp Stanner wrote: On Wed, 2025-01-22 at 19:07 -0300, Maíra Canal wrote: Hi Philipp, On 22/01/25 11:08, Philipp Stanner wrote: drm_sched_init

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Maíra Canal
Hi Philipp, On 23/01/25 05:10, Philipp Stanner wrote: On Wed, 2025-01-22 at 19:07 -0300, Maíra Canal wrote: Hi Philipp, On 22/01/25 11:08, Philipp Stanner wrote: drm_sched_init() has a great many parameters and upcoming new functionality for the scheduler might add even more. Generally, the

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-22 Thread Maíra Canal
Hi Philipp, On 22/01/25 11:08, Philipp Stanner wrote: drm_sched_init() has a great many parameters and upcoming new functionality for the scheduler might add even more. Generally, the great number of parameters reduces readability and has already caused one missnaming in: commit 6f1cacf4eba7 ("

Re: [PATCH v3 9/9] drm/ci: uprev IGT and update testlist

2024-02-10 Thread Maíra Canal
On 2/10/24 15:17, Maíra Canal wrote: On 1/30/24 12:03, Vignesh Raman wrote: Uprev IGT and add amd, v3d, vc4 and vgem specific tests to testlist. Have testlist.txt per driver and include a base testlist so that the driver specific tests will run only on those hardware. Signed-off-by: Vignesh

Re: [PATCH v3 9/9] drm/ci: uprev IGT and update testlist

2024-02-10 Thread Maíra Canal
On 1/30/24 12:03, Vignesh Raman wrote: Uprev IGT and add amd, v3d, vc4 and vgem specific tests to testlist. Have testlist.txt per driver and include a base testlist so that the driver specific tests will run only on those hardware. Signed-off-by: Vignesh Raman --- v3: - New patch in series

Re: [PATCH 02/13] drm: add drm_exec selftests v2

2023-05-04 Thread Maíra Canal
quot;%s - err %d!\n", __func__, ret); + return; + } + drm_exec_fini(&exec)> + pr_info("%s - ok!\n", __func__); +} + +static int drm_exec_suite_init(struct kunit_suite *suite) +{ + kunit_info(suite, "Testing DRM exec manager\n"); Is

Re: [PATCH v3 2/3] drm/amdgpu: Remove redundant framebuffer format check

2023-01-17 Thread Maíra Canal
other drivers return EINVAL in the case of a bad modifier and it wouldn't change the current behavior of i915 and amdgpu. [1] https://lore.kernel.org/dri-devel/20230103125322.855089-1-mca...@igalia.com/T/ Best Regards, - Maíra Canal

Re: [PATCH v3 2/3] drm/amdgpu: Remove redundant framebuffer format check

2023-01-13 Thread Maíra Canal
from i915. Thanks for the feedback! Best Regards, - Maíra Canal

[PATCH v3 3/3] drm/vmwgfx: Remove redundant framebuffer format check

2023-01-13 Thread Maíra Canal
tting framebuffer_check() perform the framebuffer validation. Reviewed-by: Zack Rusin Signed-off-by: Maíra Canal --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

[PATCH v3 0/3] Check for valid framebuffer's format

2023-01-13 Thread Maíra Canal
5807.18172-1-mca...@igalia.com/T/ - Don't remove check from i915 driver (Ville Syrjälä). - Don't unexport drm_any_plane_has_format(). v2 -> v3: https://lore.kernel.org/dri-devel/20230113112743.188486-1-mca...@igalia.com/T/ - Check if r->modifier[0] != 0 (Ville Syrjälä). --- Best Regard

[PATCH v3 2/3] drm/amdgpu: Remove redundant framebuffer format check

2023-01-13 Thread Maíra Canal
m the framebuffer validation. Reviewed-by: Simon Ser Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index b22471b

[PATCH v3 1/3] drm/framebuffer: Check for valid formats

2023-01-13 Thread Maíra Canal
ned-off-by: Maíra Canal --- Documentation/gpu/todo.rst| 9 - drivers/gpu/drm/drm_framebuffer.c | 8 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index 1f8a5ebe188e..3a79c26c5cc7 100644 --- a/Documen

[PATCH v2 3/3] drm/vmwgfx: Remove redundant framebuffer format check

2023-01-13 Thread Maíra Canal
tting framebuffer_check() perform the framebuffer validation. Reviewed-by: Zack Rusin Signed-off-by: Maíra Canal --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

[PATCH v2 2/3] drm/amdgpu: Remove redundant framebuffer format check

2023-01-13 Thread Maíra Canal
m the framebuffer validation. Reviewed-by: Simon Ser Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index b22471b

[PATCH v2 1/3] drm/framebuffer: Check for valid formats

2023-01-13 Thread Maíra Canal
ned-off-by: Maíra Canal --- Documentation/gpu/todo.rst| 9 - drivers/gpu/drm/drm_framebuffer.c | 8 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index 1f8a5ebe188e..3a79c26c5cc7 100644 --- a/Documen

[PATCH v2 0/3] Check for valid framebuffer's format

2023-01-13 Thread Maíra Canal
5807.18172-1-mca...@igalia.com/T/ - Don't remove check from i915 driver (Ville Syrjälä) - Don't unexport drm_any_plane_has_format(). --- Best Regards, - Maíra Canal Maíra Canal (3): drm/framebuffer: Check for valid formats drm/amdgpu: Remove redundant framebuffer format check dr

Re: [PATCH] drm/amd/display: remove redundant CalculateRemoteSurfaceFlipDelay's

2022-09-19 Thread Maíra Canal
Hi Tom On 9/19/22 14:27, Tom Rix wrote: > There are several copies of CalculateRemoteSurfaceFlipDelay. > Reduce to one instance. > > Signed-off-by: Tom Rix Reviewed-by: Maíra Canal Just a minor comment below. > --- > .../dc/dml/dcn20/display_mode_vba_20.c| 4 +- &

Re: [PATCH] drm/amd/display: remove redundant CalculateTWait's

2022-09-19 Thread Maíra Canal
Hi Tom, On 9/18/22 23:37, Tom Rix wrote: > There are several copies of CalculateTwait. > Reduce to one instance and change local variable name to match common usage. > > Signed-off-by: Tom Rix Reviewed-by: Maíra Canal Although, it would be nice to put this function on the displa

Re: [PATCH] drm/amd/display: refactor CalculateWriteBackDelay to use vba_vars_st ptr

2022-09-19 Thread Maíra Canal
teBackDelay; > - double Line_length; > - double Output_lines_last_notclamped; > - double WritebackVInit; > - > - WritebackVInit = (WritebackVRatio + WritebackVTaps + 1) / 2; > - Line_length = dml_max((double) WritebackDestinationWidth, > -

Re: [PATCH 1/2] drm/amd/display: Reduce number of arguments of dml314's CalculateWatermarksAndDRAMSpeedChangeSupport()

2022-09-17 Thread Maíra Canal
, I also would like to see this expand to all display_mode_vba files, but so far this is great to unbreak the build. To the whole series: Tested-by: Maíra Canal Best Regards, - Maíra Canal > --- > > This is just commit ab2ac59c32db ("drm/amd/display: Reduce number of >

[PATCH v3 8/8] Documentation/gpu: Add Display Core Unit Test documentation

2022-09-12 Thread Maíra Canal
Explain how to run the KUnit tests present in the AMDGPU's Display Core and clarify which architectures and tools can be used to run the tests. Moreover, explains how to add new tests to the existing tests. Signed-off-by: Maíra Canal --- .../gpu/amdgpu/display/display-test.rst

[PATCH v3 7/8] drm/amd/display: Introduce KUnit tests to dc_dmub_srv library

2022-09-12 Thread Maíra Canal
Add unit test to the SubVP feature in order to avoid possible regressions and assure the code robustness. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/Kconfig | 13 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 4 + .../gpu/drm/amd/display/tests/.kunitconfig

[PATCH v3 6/8] drm/amd/display: Introduce KUnit tests for dcn20_fpu

2022-09-12 Thread Maíra Canal
From: Magali Lemes This commit adds unit tests to the functions dcn20_cap_soc_clocks and dcn21_update_bw_bounding_box from dcn20/dcn20_fpu. Signed-off-by: Magali Lemes Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/tests/Makefile| 3 +- .../tests/dc/dml/dcn20

[PATCH v3 5/8] drm/amd/display: Introduce KUnit to dcn20/display_mode_vba_20 library

2022-09-12 Thread Maíra Canal
the codebase. Signed-off-by: Maíra Canal --- .../dc/dml/dcn20/display_mode_vba_20.c| 4 + .../dc/dml/dcn20/display_mode_vba_20_test.c | 888 ++ 2 files changed, 892 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/tests/dc/dml/dcn20

[PATCH v3 4/8] drm/amd/display: Introduce KUnit tests to the display_mode_vba library

2022-09-12 Thread Maíra Canal
codebase. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/tests/Makefile| 5 + .../tests/dc/dml/display_mode_vba_test.c | 741 ++ 2 files changed, 746 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/tests/dc/dml/display_mode_vba_test.c diff --git

[PATCH v3 3/8] drm/amd/display: Introduce KUnit tests to display_rq_dlg_calc_20

2022-09-12 Thread Maíra Canal
From: Isabella Basso This adds tests to the bit encoding format verification functions on the file. They're meant to be simpler so as to provide a proof of concept on testing DML code. Signed-off-by: Isabella Basso Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/Kc

[PATCH v3 2/8] drm/amd/display: Introduce KUnit tests to the bw_fixed library

2022-09-12 Thread Maíra Canal
=drivers/gpu/drm/amd/display/tests/ Co-developed-by: Magali Lemes Signed-off-by: Magali Lemes Co-developed-by: Tales Aparecida Signed-off-by: Tales Aparecida Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/Kconfig | 12 + .../drm/amd/display/dc/dml/calcs/bw_fixed.c | 3

[PATCH v3 1/8] drm/amd/display: Introduce KUnit tests for fixed31_32 library

2022-09-12 Thread Maíra Canal
: Maíra Canal --- drivers/gpu/drm/amd/display/Kconfig | 13 + drivers/gpu/drm/amd/display/Makefile | 2 +- .../gpu/drm/amd/display/tests/.kunitconfig| 6 + drivers/gpu/drm/amd/display/tests/Makefile| 12 + .../display/tests/dc/basics/fixpt31_32_test.c | 232

[PATCH v3 0/8] drm/amd/display: Introduce KUnit to Display Mode Library

2022-09-12 Thread Maíra Canal
ps://gitlab.freedesktop.org/isinyaaa/linux/-/tree/for-amd-mixed Thanks in advance for your time taking a look and sending any feedback! Best regards, Isabella Basso, Magali Lemes, Maíra Canal, and Tales Aparecida [1] https://summerofcode.withgoogle.com/programs/2022/organizations/xor

Re: [PATCH 0/5] drm/amd/display: Reduce stack usage for clang

2022-09-11 Thread Maíra Canal
Hi Nathan, I have built-tested the whole series with clang 14.0.5 (Fedora 14.0.5-1.fc36), using: $ make -kj"$(nproc)" ARCH=x86_64 LLVM=1 mrproper allmodconfig drivers/gpu/drm/amd/amdgpu/ Great to see this patchset coming for DML! To the whole series: Tested-by: Maíra Canal Be

[PATCH v2 7/8] drm/amd/display: Introduce KUnit tests to dc_dmub_srv library

2022-08-31 Thread Maíra Canal
Add unit test to the SubVP feature in order to avoid possible regressions and assure the code robustness. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/Kconfig | 13 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 4 + .../gpu/drm/amd/display/tests/.kunitconfig

[PATCH v2 8/8] Documentation/gpu: Add Display Core Unit Test documentation

2022-08-31 Thread Maíra Canal
Explain how to run the KUnit tests present in the AMDGPU's Display Core and clarify which architectures and tools can be used to run the tests. Moreover, explains how to add new tests to the existing tests. Signed-off-by: Maíra Canal --- .../gpu/amdgpu/display/display-test.rst

[PATCH v2 6/8] drm/amd/display: Introduce KUnit tests for dcn20_fpu

2022-08-31 Thread Maíra Canal
From: Magali Lemes This commit adds unit tests to the functions dcn20_cap_soc_clocks and dcn21_update_bw_bounding_box from dcn20/dcn20_fpu. Signed-off-by: Magali Lemes Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/tests/Makefile| 3 +- .../tests/dc/dml/dcn20

[PATCH v2 5/8] drm/amd/display: Introduce KUnit to dcn20/display_mode_vba_20 library

2022-08-31 Thread Maíra Canal
the codebase. Signed-off-by: Maíra Canal --- .../dc/dml/dcn20/display_mode_vba_20.c| 4 + .../dc/dml/dcn20/display_mode_vba_20_test.c | 888 ++ 2 files changed, 892 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/tests/dc/dml/dcn20

[PATCH v2 4/8] drm/amd/display: Introduce KUnit tests to the display_mode_vba library

2022-08-31 Thread Maíra Canal
codebase. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/tests/Makefile| 5 + .../tests/dc/dml/display_mode_vba_test.c | 741 ++ 2 files changed, 746 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/tests/dc/dml/display_mode_vba_test.c diff --git

[PATCH v2 3/8] drm/amd/display: Introduce KUnit tests to display_rq_dlg_calc_20

2022-08-31 Thread Maíra Canal
From: Isabella Basso This adds tests to the bit encoding format verification functions on the file. They're meant to be simpler so as to provide a proof of concept on testing DML code. Signed-off-by: Isabella Basso Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/Kc

[PATCH v2 2/8] drm/amd/display: Introduce KUnit tests to the bw_fixed library

2022-08-31 Thread Maíra Canal
=drivers/gpu/drm/amd/display/tests/ Co-developed-by: Magali Lemes Signed-off-by: Magali Lemes Co-developed-by: Tales Aparecida Signed-off-by: Tales Aparecida Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/Kconfig | 12 + .../drm/amd/display/dc/dml/calcs/bw_fixed.c | 3

[PATCH v2 1/8] drm/amd/display: Introduce KUnit tests for fixed31_32 library

2022-08-31 Thread Maíra Canal
: Maíra Canal --- drivers/gpu/drm/amd/display/Kconfig | 13 + drivers/gpu/drm/amd/display/Makefile | 2 +- .../gpu/drm/amd/display/tests/.kunitconfig| 6 + drivers/gpu/drm/amd/display/tests/Makefile| 12 + .../display/tests/dc/basics/fixpt31_32_test.c | 232

[PATCH v2 0/8] drm/amd/display: Introduce KUnit to Display Mode Library

2022-08-31 Thread Maíra Canal
t: fix executor OOM error handling logic on non-UML") commit e5857d396f35 ("kunit: flatten kunit_suite*** to kunit_suite** in .kunit_test_suites") commit 94681e289bf5 ("kunit: executor: Fix a memory leak on failure in kunit_filter_tests") Thanks in advance for your time taking a l

amd-gfx@lists.freedesktop.org

2022-08-23 Thread Maíra Canal
argument to && or || drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c: 3680:8-55: duplicated argument to && or || Signed-off-by: Bernard Zhao Also, it would be nice to have a changelog between the versions. Other than those small nits, Reviewed-by: Maíra Cana

Re: [BUG][5.20] refcount_t: underflow; use-after-free

2022-08-19 Thread Maíra Canal
On 8/17/22 17:57, Mikhail Gavrilov wrote: > On Wed, Aug 17, 2022 at 11:43 PM Maíra Canal wrote: >> >> Hi Mikhail, >> >> Looks like 45ecaea738830b9d521c93520c8f201359dcbd95 ("drm/sched: Partial >> revert of 'drm/sched: Keep s_fence->parent pointe

Re: [PATCH] drm/amd/display: fix i386 frame size warning

2022-08-19 Thread Maíra Canal
me-larger-than] void dml30_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib) ^ 1 error generated. Best Regards, - Maíra Canal > > UseMinimumDCFCLK() is eating away at > dml30_ModeSupportAndSystemConfigurationFull()'s stack space, so use a > pointer to struct v

[PATCH] drm/amd/display: Include missing header

2022-08-18 Thread Maíra Canal
m_plane.c:992:5: warning: no previous prototype for 'dm_plane_helper_check_state' [-Wmissing-prototypes] Therefore, include the missing header on the file and turn global functions that are not used outside of the file into static functions. Fixes: 5d945cbcd4b1 ("drm/amd/display:

Re: [BUG][5.20] refcount_t: underflow; use-after-free

2022-08-17 Thread Maíra Canal
it and check if the use-after-free still happens. Best Regards, - Maíra Canal [ 297.834779] [ cut here ] [ 297.834818] refcount_t: underflow; use-after-free. [ 297.834831] WARNING: CPU: 30 PID: 2377 at lib/refcount.c:28 refcount_warn_saturate+0xba/0x110 [ 297.834838

[PATCH] drm/amdgpu: Fix use-after-free on amdgpu_bo_list mutex

2022-08-15 Thread Maíra Canal
, remove the mutex_unlock from the amdgpu_cs_vm_handling function, so that amdgpu_cs_submit and amdgpu_cs_parser_fini can handle the unlock. Fixes: 90af0ca047f3 ("drm/amdgpu: Protect the amdgpu_bo_list list with a mutex v2") Reported-by: Mikhail Gavrilov Signed-off-by: Maíra Canal --- Thanks

Re: [BUG][5.20] refcount_t: underflow; use-after-free

2022-08-14 Thread Maíra Canal
ext/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: 90af0ca047f3 ("drm/amdgpu: Protect the amdgpu_bo_list list with a mutex v2") Reported-by: Mikhail Gavrilov Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 +++-- 1 file changed, 3 insertions(+)

Re: [PATCH 7/8] drm/amd/display: Introduce KUnit tests to dc_dmub_srv library

2022-08-11 Thread Maíra Canal
On 8/11/22 04:37, David Gow wrote: On Thu, Aug 11, 2022 at 8:41 AM Tales Aparecida wrote: From: Maíra Canal Add unit test to the SubVP feature in order to avoid possible regressions and assure the code robustness. Signed-off-by: Maíra Canal Signed-off-by: Tales Aparecida --- FYI

Re: [PATCH 1/8] drm/amd/display: Introduce KUnit tests for fixed31_32 library

2022-08-11 Thread Maíra Canal
actice to write tests that run on UML to tests that only run under a particular architecture. [1] https://docs.kernel.org/dev-tools/kunit/usage.html#writing-tests-for-other-architectures Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 6 +++--- drivers/gpu/drm/amd

Re: [PATCH 0/8] drm/amd/display: Introduce KUnit to Display Mode Library

2022-08-11 Thread Maíra Canal
ut, considering the current scope of the AMD Display code, I don't believe it is viable to test on the exposed functions. Best Regards, - Maíra Canal Instead black box testing and/or exposing tests as a separate module (e.g. for the fixed point calculations for example) is probably

[PATCH] drm/amd/display: Drop XFCEnabled parameter from CalculatePrefetchSchedule

2022-08-01 Thread Maíra Canal
The XFCEnabled parameter from the CalculatePrefetchSchedule function is not used and is only mentioned in a couple of comments. Therefore, remove the argument and the comments. Signed-off-by: Maíra Canal --- .../dc/dml/dcn21/display_mode_vba_21.c| 21 +++ 1 file changed

Re: [PATCH] drm/amd/display: Fix a compilation failure on PowerPC caused by FPU code

2022-07-29 Thread Maíra Canal
*optc, > - double vtotal_avg) > -{ > - DC_FP_START(); > - optc3_fpu_set_vrr_m_const(optc, vtotal_avg); The function optc3_fpu_set_vrr_m_const is only used here, so by deleting it, the function optc3_fpu_set_vrr_m_const is declared but not used. Couldn't it be dropped

[PATCH 16/16] drm/amd/display: Remove never used VBA variables

2022-07-28 Thread Maíra Canal
struct vba_vars_st. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h b/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h index 5eaedc3bf2c8

[PATCH 15/16] drm/amd/display: Remove only mencioned once VBA variables

2022-07-28 Thread Maíra Canal
: Maíra Canal --- .../amd/display/dc/dml/dcn32/display_mode_vba_32.c | 1 - .../gpu/drm/amd/display/dc/dml/display_mode_vba.c | 13 ++--- .../gpu/drm/amd/display/dc/dml/display_mode_vba.h | 6 -- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH 13/16] drm/amd/display: Remove TFinalxFill VBA variable

2022-07-28 Thread Maíra Canal
The TFinalxFill variable from the struct vba_vars_st is only used on assignments, so its value is not used on code. So, remove the TFinalxFill entry from the struct vba_vars_st. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c | 3 --- .../gpu/drm

[PATCH 14/16] drm/amd/display: Remove MaximumDCCCompressionYSurface VBA variable

2022-07-28 Thread Maíra Canal
The MaximumDCCCompressionYSurface variable from the struct vba_vars_st is only used on assignments, so its value is not used on code. So, remove the MaximumDCCCompressionYSurface entry from the struct vba_vars_st. Signed-off-by: Maíra Canal --- .../amd/display/dc/dml/dcn21/display_mode_vba_21.c

[PATCH 07/16] drm/amd/display: Remove WritebackAllowFCLKChangeEndPosition VBA variable

2022-07-28 Thread Maíra Canal
The WritebackAllowFCLKChangeEndPosition variable from the struct vba_vars_st is only used on assignments, so its value is not used on code. So, remove the WritebackAllowFCLKChangeEndPosition entry from the struct vba_vars_st. Signed-off-by: Maíra Canal --- .../gpu/drm/amd/display/dc/dml/dcn32

[PATCH 12/16] drm/amd/display: Remove NumberOfDP2p0Support VBA variable

2022-07-28 Thread Maíra Canal
The NumberOfDP2p0Support variable from the struct vba_vars_st is only used on assignments, so its value is not used on code. So, remove the NumberOfDP2p0Support entry from the struct vba_vars_st. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 2

[PATCH 11/16] drm/amd/display: Remove MPCCombineEnable VBA variable

2022-07-28 Thread Maíra Canal
The MPCCombineEnable variable from the struct vba_vars_st is only used on assignments, so its value is not used on code. So, remove the MPCCombineEnable entry from the struct vba_vars_st. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c | 1

[PATCH 10/16] drm/amd/display: Remove ModeIsSupported VBA variable

2022-07-28 Thread Maíra Canal
The ModeIsSupported variable from the struct vba_vars_st is only used on assignments, so its value is not used on code. So, remove the ModeIsSupported entry from the struct vba_vars_st. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c | 1 - drivers

[PATCH 06/16] drm/amd/display: Remove ImmediateFlipSupportedSurface VBA variable

2022-07-28 Thread Maíra Canal
The ImmediateFlipSupportedSurface variable from the struct vba_vars_st is only used on assignments, so its value is not used on code. So, remove the ImmediateFlipSupportedSurface entry from the struct vba_vars_st. Signed-off-by: Maíra Canal --- .../gpu/drm/amd/display/dc/dml/dcn32

[PATCH 09/16] drm/amd/display: Remove SwathWidthCSingleDPP VBA variable

2022-07-28 Thread Maíra Canal
The SwathWidthCSingleDPP variable from the struct vba_vars_st is only used on assignments, so its value is not used on code. So, remove the SwathWidthCSingleDPP entry from the struct vba_vars_st. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c | 2

[PATCH 08/16] drm/amd/display: Remove some XFC variables from VBA

2022-07-28 Thread Maíra Canal
struct vba_vars_st. Signed-off-by: Maíra Canal --- .../dc/dml/dcn20/display_mode_vba_20.c| 38 --- .../dc/dml/dcn20/display_mode_vba_20v2.c | 38 --- .../dc/dml/dcn21/display_mode_vba_21.c| 38 --- .../drm/amd/display/dc/dml

[PATCH 05/16] drm/amd/display: Remove VStartupMargin and FirstMainPlane VBA variables

2022-07-28 Thread Maíra Canal
The variables VStartupMargin and FirstMainPlane from the struct vba_vars_st are only used on assignments, so there values are not used on code. So, remove the variables entries from the struct vba_vars_st. Signed-off-by: Maíra Canal --- .../display/dc/dml/dcn20/display_mode_vba_20.c | 14

[PATCH 04/16] drm/amd/display: Remove AllowDRAMSelfRefreshDuringVBlank VBA variable

2022-07-28 Thread Maíra Canal
The AllowDRAMSelfRefreshDuringVBlank variable from the struct vba_vars_st is only used on assignments, so its value is not used on code. So, remove it the AllowDRAMSelfRefreshDuringVBlank entry from the struct vba_vars_st. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/dc/dml/dcn20

[PATCH 03/16] drm/amd/display: Remove DSCCLK_calculated VBA variable

2022-07-28 Thread Maíra Canal
The DSCCLK_calculated variable from the struct vba_vars_st is only used on assignments, so its value is not used on code. Moreover, its getter function is not used also. So, remove the DSCCLK_calculated entry from the struct vba_vars_st. Signed-off-by: Maíra Canal --- .../dc/dml/dcn20

[PATCH 02/16] drm/amd/display: Remove CompBufReservedSpace* VBA variable

2022-07-28 Thread Maíra Canal
vba_vars_st. Signed-off-by: Maíra Canal --- .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c | 3 --- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c| 2 -- drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h| 5 - 3 files changed, 10 deletions(-) diff

[PATCH 01/16] drm/amd/display: Remove NonUrgentLatencyTolerance VBA variable

2022-07-28 Thread Maíra Canal
The NonUrgentLatencyTolerance variable from the struct vba_vars_st is only used on assignments, so its value is not used on code. Moreover, its getter function is not used also. So, remove the NonUrgentLatencyTolerance entry from the struct vba_vars_st. Signed-off-by: Maíra Canal --- .../gpu

[PATCH 00/16] Remove entries from struct vba_vars_st

2022-07-28 Thread Maíra Canal
o the code. I only removed variables that were only assigned but never used or variables that were never even mentioned. Best Regards, - Maíra Canal [1] https://lore.kernel.org/amd-gfx/20220630215316.1078841-1-mairaca...@riseup.net/T/#u Maíra Canal (16): drm/amd/display: R

[PATCH] drm/amd/display: Remove unused struct freesync_context

2022-07-27 Thread Maíra Canal
All references to struct freesync_context were removed, so remove the struct freesync_context itself and its entry on struct dc_stream_state. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/dc/dc_stream.h | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/amd

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

2022-07-25 Thread Maíra Canal
Hi Magali On 7/25/22 15:15, Magali Lemes wrote: > As "dcn3_15_soc" and "dcn3_16_soc" are of type "struct > _vcs_dpi_soc_bounding_box_st", change their types accordingly. > > Signed-off-by: Magali Lemes > --- Great catch! To the whole series: Rev

Re: [PATCH v2 3/4] drm/amd/display: Remove parameters from rq_dlg_get_dlg_reg

2022-07-22 Thread Maíra Canal
Hi Siqueira, On 7/22/22 17:11, Rodrigo Siqueira Jordao wrote: > Hi Maira, > > First of all, thanks a lot for this patch. This change is really helpful > for reducing the stack size. I just have few comments inline. Thank you for the feedback! > > On 2022-07-21 14:36,

[PATCH v2 4/4] drm/amd/display: Rewrite CalculateWriteBackDISPCLK function

2022-07-21 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 Reviewed-by: André Almeida

[PATCH v2 3/4] drm/amd/display: Remove parameters from rq_dlg_get_dlg_reg

2022-07-21 Thread Maíra Canal
d-off-by: Maíra Canal --- v1 -> v2: - Replace "enum" to "enum entries" (André Almeida). --- .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 3 +-- .../dc/dml/dcn20/display_rq_dlg_calc_20.c | 5 + .../dc/dml/dcn20/display_rq_dlg_calc_20.h

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

2022-07-21 Thread Maíra Canal
The functions dml30_CalculateWriteBackDISPCLK and dml31_CalculateWriteBackDISPCLK are identical. Therefor, to avoid code duplication, replace dml31_CalculateWriteBackDISPCLK by dml30_CalculateWriteBackDISPCLK Signed-off-by: Maíra Canal --- v1 -> v2: - Describe changes in imperative mood (An

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

2022-07-21 Thread Maíra Canal
As the enum entries dm_sw_gfx7_2d_thin_gl and dm_sw_gfx7_2d_thin_l_vp are not used on the codebase, drop those entries from enum dm_swizzle_mode. Signed-off-by: Maíra Canal --- v1 -> v2: - Replace "enum" to "enum entries" (André Almeida). - Describe changes in imperat

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 Maíra Canal
On 7/21/22 10:31, André Almeida wrote: > À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. >> >

Re: [PATCH 5/5] drm/amd/display: move FPU code from dcn301 clk mgr to DML folder

2022-07-21 Thread Maíra Canal
0_clk_mgr.h" > > +// For DML FPU code > +#include "dml/dcn20/dcn20_fpu.h" > +#include "dml/dcn301/dcn301_fpu.h" > + I guess the "dml/dcn301/dcn301_fpu.h" header is not needed, as you only use dcn21_clk_mgr_set_bw_params_wm_table and th

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

2022-07-20 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 Reviewed-by: André Almeida

[PATCH 3/4] drm/amd/display: Remove parameters from rq_dlg_get_dlg_reg

2022-07-20 Thread Maíra Canal
igned-off-by: Maíra Canal --- .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 3 +-- .../dc/dml/dcn20/display_rq_dlg_calc_20.c | 5 + .../dc/dml/dcn20/display_rq_dlg_calc_20.h | 5 + .../dc/dml/dcn20/display_rq_dlg_calc_20v2.c | 5 + .../dc/dml/dcn20/display_rq_dlg_calc_2

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

2022-07-20 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 1/4] drm/amd/display: Drop dm_sw_gfx7_2d_thin_l_vp and dm_sw_gfx7_2d_thin_gl

2022-07-20 Thread Maíra Canal
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. Signed-off-by: Maíra Canal --- .../dc/dml/dcn20/display_mode_vba_20.c| 26 +- .../dc/dml/dcn20/display_mode_vba_20v2.c

Re: [PATCH] drm/amd/display: reduce stack size in dcn32 dml

2022-07-20 Thread Maíra Canal
es is larger than 2048 bytes > [-Werror=frame-larger-than=] > 3799 | } // ModeSupportAndSystemConfigurationFull > | ^ > > Signed-off-by: Alex Deucher > Cc: Stephen Rothwell > --- Reviewed-by: Maíra Canal I believe dcn20 could also receive the same treatment, as I'm still getting a

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

2022-07-19 Thread Maíra Canal
On 7/18/22 16:02, Alex Deucher wrote: > On Thu, Jul 14, 2022 at 12:46 PM Maíra Canal wrote: >> >> The parameters WritebackPixelFormat and WritebackVRatio are removed as >> they are not used on the function dml30_CalculateWriteBackDISPCLK. > > Maybe this is done for

  1   2   >